Re: [PATCH] Declare the file_operations struct as const

From: Greg KH
Date: Wed Sep 01 2021 - 11:30:08 EST


On Wed, Sep 01, 2021 at 05:20:13PM +0200, Krish Jain wrote:
> On Wed, Sep 1, 2021 at 1:00 AM Bryan Brattlof <hello@xxxxxxxxxxxxxxxxx> wrote:
> >
> > On this day, August 31, 2021, thus sayeth Fabio M. De Francesco:
> > >
> > > I just want to *really* thank you for the hard work you got involved and that
> > > you carried out with one of the highest levels of professionalism (and
> > > patience :)) very few of us could ever equal (not I, for sure).
> > >
> > > I thank you also not for the technical hints you gave to Krish, instead for
> > > your your choice "to not rob [you] Krish the opportunity to learn".
> > >
> > > Actually I was tempted to write something like "first do this, than that, and
> > > finally run this tool". But I was able to desist, by learning from you how
> > > people should be helped for real.
> > >
> > > Most of us here should learn by your attitude.
> > >
> > > Thanks again, seriously.
> > >
> >
> > Thank you for such kind words, Fabio.
> >
> > I was very lucky to be, and still am, surrounded by people who
> > demonstrated this idea to me when I was young. I am very happy to see
> > others here see how beneficial and helpful (in the long term) learning
> > this way can be.
> >
> > I'm grateful to have found and be a part of this community.
> > ~Bryan
> >
>
>
>
> Interesting.
>
> "make drivers/staging/android/ " works now (finally!) and shows me the
> errors when I mess up in the file ashmem.c for example.
> Furthermore, " make CCFLAGS=-Werror W=1 drivers/staging/android/ "
> outputs the same errors too just more verbose. So it works completely
> now, However, "make CCFLAGS=-Werror W=1 M=drivers/staging/android/
> " just takes to new prompt line and does not output anything. Do you
> know why?

"M=pathname" is different than "pathname", you are asking for different
things to happen here, so depending on your kernel configuration,
different things will be built (or not built).

And don't mes with CCFLAGS settings for building the kernel unless you
_really_ know what you are doing. For staging tree work, it's not
advised at all.

good luck!

greg k-h