Search Linux Wireless

Re: [PATCH 09/16] wcn36xx: Add smd.c

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

 



>> >> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
>> > []
>> >> +int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
>> >> +{
>> > []
>> >> +             /* Add NV body itself */
>> >> +             /* Rework me */
>> >> +             memcpy(wcn->smd_buf + sizeof(msg_body),
>> >> +                    (void *)(&nv_d->table) + fm_offset,
>> >> +                    msg_body.nv_img_buffer_size);
>> >
>> > Does this really do what you want?
>> >
>> > Perhaps it should be:
>> >
>> >                 memcpy(wcn->smd_buf + sizeof(msg_body),
>> >                        ((void *)&nv_d->table) + fm_offset,
>> >                        msg_body.nv_img_buffer_size);
>> >
>>
>> Yes, this line is working. Tested it for ARM. Do you see any potential
>> problems with this pointer operation?
>
> It should really be u8* instead of void*, since void* pointer arithmetic
> isn't really defined I think?
>
> Other than that, this was just about precedence rules, and casts have a
> higher precedence.
>

Aha, now i understand what you mean. You are absolutely right it must
be u8*. Will fix in the next round.

-- 
Best regards,
Eugene
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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