From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Mikulas Patocka <mpatocka@redhat.com>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@redhat.com, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] md: dm-writeback: add __noreturn to BUG-ging function
Date: Mon, 16 Nov 2020 08:30:10 +0100 [thread overview]
Message-ID: <344abf76-9405-58ba-2dc4-27cab88c974d@de.ibm.com> (raw)
In-Reply-To: <20201113225228.20563-1-rdunlap@infradead.org>
On 13.11.20 23:52, Randy Dunlap wrote:
> Building on arch/s390/ flags this as an error, so add the
> __noreturn attribute modifier to prevent the build error.
>
> cc1: some warnings being treated as errors
> ../drivers/md/dm-writecache.c: In function 'persistent_memory_claim':
> ../drivers/md/dm-writecache.c:323:1: error: no return statement in function returning non-void [-Werror=return-type]
ok with me, but I am asking why
the unreachable macro is not good enough. For x86 it obviously is.
form arch/s390/include/asm/bug.h
#define BUG() do { \
__EMIT_BUG(0); \
unreachable(); \
} while (0)
>
> Fixes: 48debafe4f2f ("dm: add writecache target")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Mikulas Patocka <mpatocka@redhat.com>
> Cc: Alasdair Kergon <agk@redhat.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: dm-devel@redhat.com
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: linux-s390@vger.kernel.org
> ---
> drivers/md/dm-writecache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20201113.orig/drivers/md/dm-writecache.c
> +++ linux-next-20201113/drivers/md/dm-writecache.c
> @@ -317,7 +317,7 @@ err1:
> return r;
> }
> #else
> -static int persistent_memory_claim(struct dm_writecache *wc)
> +static int __noreturn persistent_memory_claim(struct dm_writecache *wc)
> {
> BUG();
> }
>
next prev parent reply other threads:[~2020-11-16 7:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 22:52 Randy Dunlap
2020-11-16 7:30 ` Christian Borntraeger [this message]
2020-11-16 23:00 ` Randy Dunlap
2020-11-17 16:31 ` Mike Snitzer
2020-11-18 15:49 ` Mike Snitzer
2020-11-18 16:07 ` Mike Snitzer
2020-11-18 16:35 ` Christian Borntraeger
2020-11-18 16:38 ` Randy Dunlap
2020-11-18 21:24 ` Mikulas Patocka
2020-11-20 14:08 ` Mike Snitzer
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=344abf76-9405-58ba-2dc4-27cab88c974d@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=rdunlap@infradead.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®