Skip to contentSkip to conversation

rsxx: remove extraneous 'const' qualifier

PATCH Applied Arnd Bergmann 2 participants 2 messages Mar 23, 2021 – Mar 24, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rsxx: remove extraneous 'const' qualifier

From: Arnd Bergmann <[email protected]>

The returned string from rsxx_card_state_to_str is 'const', but the other qualifier doesn't change anything here except causing a warning with 'clang -Wextra':

drivers/block/rsxx/core.c:393:21: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] static const char * const rsxx_card_state_to_str(unsigned int state)

Fixes f37912039eb0 ("block: IBM RamSan 70/80 trivial changes.")
---
 drivers/block/rsxx/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/rsxx/core.c +1 -1
index 5ac1881396af..813b0a554d4a 100644
@@ -392,7 +392,7 @@ static irqreturn_t rsxx_isr(int irq, void *pdata)
 }
 
 /*----------------- Card Event Handler -------------------*/
-static const char * const rsxx_card_state_to_str(unsigned int state)
+static const char *rsxx_card_state_to_str(unsigned int state)
 {
 	static const char * const state_strings[] = {
 		"Unknown", "Shutdown", "Starting", "Formatting",
Signature · 1 line
2.29.2
maintainer Applied
#1 lore raw
Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The returned string from rsxx_card_state_to_str is 'const', but the other qualifier doesn't change anything here except causing a warning with 'clang -Wextra':

drivers/block/rsxx/core.c:393:21: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] static const char * const rsxx_card_state_to_str(unsigned int state)

Applied, thanks Arnd.

Signature · 1 line
Jens Axboe