crypto: atmel - Fix -Wunused-const-variable warning
authorYueHaibing <yuehaibing@huawei.com>
Thu, 22 Aug 2019 14:44:44 +0000 (22:44 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Aug 2019 08:05:31 +0000 (18:05 +1000)
drivers/crypto/atmel-i2c.h:68:3: warning:
 error_list defined but not used [-Wunused-const-variable=]

error_list is only used in atmel-i2c.c,
so just move the definition over there.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-i2c.c
drivers/crypto/atmel-i2c.h

index dc876fab2882f3f88f858b5c56c419df5c23b42c..1d3355913b4092696d71a7fdca8eca9197ead350 100644 (file)
 #include <linux/workqueue.h>
 #include "atmel-i2c.h"
 
+static const struct {
+       u8 value;
+       const char *error_text;
+} error_list[] = {
+       { 0x01, "CheckMac or Verify miscompare" },
+       { 0x03, "Parse Error" },
+       { 0x05, "ECC Fault" },
+       { 0x0F, "Execution Error" },
+       { 0xEE, "Watchdog about to expire" },
+       { 0xFF, "CRC or other communication error" },
+};
+
 /**
  * atmel_i2c_checksum() - Generate 16-bit CRC as required by ATMEL ECC.
  * CRC16 verification of the count, opcode, param1, param2 and data bytes.
index 21860b99c3e35b8ce4985162714bf995e9af5ff8..63b97b104f16f580db069a788335dc2f706f5b85 100644 (file)
@@ -62,18 +62,6 @@ struct atmel_i2c_cmd {
 #define STATUS_NOERR                   0x00
 #define STATUS_WAKE_SUCCESSFUL         0x11
 
-static const struct {
-       u8 value;
-       const char *error_text;
-} error_list[] = {
-       { 0x01, "CheckMac or Verify miscompare" },
-       { 0x03, "Parse Error" },
-       { 0x05, "ECC Fault" },
-       { 0x0F, "Execution Error" },
-       { 0xEE, "Watchdog about to expire" },
-       { 0xFF, "CRC or other communication error" },
-};
-
 /* Definitions for eeprom organization */
 #define CONFIG_ZONE                    0