From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 1A50D2C86 for ; Mon, 11 Oct 2021 20:18:49 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id j5so78469466lfg.8 for ; Mon, 11 Oct 2021 13:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n8r6Eq/JMcjkN0ZqJKuReu5qRAy4ITYHI9vmmF+JdJo=; b=NtmF9bF8PwFZsVoBkDBLlHiIEq5NS1CO1bKeo1QHXAO7iACVHj4B7BEPWBMsAy0AgS WWs47YPUzohMoPPlpeLr2i6azNYgYtZwasiyM7bNqUBxLxZAg0XuMCdE2lUUaZpgGQci hwwP8J2L5qNypHYWHim8APpYpbEnGN29IuLnMQuv68sKFnRTCFk7HGr79M3PWdIpH171 xI0CNHleGrGLLops5OJAwDpM5HiA9cbV+KeR4fo2iU1zjKVrgygQEy2VMG0SPLLL2aQI lXdAHpmNcOPUd3w1zJI71RaLuwdFFvuscx+APi44PUEbg3GDjs5eEm3BObF8ZVLwBKsi csYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n8r6Eq/JMcjkN0ZqJKuReu5qRAy4ITYHI9vmmF+JdJo=; b=WCLaqeYEygz30z4TahjBpijOZiOG/2ALs3WyRa0Rxmxnahormt0PNzuSx8Y87JV0+T JT7Y0z10tDEjv1DirYNbVuHt1tPXdVdIUSGzPk31bSD8xwWFOIG1YRjbJEkgfq9qkMGA 0E2jYKyEL1IPXXg3nyuLC85Y94AsuDxgxtaVw8s5eN31sRZPnhOlJnGVyLMRxKmDbJrC hFhySUvk7rfTotyHHoXpV9qbrMeM/3Ra6PXhgBZvy5z1XVXN93Cyh+Kw7+gVs0gfYv3v 6kUU6Quf0o7asuuQeMlVsRQHvm3hQLssDK7BdoEiSpk7l26230TTRz0v0p3kVfKEIP49 p72w== X-Gm-Message-State: AOAM533vZnpxG3+S9l8Mtq3diqszMX+9WrkSq2fSPXwVHH7oKppwsS1X jv8Lz2RiUR7HgnWxe4UsjAOMcMaeE49qP/HyYUF9QQ== X-Google-Smtp-Source: ABdhPJwRADUpXou6T1dlw2E7GruUX22YRuxAl4AGqokNW066BWA4Ctk8kyXdbAkSIIW2DTJv3ACYA0atIDm2BwTBzhQ= X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr11621735ljo.220.1633983526894; Mon, 11 Oct 2021 13:18:46 -0700 (PDT) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202110100514.3h9CI4s0-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 11 Oct 2021 13:18:34 -0700 Message-ID: Subject: Re: [arm-platforms:timers/tval-ectomy 2/17] drivers/clocksource/arm_arch_timer.c:156:3: warning: variable 'val' is used uninitialized whenever switch default is taken To: Miguel Ojeda Cc: Marc Zyngier , kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux ARM , Oliver Upton , Mark Rutland Content-Type: text/plain; charset="UTF-8" On Sun, Oct 10, 2021 at 3:55 AM Miguel Ojeda wrote: > > On Sun, Oct 10, 2021 at 11:37 AM Marc Zyngier wrote: > > > > I think the problem squarely lies with the compiler (or the > > way it interprets the BUILD_BUG helper). If it cannot see that > > BUILD_BUG() trumps the control flow analysis, then this warning > > is totally useless. > > The fake, generated `__compiletime_assert` should be annotated > `__noreturn`. That gives enough information to the compiler to avoid > the warning: https://godbolt.org/z/x1v69jjYY SGTM, please do. > > And we should also move `__compiletime_{error,warning}` to compiler > attributes since Clang trunk has it now, so that we catch the error > earlier: https://godbolt.org/z/jd8Eb9Mf1 Didn't I send a patch for that? b83a908498d68fafca931e1276e145b339cac5fb is in mainline. -- Thanks, ~Nick Desaulniers 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 477A6C433F5 for ; Mon, 11 Oct 2021 20:21:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08D1060E54 for ; Mon, 11 Oct 2021 20:21:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 08D1060E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s/Bpelhx3urclSLka90ZhYgecJ/J6PWctWjReJyWVik=; b=r9O4DRgDlWLGD5 y27IBI5/dMlFRCDZNctAYgEP6hUioC4ikdBO1cvWAdnWfjgDFeQo7aCB0ukMttNcfLSMa+X/75BUI 7OF7MKajIqKlJesKocHsEe8B7GBQbc685AXYBEJyY/+QQCGounTgWs9xQdhxmrAdYPtszp7bu4o5T jWXuzdg/fDIIRxaSkgtLP8eYekYjiA/9QaoERp+lD1AEQ2RvzbX/Biwbucu81mzWs4mrnAmItOOpZ 7eyl9kQZqmIs87QMr+oulLTVLyfi61b3eI7VPZqmYtmE5VSPasJkMdABrrOvGntFEGJhyokDDEmsD B3Qy1PytFNSgjBEAsfKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ma1lE-00AaPt-8u; Mon, 11 Oct 2021 20:19:00 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ma1lA-00AaOc-8c for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 20:18:57 +0000 Received: by mail-lf1-x134.google.com with SMTP id r19so75707314lfe.10 for ; Mon, 11 Oct 2021 13:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n8r6Eq/JMcjkN0ZqJKuReu5qRAy4ITYHI9vmmF+JdJo=; b=NtmF9bF8PwFZsVoBkDBLlHiIEq5NS1CO1bKeo1QHXAO7iACVHj4B7BEPWBMsAy0AgS WWs47YPUzohMoPPlpeLr2i6azNYgYtZwasiyM7bNqUBxLxZAg0XuMCdE2lUUaZpgGQci hwwP8J2L5qNypHYWHim8APpYpbEnGN29IuLnMQuv68sKFnRTCFk7HGr79M3PWdIpH171 xI0CNHleGrGLLops5OJAwDpM5HiA9cbV+KeR4fo2iU1zjKVrgygQEy2VMG0SPLLL2aQI lXdAHpmNcOPUd3w1zJI71RaLuwdFFvuscx+APi44PUEbg3GDjs5eEm3BObF8ZVLwBKsi csYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n8r6Eq/JMcjkN0ZqJKuReu5qRAy4ITYHI9vmmF+JdJo=; b=BEscRlrYvhTLxymCCdqR2eWP2HCtYFpJ5U00+EZkhqRM7nMNGnOcxCg/XUlaJhcZ/R o45NcYs3/9M6gApcOgYQqr/r1g4t89PEXcsOlGfQ3tC5bNwwsTODFaQjF1fhNkyNQunD M5KSw2gLizT06SEsf+Bi9guBkU25xTMvzZVMCq3bJKacLKRMehN17pG3tao/o0KgZaLH FPKR1JmIPzx+/OPZgxmSzSi6ZOocTSIaZQf5pUCXNlB0rk+2SHRK1yLsjbe/TdO7OCWK nnH3p6eRkRvK5rpQ091SewJTW7zD/N/+NFatLK3Vznf9lT7W+KFXpjASQGlkT5u/F+T/ F6SA== X-Gm-Message-State: AOAM533RaYyQwh3LMuu9XgghBtQTUzInrnzOOlusMnjgrrB6bqKaZaZc 0dJlWgIVYTMM0s+feYiSk5U6Un0TsXFPHVS3DljIcIYj8S+Cdw== X-Google-Smtp-Source: ABdhPJwRADUpXou6T1dlw2E7GruUX22YRuxAl4AGqokNW066BWA4Ctk8kyXdbAkSIIW2DTJv3ACYA0atIDm2BwTBzhQ= X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr11621735ljo.220.1633983526894; Mon, 11 Oct 2021 13:18:46 -0700 (PDT) MIME-Version: 1.0 References: <202110100514.3h9CI4s0-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Mon, 11 Oct 2021 13:18:34 -0700 Message-ID: Subject: Re: [arm-platforms:timers/tval-ectomy 2/17] drivers/clocksource/arm_arch_timer.c:156:3: warning: variable 'val' is used uninitialized whenever switch default is taken To: Miguel Ojeda Cc: Marc Zyngier , kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux ARM , Oliver Upton , Mark Rutland X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_131856_329540_6F90FCA4 X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 10, 2021 at 3:55 AM Miguel Ojeda wrote: > > On Sun, Oct 10, 2021 at 11:37 AM Marc Zyngier wrote: > > > > I think the problem squarely lies with the compiler (or the > > way it interprets the BUILD_BUG helper). If it cannot see that > > BUILD_BUG() trumps the control flow analysis, then this warning > > is totally useless. > > The fake, generated `__compiletime_assert` should be annotated > `__noreturn`. That gives enough information to the compiler to avoid > the warning: https://godbolt.org/z/x1v69jjYY SGTM, please do. > > And we should also move `__compiletime_{error,warning}` to compiler > attributes since Clang trunk has it now, so that we catch the error > earlier: https://godbolt.org/z/jd8Eb9Mf1 Didn't I send a patch for that? b83a908498d68fafca931e1276e145b339cac5fb is in mainline. -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8805060594137424140==" MIME-Version: 1.0 From: Nick Desaulniers To: kbuild-all@lists.01.org Subject: Re: [arm-platforms:timers/tval-ectomy 2/17] drivers/clocksource/arm_arch_timer.c:156:3: warning: variable 'val' is used uninitialized whenever switch default is taken Date: Mon, 11 Oct 2021 13:18:34 -0700 Message-ID: In-Reply-To: List-Id: --===============8805060594137424140== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Sun, Oct 10, 2021 at 3:55 AM Miguel Ojeda wrote: > > On Sun, Oct 10, 2021 at 11:37 AM Marc Zyngier wrote: > > > > I think the problem squarely lies with the compiler (or the > > way it interprets the BUILD_BUG helper). If it cannot see that > > BUILD_BUG() trumps the control flow analysis, then this warning > > is totally useless. > > The fake, generated `__compiletime_assert` should be annotated > `__noreturn`. That gives enough information to the compiler to avoid > the warning: https://godbolt.org/z/x1v69jjYY SGTM, please do. > > And we should also move `__compiletime_{error,warning}` to compiler > attributes since Clang trunk has it now, so that we catch the error > earlier: https://godbolt.org/z/jd8Eb9Mf1 Didn't I send a patch for that? b83a908498d68fafca931e1276e145b339cac5fb is in mainline. -- = Thanks, ~Nick Desaulniers --===============8805060594137424140==--