From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B566C4742C for ; Mon, 16 Nov 2020 07:31:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAA0E20684 for ; Mon, 16 Nov 2020 07:31:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="tgpcn+OS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727521AbgKPHaW (ORCPT ); Mon, 16 Nov 2020 02:30:22 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49562 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbgKPHaV (ORCPT ); Mon, 16 Nov 2020 02:30:21 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AG722CR079802; Mon, 16 Nov 2020 02:30:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=VHNxyxnhRygWhPh7u6PPy+e4MDCuK+5zMCSvg6qk98U=; b=tgpcn+OSZvDwpur5i1ZEG2klUSl8atqs0f1HAPGnAw6hcYETKysmzhy400ICRh0EFcGl 3GPxy+ZHgwQJB4egCmjcquxY0YRmzuPL/Jz0Mw8FY46NPyB9tT/nyC31FUAefZ/emWDJ 2/x+8K0fqKeIzpDYp0cYlHNGenLcBC42xilAmAQox+/sPo84yS/HA5ILS5UNZx3pvOE9 vIhF638IlqiyktAat1ekeRnetsRhbEUlOjCrqtaut05m2YeERwUC2rRAczJrmpGQxabS ukL1wiLzo/SLJzTHCjM5Qfvnd7yK9IwIhFNKm0SjUS11vOZ36htJAjggByvgvptWw54x 4g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34umkf8qsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 02:30:17 -0500 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0AG7DLmu122803; Mon, 16 Nov 2020 02:30:16 -0500 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 34umkf8qru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 02:30:16 -0500 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AG7SSfI005052; Mon, 16 Nov 2020 07:30:15 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma01fra.de.ibm.com with ESMTP id 34t6v88x6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 07:30:14 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AG7UC1D3605234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Nov 2020 07:30:12 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBC59A406A; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 789E0A4062; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.171.92.115]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) Subject: Re: [PATCH] md: dm-writeback: add __noreturn to BUG-ging function To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Mikulas Patocka , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Heiko Carstens , Vasily Gorbik , linux-s390@vger.kernel.org References: <20201113225228.20563-1-rdunlap@infradead.org> From: Christian Borntraeger Message-ID: <344abf76-9405-58ba-2dc4-27cab88c974d@de.ibm.com> Date: Mon, 16 Nov 2020 08:30:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201113225228.20563-1-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-16_01:2020-11-13,2020-11-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 clxscore=1011 impostorscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011160039 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > Cc: Mikulas Patocka > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: dm-devel@redhat.com > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > 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(); > } > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1109DC55ABD for ; Mon, 16 Nov 2020 07:30:41 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E1982225B for ; Mon, 16 Nov 2020 07:30:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E1982225B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-449-Ro9WAuFIMaugJi8SXYLBsw-1; Mon, 16 Nov 2020 02:30:36 -0500 X-MC-Unique: Ro9WAuFIMaugJi8SXYLBsw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB8A810866A3; Mon, 16 Nov 2020 07:30:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 569CC60BF1; Mon, 16 Nov 2020 07:30:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CD50D58112; Mon, 16 Nov 2020 07:30:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AG7UMti031568 for ; Mon, 16 Nov 2020 02:30:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8D2E32068FE8; Mon, 16 Nov 2020 07:30:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 885E6205EB13 for ; Mon, 16 Nov 2020 07:30:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57AD885828F for ; Mon, 16 Nov 2020 07:30:20 +0000 (UTC) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-292-0ys7QPJYM4yGuPCPCIJe0g-1; Mon, 16 Nov 2020 02:30:17 -0500 X-MC-Unique: 0ys7QPJYM4yGuPCPCIJe0g-1 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AG721nw079683; Mon, 16 Nov 2020 02:30:17 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34umkf8qs8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 02:30:17 -0500 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0AG7DLmt122803; Mon, 16 Nov 2020 02:30:16 -0500 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 34umkf8qru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 02:30:16 -0500 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AG7SSfI005052; Mon, 16 Nov 2020 07:30:15 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma01fra.de.ibm.com with ESMTP id 34t6v88x6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Nov 2020 07:30:14 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AG7UC1D3605234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Nov 2020 07:30:12 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBC59A406A; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 789E0A4062; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.171.92.115]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 Nov 2020 07:30:10 +0000 (GMT) To: Randy Dunlap , linux-kernel@vger.kernel.org References: <20201113225228.20563-1-rdunlap@infradead.org> From: Christian Borntraeger Message-ID: <344abf76-9405-58ba-2dc4-27cab88c974d@de.ibm.com> Date: Mon, 16 Nov 2020 08:30:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201113225228.20563-1-rdunlap@infradead.org> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-16_01:2020-11-13, 2020-11-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 clxscore=1011 impostorscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011160039 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: dm-devel@redhat.com Cc: linux-s390@vger.kernel.org, Mike Snitzer , Vasily Gorbik , Heiko Carstens , dm-devel@redhat.com, Mikulas Patocka , Alasdair Kergon Subject: Re: [dm-devel] [PATCH] md: dm-writeback: add __noreturn to BUG-ging function X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 > Cc: Mikulas Patocka > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: dm-devel@redhat.com > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > 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(); > } > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel