lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZSkt/B+hyDmOoocF@dorcaslitunya-virtual-machine>
Date:   Fri, 13 Oct 2023 14:46:04 +0300
From:   Dorcas Litunya <anonolitunya@...il.com>
To:     Dan Carpenter <dan.carpenter@...aro.org>
Cc:     outreachy@...ts.linux.dev,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        Teddy Wang <teddy.wang@...iconmotion.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-fbdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [PATCH]Staging: sm750fb:Add snakecase naming style

On Fri, Oct 13, 2023 at 06:56:08PM +0300, Dan Carpenter wrote:
> On Fri, Oct 13, 2023 at 02:33:00PM +0300, Dorcas Litunya wrote:
> > On Fri, Oct 13, 2023 at 01:48:08PM +0300, Dan Carpenter wrote:
> > > On Fri, Oct 13, 2023 at 01:42:15PM +0300, Dorcas AnonoLitunya wrote:
> > > > From: Dorcas Anono Litunya <anonolitunya@...il.com>
> > > > 
> > > > Change camelCase variables in file to snake_case for consistent naming
> > > > practices. Issue found by checkpatch.
> > > > 
> > > > Signed-off-by: Dorcas Anono Litunya <anonolitunya@...il.com>
> > > > ---
> > > >  drivers/staging/sm750fb/ddk750_mode.c | 86 +++++++++++++--------------
> > > >  drivers/staging/sm750fb/ddk750_mode.h |  2 +-
> > > >  drivers/staging/sm750fb/sm750_hw.c    |  2 +-
> > > >  3 files changed, 45 insertions(+), 45 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
> > > > index e00a6cb31947..f08dcab29172 100644
> > > > --- a/drivers/staging/sm750fb/ddk750_mode.c
> > > > +++ b/drivers/staging/sm750fb/ddk750_mode.c
> > > > @@ -14,13 +14,13 @@
> > > >   * in bit 29:27 of Display Control register.
> > > >   */
> > > >  static unsigned long
> > > > -displayControlAdjust_SM750LE(struct mode_parameter *pModeParam,
> > > > -			     unsigned long dispControl)
> > > > +display_control_adjust_SM750LE(struct mode_parameter *p_mode_param,
> > > 
> > > The p stands for pointer.  We don't like that naming style.  Just call
> > > it mode_param.
> > > 
> > > Thes are the renamed things.
> > > 
> > > displayControlAdjust_SM750LE => display_control_adjust_SM750LE
> > > pModeParam => p_mode_param
> > > dispControl => disp_control
> > > programModeRegisters => program_mode_registers
> > > ddk750_setModeTiming => ddk750_set_mode_timing
> > > 
> > > I feel like this would be better broken up probably into one variable
> > > per patch.  It's jumping around between files.  These variables are not
> > > closely related.
> > Thanks for the feedback Dan. I will revise to do one variable per patch.
> > 
> > However,I have an inquiry the main reason its jumping between files is because one of the
> > functions I am modifying(the ddk_set_mode_timing) is imported and used
> > in other files. In this case, should I do one patch per variable per
> > file?
> 
> No that would break the build...
> 
> It's just that I felt that in this case it's especially useful to
> break it apart because some of them affect multiple files and some of
> the variables are local to a given function.  (You should still adjust
> the header file to match even though the compiler doesn't care).

Makes more sense. I will work on that. Thanks!
> regards,
> dan carpenter
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ