Skip to contentSkip to conversation

crypto: powerpc/vmx - clean up includes, metadata, and p8_init()

PATCH In review Thorsten Blum 5 participants 5 messages Sep 14 – Sep 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: powerpc/vmx - clean up includes, metadata, and p8_init()

In p8_init(), remove the goto statement and return ret directly.

Remove any redundant includes, add a missing space in MODULE_AUTHOR(), and join the MODULE_DESCRIPTION() strings for better grepability.

Also remove MODULE_VERSION(). It has never been updated and the kernel release better reflects the module version.

---
 arch/powerpc/crypto/vmx.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
arch/powerpc/crypto/vmx.c +3 -11
index 08da5311dfdf..8abc4db8ee4e 100644
@@ -8,12 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/err.h>
 #include <linux/cpufeature.h>
-#include <linux/crypto.h>
-#include <asm/cputable.h>
 #include <crypto/internal/skcipher.h>
 
 #include "aesp8-ppc.h"
@@ -24,7 +19,7 @@ static int __init p8_init(void)
 
 	ret = crypto_register_skcipher(&p8_aes_cbc_alg);
 	if (ret)
-		goto err;
+		return ret;
 
 	ret = crypto_register_skcipher(&p8_aes_ctr_alg);
 	if (ret)
@@ -40,7 +35,6 @@ static int __init p8_init(void)
 	crypto_unregister_skcipher(&p8_aes_ctr_alg);
 err_unregister_aes_cbc:
 	crypto_unregister_skcipher(&p8_aes_cbc_alg);
-err:
 	return ret;
 }
 
@@ -54,8 +48,6 @@ static void __exit p8_exit(void)
 module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, p8_init);
 module_exit(p8_exit);
 
-MODULE_AUTHOR("Marcelo Cerri<[email protected]>");
-MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions "
-		   "support on Power 8");
+MODULE_AUTHOR("Marcelo Cerri <[email protected]>");
+MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions support on Power 8");
 MODULE_LICENSE("GPL");
-MODULE_VERSION("1.0.0");
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thorsten Blum

In p8_init(), remove the goto statement and return ret directly.

Remove any redundant includes, add a missing space in MODULE_AUTHOR(), and join the MODULE_DESCRIPTION() strings for better grepability.

Also remove MODULE_VERSION(). It has never been updated and the kernel release better reflects the module version.

Tested-by on v1 1/1
#2 lore raw
In reply to Thorsten Blum
Quoted 9 lines · Thorsten Blum

In p8_init(), remove the goto statement and return ret directly.

Remove any redundant includes, add a missing space in MODULE_AUTHOR(), and join the MODULE_DESCRIPTION() strings for better grepability.

Also remove MODULE_VERSION(). It has never been updated and the kernel release better reflects the module version.

Quoted 50 lines
---
  arch/powerpc/crypto/vmx.c | 14 +++-----------
  1 file changed, 3 insertions(+), 11 deletions(-)
arch/powerpc/crypto/vmx.c +3 -11
index 08da5311dfdf..8abc4db8ee4e 100644
@@ -8,12 +8,7 @@
   */
 
  #include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/err.h>
  #include <linux/cpufeature.h>
-#include <linux/crypto.h>
-#include <asm/cputable.h>
  #include <crypto/internal/skcipher.h>
 
  #include "aesp8-ppc.h"
@@ -24,7 +19,7 @@ static int __init p8_init(void)
 
  	ret = crypto_register_skcipher(&p8_aes_cbc_alg);
  	if (ret)
-		goto err;
+		return ret;
 
  	ret = crypto_register_skcipher(&p8_aes_ctr_alg);
  	if (ret)
@@ -40,7 +35,6 @@ static int __init p8_init(void)
  	crypto_unregister_skcipher(&p8_aes_ctr_alg);
  err_unregister_aes_cbc:
  	crypto_unregister_skcipher(&p8_aes_cbc_alg);
-err:
  	return ret;
  }
 
@@ -54,8 +48,6 @@ static void __exit p8_exit(void)
  module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, p8_init);
  module_exit(p8_exit);
 
-MODULE_AUTHOR("Marcelo Cerri<[email protected]>");
-MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions "
-		   "support on Power 8");
+MODULE_AUTHOR("Marcelo Cerri <[email protected]>");
+MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions support on Power 8");
  MODULE_LICENSE("GPL");
-MODULE_VERSION("1.0.0");
Reviewed-by on v1 1/1
#3 lore raw
In reply to Thorsten Blum
Quoted 13 lines · Thorsten Blum

In p8_init(), remove the goto statement and return ret directly.

Remove any redundant includes, add a missing space in MODULE_AUTHOR(), and join the MODULE_DESCRIPTION() strings for better grepability.

Also remove MODULE_VERSION(). It has never been updated and the kernel release better reflects the module version.

Thanks,
Sudhakar

Quoted 50 lines

---
arch/powerpc/crypto/vmx.c | 14 +++-----------

1 file changed, 3 insertions(+), 11 deletions(-)
arch/powerpc/crypto/vmx.c +1 -6
index 08da5311dfdf..8abc4db8ee4e 100644
@@ -8,12 +8,7 @@
 */
 
 #include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/types.h>
-#include <linux/err.h>
 #include <linux/cpufeature.h>
-#include <linux/crypto.h>
-#include <asm/cputable.h>
 #include <crypto/internal/skcipher.h>
 
 #include "aesp8-ppc.h"
@@ -24,7 +19,7 @@ static int __init p8_init(void)
 
 ret = crypto_register_skcipher(&p8_aes_cbc_alg);
 if (ret)
- goto err;
+ return ret;
 
 ret = crypto_register_skcipher(&p8_aes_ctr_alg);
 if (ret)
@@ -40,7 +35,6 @@ static int __init p8_init(void)
 crypto_unregister_skcipher(&p8_aes_ctr_alg);

err_unregister_aes_cbc:
crypto_unregister_skcipher(&p8_aes_cbc_alg);
-err:
return ret;
}

arch/powerpc/crypto/vmx.c +2 -4
@@ -54,8 +48,6 @@ static void __exit p8_exit(void)
 module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, p8_init);
 module_exit(p8_exit);
 
-MODULE_AUTHOR("Marcelo Cerri<[email protected]>");
-MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions "
-   "support on Power 8");
+MODULE_AUTHOR("Marcelo Cerri <[email protected]>");
+MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions support on Power 8");
 MODULE_LICENSE("GPL");
-MODULE_VERSION("1.0.0");
maintainer
#4 lore raw
In reply to Thorsten Blum
Quoted 5 lines · Thorsten Blum

In p8_init(), remove the goto statement and return ret directly.

Remove any redundant includes, add a missing space in MODULE_AUTHOR(), and join the MODULE_DESCRIPTION() strings for better grepability.

Quoted 7 lines

Also remove MODULE_VERSION(). It has never been updated and the kernel release better reflects the module version.

---
 arch/powerpc/crypto/vmx.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt