kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Pablo Pellecchia <pablo9891@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Staging/netlogic coding style issues with struct
Date: Tue, 3 Sep 2019 08:50:27 +0200	[thread overview]
Message-ID: <20190903065027.GB19225@kroah.com> (raw)
In-Reply-To: <CADN=kBmDFT5WtZoS-kGTEi3srD7vpFRRDmWYCJ9aOH_3CUBXdg@mail.gmail.com>

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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2019-09-03  6:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  4:26 Staging/netlogic coding style issues with struct Pablo Pellecchia
2019-09-03  6:50 ` Greg KH [this message]
2019-09-03 10:21 ` Valdis Klētnieks
2019-09-04  3:27   ` Pablo Pellecchia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903065027.GB19225@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=pablo9891@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).