public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Cooper <jason@lakedaemon.net>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
	Rami Rosen <rosenr@marvell.com>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Maen Suleiman <maen@marvell.com>,
	Francois Romieu <romieu@fr.zoreil.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit
Date: Fri, 12 Oct 2012 12:03:29 -0400	[thread overview]
Message-ID: <20121012160329.GQ12330@titan.lakedaemon.net> (raw)
In-Reply-To: <20121012165919.0dd085dd@skate>

On Fri, Oct 12, 2012 at 04:59:19PM +0200, Thomas Petazzoni wrote:
> Jason,
> 
> On Fri, 12 Oct 2012 10:31:31 -0400, Jason Cooper wrote:
> 
> > I agree with Francois on most of these.  I prefer readability over
> > hard 80 column limits.
> 
> Sure, but checkpatch.pl is warning on every line exceeding the 80
> columns. Not that I think that all checkpatch.pl warnings should
> necessarily be religiously respected, but if you have gazillions of
> warnings regarding line exceeding 80 columns, it is very likely that
> you will miss more important warnings.

./scripts/checkpatch.pl --ignore LONG_LINE ...

Will yield the 'more important' warnings/errors.  After those are
cleared, you can run without --ignore to check for over-indentation,
etc.

> > Although, 80 columns is still sound
> > guidance.  For example, a majority of the broken lines are due to
> > long macro and constant names.  I did a 'git grep NETA' and didn't
> > see anything alarming.  So, above could become
> > 
> > 			val |= rx_filled << NETA_RXQ_ADD_NONOCC_SHIFT;
> 
> I don't mind, but then I would like to keep things consistent:
> 
>  * The driver file would be neta.c
> 
>  * All functions and data structure would be prefixed neta_ and not
>    mvneta_
> 
>  * The Kconfig option would become CONFIG_NETA. Do we really want such
>    a "simple" Kconfig option name for a driver?

Well, you could do mv_neta.c and CONFIG_MV_NETA, but at the end of the
day, we were both trying to put lipstick on a pig.  Your last paragraph
is the most important.

> Maybe the fact that those long macros are making long lines is also due
> to the code having sometimes a too deep indentation, and I need to fix
> that by using more auxiliary functions or something like that?

This is the intent of the 80 column warning.  Please review the patch
for over-indentation, and consider shortening the macros, eg
MVNETA_RXQ_ADD_NONOCC_SHFT.

thx,

Jason.

  reply	other threads:[~2012-10-12 16:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 15:27 [PATCH v2] Network driver for the Armada 370 and Armada XP ARM Marvell SoCs Thomas Petazzoni
2012-10-11 15:27 ` [PATCH v2 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit Thomas Petazzoni
2012-10-11 15:46   ` Rob Herring
2012-10-11 16:38     ` Thomas Petazzoni
2012-10-12 14:16     ` Thomas Petazzoni
2012-10-11 18:13   ` Baruch Siach
2012-10-11 21:26   ` Francois Romieu
2012-10-12 14:31     ` Jason Cooper
2012-10-12 14:59       ` Thomas Petazzoni
2012-10-12 16:03         ` Jason Cooper [this message]
2012-10-11 15:28 ` [PATCH v2 2/4] net: mvneta: update MAINTAINERS file for the mvneta maintainers Thomas Petazzoni
2012-10-11 15:28 ` [PATCH v2 3/4] arm: mvebu: add Ethernet controllers using mvneta driver for Armada 370/XP Thomas Petazzoni
2012-10-11 15:28 ` [PATCH v2 4/4] arm: mvebu: enable Ethernet controllers on Armada 370/XP eval boards Thomas Petazzoni

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=20121012160329.GQ12330@titan.lakedaemon.net \
    --to=jason@lakedaemon.net \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=gregory.clement@free-electrons.com \
    --cc=kernel@wantstofly.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maen@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=rosenr@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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