Re: Staging/netlogic coding style issues with struct

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

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux