Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3308120pxb; Mon, 16 Nov 2020 10:58:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwipE+8mjOr7H/NNbQXzb+HD/KIqcF3wsX7uI0yOvyH+cIIoLjVoCMIUbE26syMLOJLa38B X-Received: by 2002:a17:906:8c6:: with SMTP id o6mr15157928eje.230.1605553117720; Mon, 16 Nov 2020 10:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605553117; cv=none; d=google.com; s=arc-20160816; b=lPQf14cC85xhEvSA3vEj3akHFtDBqVTdgKMr5EI4e9jDG1nPUITMu6r3YgnS4jIaXw DAGTfyjKX3/piBz19hJ5u9T+mNsxL+lSsPwPkBDoHzE0gwg1zY/VlhKIYwrayWDWwD+3 QvLlfVAVst5goe2iMx1u/CTajUv31X5CcJbrLhMLWkZzpxnJatvH54W5Xk86XXyf+ANo U5Do7ITeF3fM07IbuLN/wzRtFWk0epufdbOMDlsiJOlOR0fbs6MH9AkDfus2o2UArmg/ XY4WIHicqwSkPnMpBV++MmjUiqAjIe1YnTXSW1Q20Fj6R26S7RZOALprGwbbBzDTwAbS qbYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=VHNxyxnhRygWhPh7u6PPy+e4MDCuK+5zMCSvg6qk98U=; b=WNsEAM57vDcFVtt+oJDooYOzrBWXUxaeMX19vgqFmaat8nKJWhzyNjmHYUAtHYW4eg rom0YYk2akIfiKjUiGYdSRrG7B3MTSfuzQT+OfxeFaGHUaccrxKx4QTTlgA3eI8IDV42 tVjv/mt5tMxlJ/5ccgfynAohMJIv5iDLNf2wcjJIUyzmEnkoCdK2GD3W1/02Y/vmoFkA 5OivyCJSQe3MEKzaABAA2qkd//3g0gkcyVxvUqY2nP1X9XeFlCxc2hYd9HgQ1O2AdT81 v7zRMULj0vg9+I24SYiiGn6ZzR4pitT4x3XfrDklYOlF8mUxPU57J7gB3pJL+YpdT7Di t4Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tgpcn+OS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh10si12029054ejb.704.2020.11.16.10.58.13; Mon, 16 Nov 2020 10:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=tgpcn+OS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbgKPHaW (ORCPT + 99 others); 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(); > } >