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:[email protected]]
>Sent: Monday, June 26, 2017 4:35 AM
>To: Shikha SINGH <[email protected]>
>Cc: [email protected]; [email protected]; Raunaque Mujeeb
>QUAISER <[email protected]>; Manoj KUMAR
><[email protected]>; Sylvain FIDELIS <[email protected]>; Raphael
>COLLADO <[email protected]>
>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.

Reply via email to