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]
Date:	Thu, 21 May 2015 09:40:04 -0700
From:	Joe Perches <joe@...ches.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	Jagan Teki <jteki@...nedev.com>, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH 1/2] dma: omap-dma: Fix line over 80 characters

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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ