Staging/netlogic coding style issues with struct
Greg KH
greg at kroah.com
Tue Sep 3 02:50:27 EDT 2019
On Tue, Sep 03, 2019 at 01:26:17AM -0300, Pablo Pellecchia wrote:
> Greetings,
>
> I'm fixing some issues on the staging/netlogic directory and I see that
> checkpatch.pl is throwing the following warnings on some files:
>
>
>
> *WARNING: struct should normally be const#9: FILE:
> platform_net.h:9:+struct xlr_net_data {*
>
> A similar issue is reported when we declare a variable of type struct
> <something>, but in this case warning is reported on the struct definition
> itself.
>
> How can we fix this?
You mark the structures const in the correct places as needed.
Sometimes it is not needed, checkpatch is just a perl script and tries
to do the best it can.
Please read up on how C uses const if you are unfamiliar with what that
means.
thanks,
greg k-h
More information about the Kernelnewbies
mailing list