Re: [PATCH v6 18/18] crypto: sun8i-ce: fix some style issue

23 views
Skip to first unread message

Joe Perches

unread,
Sep 4, 2020, 3:37:26 PM9/4/20
to Corentin Labbe, da...@davemloft.net, her...@gondor.apana.org.au, mri...@kernel.org, we...@csie.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linux...@googlegroups.com
On Fri, 2020-09-04 at 11:10 +0000, Corentin Labbe wrote:
> This patch fix a double empty line issue reported by checkpatch.
> While at it, since now the maximum line length is now 100, reorder some
> wrapped line.
[]
> diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
[]
> @@ -164,12 +164,10 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
> goto theend_key;
> }
> offset = areq->cryptlen - ivsize;
> - scatterwalk_map_and_copy(rctx->backup_iv, areq->src,
> - offset, ivsize, 0);
> + scatterwalk_map_and_copy(rctx->backup_iv, areq->src, offset, ivsize, 0);
> }
> memcpy(rctx->bounce_iv, areq->iv, ivsize);
> - addr_iv = dma_map_single(ce->dev, rctx->bounce_iv, rctx->ivlen,
> - DMA_TO_DEVICE);
> + addr_iv = dma_map_single(ce->dev, rctx->bounce_iv, rctx->ivlen, DMA_TO_DEVICE);

coding-style.rst:

Statements longer than 80 columns should be broken into sensible chunks,
unless exceeding 80 columns significantly increases readability and does
not hide information.

Do these longer lines make the code significantly more readable?
I don't think they do.


Corentin Labbe

unread,
Sep 7, 2020, 3:16:24 AM9/7/20
to Joe Perches, her...@gondor.apana.org.au, Corentin Labbe, da...@davemloft.net, mri...@kernel.org, we...@csie.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linux...@googlegroups.com
Oh I saw the increase in checkpatch.pl but didnt saw that it was still 80 in coding-style.rst.
Anyway as maintainer of this driver, I prefer unwrapped lines.

I let Herbert to choose to apply the serie without this last patch or not.

Herbert Xu

unread,
Sep 7, 2020, 3:18:50 AM9/7/20
to Corentin Labbe, Joe Perches, Corentin Labbe, da...@davemloft.net, mri...@kernel.org, we...@csie.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linux...@googlegroups.com
On Mon, Sep 07, 2020 at 09:16:17AM +0200, Corentin Labbe wrote:
>
> Oh I saw the increase in checkpatch.pl but didnt saw that it was still 80 in coding-style.rst.
> Anyway as maintainer of this driver, I prefer unwrapped lines.
>
> I let Herbert to choose to apply the serie without this last patch or not.

While lines beyond 80 characters are allowed, please don't send
patches that simply rewrite existing lines as longer ones.

Thanks,
--
Email: Herbert Xu <her...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Reply all
Reply to author
Forward
0 new messages