dm raid: Remove bogus const from decipher_sync_action() return type
PATCH 1/1 dm raid: Remove bogus const from decipher_sync_action() return type
With gcc-4.1.2:
drivers/md/dm-raid.c:3357: warning: type qualifiers ignored on function return type
Remove the "const" keyword to fix this.
Fixes 36a240a706d43383 ("dm raid: fix RAID leg rebuild errors")
Signed-off-by Geert Uytterhoeven <[email protected]>
--- drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-raid.c +1 -1
@@ -3353,7 +3353,7 @@ static const char *sync_str(enum sync_state state) };/* Return enum sync_state for @mddev derived from @recovery flags */ -static const enum sync_state decipher_sync_action (struct mddev *mddev,unsigned long recovery) +static enum sync_state decipher_sync_action (struct mddev *mddev,unsigned long recovery) {if (test_bit (MD_RECOVERY_FROZEN , &recovery))return st_frozen;
Signature · 1 line
2.17.1
Yes, the compiler is right to warn about a meaningless 'const' return by value.
Quoted 25 lines · Geert Uytterhoeven
With gcc-4.1.2:
drivers/md/dm-raid.c:3357: warning: type qualifiers ignored on function return typeRemove the "const" keyword to fix this.
Fixes 36a240a706d43383 ("dm raid: fix RAID leg rebuild errors")Signed-off-by Geert Uytterhoeven <[email protected]>--- drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/dm-raid.c +1
-1@@ -3353,7 +3353,7 @@ static const char *sync_str(enum sync_state state) };/* Return enum sync_state for @mddev derived from @recovery flags */ -static const enum sync_state decipher_sync_action (struct mddev *mddev,unsigned long recovery) +static enum sync_state decipher_sync_action (struct mddev *mddev,unsigned long recovery) {if (test_bit (MD_RECOVERY_FROZEN , &recovery))return st_frozen;