diff mbox series

crypto: frcypt Fix checkpatch warnings

Message ID 20230606111042.96855-1-franziska.naepelt@gmail.com
State New
Headers show
Series crypto: frcypt Fix checkpatch warnings | expand

Commit Message

Franziska Näpelt June 6, 2023, 11:10 a.m. UTC
The following checkpatch warnings have been fixed:
- WARNING: Missing or malformed SPDX-License-Identifier tag
- WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com>
---
 crypto/fcrypt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7

Comments

Randy Dunlap June 11, 2023, 2:56 p.m. UTC | #1
Hi--

On 6/11/23 03:53, Franziska Naepelt wrote:
> Fix the following checkpatch issue:
> - WARNING: Block comments use a trailing */ on a separate line
> 
> Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com>
> ---
> v2:
>  - Revert SPDX change to address only one logical change
> ---
>  crypto/fcrypt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
> index 95a16e88899b..e9e119bab784 100644
> --- a/crypto/fcrypt.c
> +++ b/crypto/fcrypt.c
> @@ -303,7 +303,8 @@ static int fcrypt_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int key
>  
>  #if BITS_PER_LONG == 64  /* the 64-bit version can also be used for 32-bit
>  			  * kernels - it seems to be faster but the code is
> -			  * larger */
> +			  * larger
> +			  */

The comment doesn't begin with a /* on a line by itself either.

checkpatch isn't always correct.
Maybe it isn't in this case.

I would either make it a correct multi-line comment or not make a change
at all here.

>  
>  	u64 k;	/* k holds all 56 non-parity bits */
>  
> 
> base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
Franziska Näpelt June 12, 2023, 5:23 p.m. UTC | #2
Am So., 11. Juni 2023 um 16:56 Uhr schrieb Randy Dunlap <rdunlap@infradead.org>:
>
> Hi--
>
> On 6/11/23 03:53, Franziska Naepelt wrote:
> > Fix the following checkpatch issue:
> > - WARNING: Block comments use a trailing */ on a separate line
> >
> > Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com>
> > ---
> > v2:
> >  - Revert SPDX change to address only one logical change
> > ---
> >  crypto/fcrypt.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
> > index 95a16e88899b..e9e119bab784 100644
> > --- a/crypto/fcrypt.c
> > +++ b/crypto/fcrypt.c
> > @@ -303,7 +303,8 @@ static int fcrypt_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int key
> >
> >  #if BITS_PER_LONG == 64  /* the 64-bit version can also be used for 32-bit
> >                         * kernels - it seems to be faster but the code is
> > -                       * larger */
> > +                       * larger
> > +                       */
>
> The comment doesn't begin with a /* on a line by itself either.
>
> checkpatch isn't always correct.
> Maybe it isn't in this case.
>
> I would either make it a correct multi-line comment or not make a change
> at all here.
>
> >
> >       u64 k;  /* k holds all 56 non-parity bits */
> >
> >
> > base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
>
> --
> ~Randy

Hi Randy,
thanks for the heads up. I'll leave it for now and won't make a change.
Thanks, Franziska
diff mbox series

Patch

diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
index 95a16e88899b..d81d65489c41 100644
--- a/crypto/fcrypt.c
+++ b/crypto/fcrypt.c
@@ -1,3 +1,4 @@ 
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* FCrypt encryption algorithm
  *
  * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
@@ -303,7 +304,8 @@  static int fcrypt_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int key
 
 #if BITS_PER_LONG == 64  /* the 64-bit version can also be used for 32-bit
 			  * kernels - it seems to be faster but the code is
-			  * larger */
+			  * larger
+			  */
 
 	u64 k;	/* k holds all 56 non-parity bits */