linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: frcypt Fix checkpatch warnings
@ 2023-06-06 11:10 Franziska Naepelt
  2023-06-06 11:36 ` Bagas Sanjaya
  2023-06-11 10:53 ` [PATCH v2] crypto: fcrypt: Fix block comment Franziska Naepelt
  0 siblings, 2 replies; 5+ messages in thread
From: Franziska Naepelt @ 2023-06-06 11:10 UTC (permalink / raw)
  To: linux-crypto; +Cc: herbert, davem, linux-kernel, Franziska Naepelt

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(-)

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 */
 

base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
-- 
2.39.2 (Apple Git-143)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypto: frcypt Fix checkpatch warnings
  2023-06-06 11:10 [PATCH] crypto: frcypt Fix checkpatch warnings Franziska Naepelt
@ 2023-06-06 11:36 ` Bagas Sanjaya
  2023-06-11 10:53 ` [PATCH v2] crypto: fcrypt: Fix block comment Franziska Naepelt
  1 sibling, 0 replies; 5+ messages in thread
From: Bagas Sanjaya @ 2023-06-06 11:36 UTC (permalink / raw)
  To: Franziska Naepelt, linux-crypto
  Cc: herbert, davem, linux-kernel, Franziska Naepelt,
	Linux SPDX Licenses, Linux Kernel Janitors, David Howells

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

[Also Cc: linux-spdx list and original author mentioned in the license
boilerplate]

On Tue, Jun 06, 2023 at 01:10:42PM +0200, Franziska Naepelt wrote:
> 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

Two different logical changes in a patch - please break them into a
2-patch series, with each patch do one job. And please write the patch
description in imperative mood instead (e.g. "Do foo").

> +// SPDX-License-Identifier: GPL-2.0-or-later
>  /* FCrypt encryption algorithm
>   *
>   * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.

NAK!

There is also BSD 3-clause boilerplate (from original code that fcrypt.c
is based on). Thus, the proper SPDX tag should have been:

```
// SPDX-License-Identifier: GPL-2.0-or-later AND BSD-3-Clause
```

And please also delete the boilerplate.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] crypto: fcrypt: Fix block comment
  2023-06-06 11:10 [PATCH] crypto: frcypt Fix checkpatch warnings Franziska Naepelt
  2023-06-06 11:36 ` Bagas Sanjaya
@ 2023-06-11 10:53 ` Franziska Naepelt
  2023-06-11 14:56   ` Randy Dunlap
  1 sibling, 1 reply; 5+ messages in thread
From: Franziska Naepelt @ 2023-06-11 10:53 UTC (permalink / raw)
  To: franziska.naepelt
  Cc: davem, franziska.naepelt, herbert, linux-crypto, linux-kernel,
	bagasdotme

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
+			  */
 
 	u64 k;	/* k holds all 56 non-parity bits */
 

base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
-- 
2.39.2 (Apple Git-143)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] crypto: fcrypt: Fix block comment
  2023-06-11 10:53 ` [PATCH v2] crypto: fcrypt: Fix block comment Franziska Naepelt
@ 2023-06-11 14:56   ` Randy Dunlap
  2023-06-12 17:23     ` Franziska Näpelt
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2023-06-11 14:56 UTC (permalink / raw)
  To: Franziska Naepelt
  Cc: davem, franziska.naepelt, herbert, linux-crypto, linux-kernel,
	bagasdotme

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] crypto: fcrypt: Fix block comment
  2023-06-11 14:56   ` Randy Dunlap
@ 2023-06-12 17:23     ` Franziska Näpelt
  0 siblings, 0 replies; 5+ messages in thread
From: Franziska Näpelt @ 2023-06-12 17:23 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: davem, herbert, linux-crypto, linux-kernel, bagasdotme

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-12 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 11:10 [PATCH] crypto: frcypt Fix checkpatch warnings Franziska Naepelt
2023-06-06 11:36 ` Bagas Sanjaya
2023-06-11 10:53 ` [PATCH v2] crypto: fcrypt: Fix block comment Franziska Naepelt
2023-06-11 14:56   ` Randy Dunlap
2023-06-12 17:23     ` Franziska Näpelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).