public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Jagan Teki <jteki@openedev.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 1/2] dma: omap-dma: Fix line over 80 characters
Date: Thu, 21 May 2015 09:40:04 -0700	[thread overview]
Message-ID: <1432226404.20840.60.camel@perches.com> (raw)
In-Reply-To: <20150521155934.GR3140@localhost>

On Thu, 2015-05-21 at 21:29 +0530, Vinod Koul wrote:
> On Thu, May 21, 2015 at 12:41:09AM +0530, Jagan Teki wrote:
> > This patch fixes line over 80 characters warninings while
> > running checkpatch.pl
> 
> You should know 80 char is a warn not an error, and you should read the
> Codingstyle documentation before you embark on these changes.
> The guiding principle here is readablity and greapblity, anything which
> breaks these is strict NO.

Well, those abilities are at a minimum certainly goalposts
and should be preferred over most everything else.

> > diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
[]
> > @@ -168,7 +168,8 @@ static inline struct omap_chan *to_omap_dma_chan(struct dma_chan *c)
> >  	return container_of(c, struct omap_chan, vc.chan);
> >  }
> >  
> > -static inline struct omap_desc *to_omap_dma_desc(struct dma_async_tx_descriptor *t)
> > +static inline struct omap_desc *to_omap_dma_desc(
> > +				struct dma_async_tx_descriptor *t)
> This makes it harder to read, if you see drivers the will do it:
> 
> static inline struct omap_desc
> *to_omap_dma_desc(struct dma_async_tx_descriptor *t)

That's a relatively unusual style.

The more common style is to keep the pointer on the same line
as the return type like:

static inline struct omap_desc *
to_omap_dma_desc(struct dma_async_tx_descriptor *t)

It's roughly 50:1 for the * on the 1st line.

> > @@ -334,7 +336,7 @@ static void omap_dma_stop(struct omap_chan *c)
> >  		if (val & (CCR_RD_ACTIVE | CCR_WR_ACTIVE))
> >  			dev_err(c->vc.chan.device->dev,
> >  				"DMA drain did not complete on lch %d\n",
> > -			        c->dma_ch);
> > +				c->dma_ch);
> whats changes here? title says 80 char!

spacing, there's an 8 char space where there could be a tab.



      reply	other threads:[~2015-05-21 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 19:11 [PATCH 1/2] dma: omap-dma: Fix line over 80 characters Jagan Teki
2015-05-20 19:11 ` [PATCH 2/2] dma: amba-pl08x: " Jagan Teki
2015-05-21 15:59   ` Vinod Koul
2015-05-20 20:24 ` [PATCH 1/2] dma: omap-dma: " Joe Perches
2015-05-21 15:59 ` Vinod Koul
2015-05-21 16:40   ` Joe Perches [this message]

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=1432226404.20840.60.camel@perches.com \
    --to=joe@perches.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jteki@openedev.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.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