lkml.org 
[lkml]   [2018]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [dm-devel] [PATCH] dm raid: Remove bogus const from decipher_sync_action() return type
From
Date
Yes, the compiler is right to warn about a meaningless 'const' return by 
value.

Acked-by: Heinz Mauelshagen <heinzm@redhat.com>


On 09/17/2018 10:02 AM, Geert Uytterhoeven wrote:
> 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 <geert@linux-m68k.org>
> ---
> drivers/md/dm-raid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
> index 5ba067fa0c729bc8..c44925e4e4813d24 100644
> --- a/drivers/md/dm-raid.c
> +++ b/drivers/md/dm-raid.c
> @@ -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;

\
 
 \ /
  Last update: 2018-09-17 13:59    [W:0.039 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site