lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] dma: omap-dma: Fix line over 80 characters
From
Date
On Thu, 2015-05-21 at 00:41 +0530, Jagan Teki wrote:
> This patch fixes line over 80 characters warninings while
> running checkpatch.pl

These changes aren't necessary.

If you're really going to do this, please change the style
of the functions you are using.

> 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_nochan, 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 isn't particularly human readable.

If the return type is long, it's sometimes better to
use a separate line for the return type, then put the
function on another line like:

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

> @@ -707,7 +710,8 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
> spin_lock_irqsave(&c->vc.lock, flags);
> vd = vchan_find_desc(&c->vc, cookie);
> if (vd) {
> - txstate->residue = omap_dma_desc_size(to_omap_dma_desc(&vd->tx));
> + txstate->residue = omap_dma_desc_size(
> + to_omap_dma_desc(&vd->tx));

This is unpleasant to read.
Just let some lines be > 80 columns.




\
 
 \ /
  Last update: 2015-05-20 22:41    [W:0.146 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site