linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
	Krish Jain <krishjain02939@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Declare the file_operations struct as const
Date: Sat, 28 Aug 2021 13:13:48 +0200	[thread overview]
Message-ID: <1720585.ZkIvycaLSE@localhost.localdomain> (raw)
In-Reply-To: <CAPGkw+wcZRcr0W2ay6ZJY5yW7-EEMpK-yH-3j=UkDpj3kA-ySg@mail.gmail.com>

On Saturday, August 28, 2021 11:52:39 AM CEST Krish Jain wrote:
> On Sat, Aug 28, 2021 at 11:46 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > A: http://en.wikipedia.org/wiki/Top_post
> > Q: Were do I find info about this thing called top-posting?
> > A: Because it messes up the order in which people normally read text.
> > Q: Why is top-posting such a bad thing?
> > A: Top-posting.
> > Q: What is the most annoying thing in e-mail?
> >
> > A: No.
> > Q: Should I include quotations after my reply?
> >
> > http://daringfireball.net/2007/07/on_top
> 
> 
> Now I get it. I've never used this style of email ever before so am a
> novice. Forgive me. Also I didn't get what you mean should I include
> quotations after my reply?

No, Krish. Greg placed the lines you read above only to let you understand
how much confusion we get with top-posting :)

> > On Sat, Aug 28, 2021 at 11:37:50AM +0200, Krish Jain wrote:
> > > Hi. Thanks for your response. Changing to  "const static" would fix
> > > the first error but looking at the second error indicates that it
> > > can't be a const, right? So checkpatch.pl was wrong?

You misunderstood my first message in reply to your patch:

(1) that structure shouldn't be "const". You broke the build with that so I
guessed that you didn't build the driver;

(2) You should place "static" as the first keyword of a declaration. It doesn't
change the semantics, but it is better style and so it is used in the kernel.

> > checkpatch.pl is a perl script that does its best here.  You always have
> > to then look at the code itself to see if what it is asking you to do is
> > correct.
> >
> > And you always have to at the very least, test build your changes to
> > verify that they do not break anything.
> >
> > thanks,
> >
> > greg k-h
> 
> Thank you so much. I didn't realize that I could have tested it by
> just building the driver and not the entire kernel. Anyway, I'd still
> love to learn more and contribute to the kernel. Where can I find
> "small fixes" I can make?

Don't expect that someone here says to you which "fixes" you should
address. Read the code and find them on your own. Get hints from 
checkpatch.pl and the other static analyzers too (Sparse, Coccinelle,
make that-driver-you-chose W=1, etc..).

Thanks,

Fabio
> Warm Regards,
> 
> Krish
> 
> 





  reply	other threads:[~2021-08-28 11:13 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPGkw+x+B1731SL=afoSKiWwH-n-FA5YJ+WOwYdv8iyFhWk1zA@mail.gmail.com>
     [not found] ` <3634721.RBzQ2xsved@localhost.localdomain>
2021-08-27  7:48   ` [PATCH] Declare the file_operations struct as const Fabio M. De Francesco
2021-08-27  8:50     ` Krish Jain
2021-08-27 18:38       ` Krish Jain
2021-08-27 19:46         ` Krish Jain
2021-08-27 23:38           ` Bryan Brattlof
2021-08-28  9:37             ` Krish Jain
2021-08-28  9:46               ` Greg KH
2021-08-28  9:52                 ` Krish Jain
2021-08-28 11:13                   ` Fabio M. De Francesco [this message]
2021-08-29  2:13             ` Krish Jain
2021-08-29  2:16               ` Krish Jain
2021-08-29  6:16               ` Greg KH
2021-08-29 14:45 Bryan Brattlof
2021-08-29 16:20 ` Krish Jain
2021-08-29 16:34   ` Krish Jain
2021-08-29 16:49   ` Bryan Brattlof
2021-08-29 16:56     ` Krish Jain
2021-08-29 18:28       ` Krish Jain
2021-08-29 18:46         ` Krish Jain
2021-08-29 21:00           ` Bryan Brattlof
2021-08-29 22:11             ` Krish Jain
2021-08-30 12:40               ` Krish Jain
2021-08-30 13:01                 ` Krish Jain
2021-08-31  0:42                   ` Krish Jain
2021-08-31 13:35                     ` Bryan Brattlof
2021-08-31 14:00                       ` Fabio M. De Francesco
2021-08-31 23:00                         ` Bryan Brattlof
2021-09-01 15:20                           ` Krish Jain
2021-09-01 15:30                             ` Greg KH
2021-09-01 15:34                               ` Krish Jain
2021-09-01 16:51                                 ` Greg KH
2021-09-01 17:34                                   ` Bryan Brattlof
2021-09-01 18:04                                     ` Krish Jain
2021-09-01 20:29                                       ` Bryan Brattlof
  -- strict thread matches above, loose matches on Subject: below --
2021-08-27  2:19 Krish Jain

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=1720585.ZkIvycaLSE@localhost.localdomain \
    --to=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krishjain02939@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).