Re: [PATCH v2] staging: vt6655: use memset to make code clearer

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

 



On Fri, Sep 09, 2022 at 01:29:44PM +0200, Nam Cao wrote:
> On Fri, Sep 9, 2022 at 12:23 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > Why do you have to cast this to (void *)?  That should almost never be
> > needed.
> 
> Because I want to suppress a compiler warning:
> drivers/staging/vt6655/device_main.c:869:9: warning: passing argument
> 1 of ‘memset’ discards ‘volatile’ qualifier from pointer target type
> [-Wdiscarded-qualifiers]
>   869 |  memset(&rd->rd0, 0, sizeof(rd->rd0));
>       |         ^~~~~~~~

Why would that have a type of "volatile"?  That should be fixed first
please.

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux