Search Linux Wireless

RE: [[linux-nfc][PATCH v1] 2/6] NFC: nfcst: Add ST NFC Transceiver core framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Samuel,
            Skb_put()  returns pointer of type unsigned char  (unsigned char *).
 So here we are dereferencing unsigned char pointer not a void pointer. It should not create any issue.

Let me know your view.
Thanks & Regards,
Shikha
 

>-----Original Message-----
>From: Samuel Ortiz [mailto:sameo@xxxxxxxxxxxxxxx]
>Sent: Monday, June 26, 2017 4:35 AM
>To: Shikha SINGH <shikha.singh@xxxxxx>
>Cc: linux-wireless@xxxxxxxxxxxxxxx; linux-nfc@xxxxxxxxxxxx; Raunaque Mujeeb
>QUAISER <raunaque.quaiser@xxxxxx>; Manoj KUMAR
><manoj.kumar@xxxxxx>; Sylvain FIDELIS <sylvain.fidelis@xxxxxx>; Raphael
>COLLADO <Raphael.COLLADO@xxxxxx>
>Subject: Re: [[linux-nfc][PATCH v1] 2/6] NFC: nfcst: Add ST NFC Transceiver
>core framework
>
>Hi Shikha,
>
>On Tue, May 02, 2017 at 02:03:39AM -0400, Shikha Singh wrote:
>> +static int nfcst_in_send_cmd(struct nfc_digital_dev *ddev,
>> +			     struct sk_buff *skb,
>> +			     u16 timeout,
>> +			     nfc_digital_cmd_complete_t cb,
>> +			     void *arg)
>> +{
>> +	struct nfcst_context *context = nfc_digital_get_drvdata(ddev);
>> +	int rc;
>> +	int len_data_to_tag = 0;
>> +
>> +	if (!context->nfcst_power)
>> +		return -EIO;
>> +
>> +	/*
>> +	 * down the semaphore to indicate that last nfcst_in_send_cmd()
>> +	 * call is pending, If interrupted, WARN and return !
>> +	 */
>> +	rc = down_killable(&context->exchange_lock);
>> +	if (rc) {
>> +		WARN(1, "Semaphore wait is interrupted in
>nfcst_in_send_cmd\n");
>> +		return rc;
>> +	}
>> +
>> +	if (context->trig_config) {
>> +		context->trig_config = false;
>> +		rc = nfcst_handle_config_fdt(context, false);
>> +		if (rc) {
>> +			dev_err(&context->nfcdev->dev, "config fdt failed
>from nfcst_in_send_cmd %d\n",
>> +				rc);
>> +			return rc;
>> +		}
>> +	}
>> +
>> +	switch (context->current_rf_tech) {
>> +	case NFC_DIGITAL_RF_TECH_106A:
>> +		len_data_to_tag = skb->len + 1;
>> +		*skb_put(skb, 1) = context->sendrcv_trflag;
>You can't dereference a void pointer. Please fix that as it will most likely break
>the build.
>
>Cheers,
>Samuel.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux