From: Heinz Mauelshagen <heinzm@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Mike Snitzer <snitzer@redhat.com>,
Alasdair Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [dm-devel] [PATCH] dm raid: Remove bogus const from decipher_sync_action() return type
Date: Mon, 17 Sep 2018 13:58:31 +0200 [thread overview]
Message-ID: <3623d6d7-a94f-2a35-83a9-dd475136d936@redhat.com> (raw)
In-Reply-To: <20180917080234.10909-1-geert@linux-m68k.org>
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;
prev parent reply other threads:[~2018-09-17 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 8:02 Geert Uytterhoeven
2018-09-17 11:58 ` Heinz Mauelshagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3623d6d7-a94f-2a35-83a9-dd475136d936@redhat.com \
--to=heinzm@redhat.com \
--cc=agk@redhat.com \
--cc=arnd@arndb.de \
--cc=dm-devel@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®