Skip to contentSkip to conversation

ccree: Removed a sparse warning in ssi_fips.h

PATCH In review rishabh hardas 2 participants 2 messages Jul 30, 2017 – Jul 31, 2017

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

PATCH 1/1 ccree: Removed a sparse warning in ssi_fips.h

Sparse was giving out a warning 'warning: symbol 'cc_set_ree_fips_status' was not declared. Should it be static?' which has been removed by making it static.

---
 drivers/staging/ccree/ssi_fips.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ccree/ssi_fips.h +1 -1
index 369ddf9..846bd55 100644
@@ -40,7 +40,7 @@ static inline int ssi_fips_init(struct ssi_drvdata *p_drvdata)
 }
 
 static inline void ssi_fips_fini(struct ssi_drvdata *drvdata) {}
-void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok) {}
+static void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok) {}
 void fips_handler(struct ssi_drvdata *drvdata) {}
 
 #endif /* CONFIG_CRYPTO_FIPS */
#1 lore raw

Hi Rishabh,

Thanks you for spotting this.

Quoted 22 lines · rishabh hardas

Sparse was giving out a warning 'warning: symbol 'cc_set_ree_fips_status' was not declared. Should it be static?' which has been removed by making it static.

---
 drivers/staging/ccree/ssi_fips.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ccree/ssi_fips.h +1 -2
index 369ddf9..846bd55 100644
@@ -40,7 +40,7 @@ static inline int ssi_fips_init(struct ssi_drvdata *p_drvdata)
 }
 
 static inline void ssi_fips_fini(struct ssi_drvdata *drvdata) {}
-void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok) {}
+static void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok) {}
 void fips_handler(struct ssi_drvdata *drvdata) {}
 
 #endif /* CONFIG_CRYPTO_FIPS */
--
Quoted 2 lines

2.7.4

A better modifier here would be "static inline". While you're at it you can also apply it to the fips_handler() function below.

Also, please use a descriptive title, maybe: "declare compiled out func static inline"

Last, please CC ALL the appropriate mailing lists. Use the kernel get_maintainer script to find out which if you are unsure.

Thanks again,
Gilad

Signature · 6 lines
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru