Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp276725lqj; Wed, 10 Apr 2024 10:03:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkO8fbGbElqPvJ3gButSAscMHL/8PqTLblOADwrXLR5QfzORkmK2API69L93q+YiSd543xlYLE8xlS4jHNGw2s6MKkdDtBGCPzSqmciA== X-Google-Smtp-Source: AGHT+IE/ez/OTSwDE32aVtV4mn/arzicAS+wsjw5XntZWIjfxKZxdX/LN0jIuUaamOHzHak4ovqS X-Received: by 2002:a19:f710:0:b0:513:d3c0:f66 with SMTP id z16-20020a19f710000000b00513d3c00f66mr1880532lfe.51.1712768609680; Wed, 10 Apr 2024 10:03:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712768609; cv=pass; d=google.com; s=arc-20160816; b=MtCFd4UWWlOtKvInmCr0TaF9eC16j/yKjDA61KvwEPej9ojHEm0OSU/QeG6m8XILiI 2T7JIXcx62oUFk2zxYzApoXERvznMhbcSU0YWPHstiSWG5xLgbniaTZSKF0fYJOvvF42 kg/6Tk2DUsZpCn3kY2QEc45gzQX4r9QJ/GWInp6MBHQW8wgMrMottbFJ9mTJBUdlyyW/ AdVUa3Uy5NWhoG7EL8lFBkiGpGt8ScqPBbpIydospWO9VEcelCrdYAwTaKisz+AuG+ct VCEEdFX9MeOx4WH7oUDx3eqaHx0S3KLEE8yv00dgl2ujB4OSclxxBDGlbdo5PvrfgJ0G DcZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=uMoPP11thXk4/7UbTWGCDNVZtlBCq9YfZi08dxGpwkM=; fh=qoK5dNS8FTOW6NKE4/ZQ96OV8WwZRsa9jN2LOkgWoLQ=; b=V1dNJ6JhIjV9nB7uiG6KmShaTc5zVPE4Ybk8tqjyTjmth1dCCt0ZAf1sSoalQpCwRh OhxaNu6xXrE4+tPvsSsznal/+M6ThOwU6QfMpwvIAIJBMgtFfSS51cwqPcq4qzFcrvT1 4ZbiPxjfRG73/0w+q/LC8yuIhOoFMVMNC9kUnM9Q0KW95G2zQSADHsfhiG4nQZq7m4je PURpwEp8wb/edeizKMbElKN9wMANmYPbq507+5wgFYzaCe3QAe+XH6Vd3TF6fN8kapIm Lhh4D1Ds3rafU1WK7EtB+vSW4LO8VHPe2X8HoFaIjs2ieELBMZnVwDK2/RSSV8bnqjmw V/MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gCJdMayQ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-139027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z3-20020a50cd03000000b0056b9efb2407si5991168edi.432.2024.04.10.10.03.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 10:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gCJdMayQ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-139027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9F06F1F2389E for ; Wed, 10 Apr 2024 17:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D676217F385; Wed, 10 Apr 2024 17:02:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gCJdMayQ" Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA2A817F36C for ; Wed, 10 Apr 2024 17:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768551; cv=none; b=Mpe4PuKks53+mfPtbf1MGBvHVzXQJPJAGbl41gQOFAVOZjOjIZn3cqZqn0LUoMdeaDogWhE+aK8Bv8XVwuzZJv4CXDV86oLQs7DlegRPunHpFx9vG0gb9Ti3pzUrcBCf9d+atZvXq43P4gyFuiWUe8HyQhCHw6jjo/7UypZSrnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712768551; c=relaxed/simple; bh=Ro3xK5q4IrY0T9S12NVIoXoa4EqFPVxp3QMVafHPnmk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jiEUKGUWz7lazirvMCkNtg/hQEGNdN4MhnM44bV4vJ2ECUlJKev/DV0cVgQZkjQuyJ4EJItqRxUAmMOXA8aijF3eN2jvrAQOJft8AEcP/B6aRUU7uLxaaGT3JYs/pkGxPyuQQ6ZP50J2Pyl7TxIS5iIFSWGZSBq9WnW8sVHprZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gCJdMayQ; arc=none smtp.client-ip=209.85.167.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-3c60019ee02so483642b6e.0 for ; Wed, 10 Apr 2024 10:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712768548; x=1713373348; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=uMoPP11thXk4/7UbTWGCDNVZtlBCq9YfZi08dxGpwkM=; b=gCJdMayQNcptgjdyj0XaPYS/CKWxiizmrKkPOZNY0BJquD+IwfqjDWiRiNpCUs33P7 +YVtVAie+wmxlztmBDbeqrmxb/AN5GmAoISgmi9wEM3M7BQBgROwPk9vcIy+DEtsYsi1 S+HtUFuuH4cYepRdrbjYd3Sib1mPdNt+lgDkERubGTY/9qmT8+re7qk6sx9vYgGqeMvW 0Rte4kJkErC8SJggf/EXJasb0QhCZP/hJwyukXcOa9Neb7BJjdyxiA3ZJpPAbhjk01Kl Ud9klQBZNxFct+Qj+nPL2xlmiR+eUnAgnrD6+Ey0tGebf3ydWAJ31bKorzKk8VvMsfZ7 1Y2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712768548; x=1713373348; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uMoPP11thXk4/7UbTWGCDNVZtlBCq9YfZi08dxGpwkM=; b=WBV10rg6p53Wt+1nsmg02YqEJWdEGJUreHPlujB59FX8o7ryIBWldKRyDRgD9XJb03 tE+9SNjBip9Abej0oL53NP8fGo+ONHfG9Zi1ppQQH8ki/BgYVOZ5saGjTzN8SDhVayiN MDgEk5oh/9reU9qa8llTw064ICwzyAF4tQP79HSxDA9rw/0ZmKyXpfn6uAuJ6QkEjj5b Pz7a8KLzSNEgcoVxx1VscKMtE3rPMq/y97Z7fChhmLyd4I9SwsTku9TcpgFqMsTh1oe6 tDsZQnbuBeWdTgWTqaq3KNPNh33AOn/K1v52aIW1chRcdm5UQ+cA7Jqn6aUu8yXUEbm+ bZpQ== X-Forwarded-Encrypted: i=1; AJvYcCVYBx6CmcPnVsmaN+Ac3OY1qyG9NguESpOWFjy/PHzX+MqqpPztcGGfHwJoW3hic/iYzDAr3/7nGJWfXeJXaSSJLWsEkaianN9PZU12 X-Gm-Message-State: AOJu0Yx+0x5GtrhRqbQmPTtpuwet//Dw29espOmATG7Xmg7Fb31uA5vG PyMtMS7xQmK7+rcxnxVp2aFcQqTIOD2aZ2WiasrpetPnxHOdcAZt28RqVYakv8UjkLaWsG5Wgj7 X89Qh7qxDI+hR+ct8N+aafAPyDyYuaG54zNQQ5g== X-Received: by 2002:a05:6808:20a3:b0:3c5:f831:5f33 with SMTP id s35-20020a05680820a300b003c5f8315f33mr3792446oiw.16.1712768548028; Wed, 10 Apr 2024 10:02:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240410153212.127477-1-adrian.hunter@intel.com> In-Reply-To: <20240410153212.127477-1-adrian.hunter@intel.com> From: Naresh Kamboju Date: Wed, 10 Apr 2024 22:32:16 +0530 Message-ID: Subject: Re: [PATCH] bug: Fix no-return-statement warning with !CONFIG_BUG To: Adrian Hunter Cc: Thomas Gleixner , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Vincenzo Frascino , John Stultz , Stephen Boyd , Peter Zijlstra , Randy Dunlap , Bjorn Helgaas , Arnd Bergmann , Anna-Maria Behnsen , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 10 Apr 2024 at 21:02, Adrian Hunter wrote= : > > BUG() does not return, and arch implementations of BUG() use unreachable(= ) > or other non-returning code. However with !CONFIG_BUG, the default > implementation is often used instead, and that does not do that. x86 alwa= ys > uses its own implementation, but powerpc with !CONFIG_BUG gives a build > error: > > kernel/time/timekeeping.c: In function =E2=80=98timekeeping_debug_get_n= s=E2=80=99: > kernel/time/timekeeping.c:286:1: error: no return statement in function > returning non-void [-Werror=3Dreturn-type] > > Add unreachable() to default !CONFIG_BUG BUG() implementation. > > Fixes: e8e9d21a5df6 ("timekeeping: Refactor timekeeping helpers") > Reported-by: Naresh Kamboju > Closes: https://lore.kernel.org/all/CA+G9fYvjdZCW=3D7ZGxS6A_3bysjQ56YF7S-= +PNLQ_8a4DKh1Bhg@mail.gmail.com/ > Signed-off-by: Adrian Hunter This patch applied on top of today's Linux next-20240410 tag and build test pass. Tested-by: Linux Kernel Functional Testing > --- > include/asm-generic/bug.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) -- Linaro LKFT https://lkft.linaro.org