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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Oct 2014 10:04:59 -0700
From:	Joe Perches <joe@...ches.com>
To:	Akshay Sarode <akshaysarode21@...il.com>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] Checkpatch: coding style errors in Nvidia ethernet
 driver

On Fri, 2014-10-10 at 22:15 +0530, Akshay Sarode wrote:
> On Fri, Oct 10, 2014 at 08:03:07AM -0700, Joe Perches wrote:
> > On Fri, 2014-10-10 at 13:31 +0530, Akshay Sarode wrote:
> > > ERROR: "foo* bar" should be "foo *bar"
> > > ERROR: do not initialise statics to 0 or NULL
> > > CHECK: spinlock_t definition without comment
> > > Signed-off-by: Akshay Sarode <akshaysarode21@...il.com>
> > []
> > > diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
> > []
> > > @@ -911,12 +913,18 @@ enum {
> > []
> > >  /*
> > >   * Debug output control for tx_timeout
> > >   */
> > > -static bool debug_tx_timeout = false;
> > > +enum {
> > > +	NV_DEBUG_TX_TIMEOUT_DISABLED,
> > > +	NV_DEBUG_TX_TIMEOUT_ENABLED
> > > +};
> > > +
> > > +static bool debug_tx_timeout = NV_DEBUG_TX_TIMEOUT_DISABLED;
> > 
> > Adding this enum is not useful.
> > 
> Sorry, If I may have not checked the code properly. I am a newbie here and I was hoping to start with checking coding styles.

No worries, welcome.

Starting with fixing a coding style defect or three is
just fine to learn how to compile and test the kernel.

But generally it's more useful to find things that make
the code better, more readable, smaller, faster, etc.

Also if you have some functional defect or enhancement
to implement, that's even better still.

> I'll check again.

Using an enum for a bool isn't very sensible.
true/false exist already.

>  Also there are a whole lot of warnings for line over 80 characters.

I wouldn't bother with long line conversions unless
you're doing something else at the same time.

If you want to do them for the practice, please do
them on files in drivers/staging/.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ