Re: [Outreachy kernel] [PATCH] staging: sm750fb: make pointers in array const

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

 



On Monday, October 18, 2021 6:54:34 PM CEST Fabio M. De Francesco wrote:
> On Monday, October 18, 2021 6:44:31 PM CEST Kushal Kothari wrote:
> > Change the parameters of functions from const char *g_fbmode[] to
> > const char * const g_fbmode[]. This additional const is needed to
> > allow us to fix  checkpatch warning, as well as being good
> > programming practice.
> > 
> > For the checkpatch warnings, if we have a set of command line
> > args that we want to check defined as:
> > 	static const char * g_fbmode[] = {NULL, NULL};
> > 
> > checkpatch will complain:
> > 	WARNING: static const char * array should probably be static 
const 
> char * const
> > 
> > Signed-off-by: Kushal Kothari <kushalkothari285@xxxxxxxxx>
> > ---
> >  drivers/staging/sm750fb/sm750.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/
> sm750.c
> > index dbd1159a2ef0..3d9b4b0efcb1 100644
> > --- a/drivers/staging/sm750fb/sm750.c
> > +++ b/drivers/staging/sm750fb/sm750.c
> > @@ -33,7 +33,7 @@
> >  static int g_hwcursor = 1;
> >  static int g_noaccel;
> >  static int g_nomtrr;
> > -static const char *g_fbmode[] = {NULL, NULL};
> > +static const char * const g_fbmode[] = {NULL, NULL};
> 
> You have introduced a logical change (g_fbmode[] entries cannot be assigned 
> any more) and a build error (because there is code somewhere that assigns 
> values to those slots).
> 
> Please, build the code after you've changed it.
> 
> Thanks,
> 
> Fabio

Hi Kushal,

As I wrote your patch has errors, however, if it had no errors it could not 
be taken in any case. I just noticed that you forgot to CC linux-
staging@xxxxxxxxxxxxxxx. 

Some days ago, Greg Kroah-Hartman wrote clearly that he cannot take patches 
that are not submitted to linux-staging. 

The "Submit patches" section of https://kernelnewbies.org/Outreachyfirstpatch 
is a bit misleading. However, Karolina Drobnik is taking care to rework it.

For the moment, please use the following command (or some smart variation of 
it) to get a list with _all_ the people and mailing lists you should send 
your patches to:

kernel_source_dir@localhost:~ # perl scripts/get_maintainer.pl --separator , 
--norolestats -f drivers/staging/sm750fb/

The output is:

Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>,Teddy Wang 
<teddy.wang@xxxxxxxxxxxxxxxxx>,Greg Kroah-Hartman 
<gregkh@xxxxxxxxxxxxxxxxxxx>,linux-fbdev@xxxxxxxxxxxxxxx,linux-
staging@xxxxxxxxxxxxxxx,linux-kernel@xxxxxxxxxxxxxxx

Thanks,

Fabio

P.S.: @Karolina, please correct me if I wrote something that is wrong and 
that contradicts the new text you are working on.








[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux