From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) (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 5B0132C80 for ; Sun, 10 Oct 2021 10:54:58 +0000 (UTC) Received: by mail-il1-f181.google.com with SMTP id k3so6515406ilu.2 for ; Sun, 10 Oct 2021 03:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5XE9nYv4QLj7PH0x+jUZTOYUi6igVt6xodhzd4pePic=; b=AVi63/mMVoi7nSP5HLzyyGjhmHmtLENmB+z+r/yNTGifrIQVg+Kw5XPmKbywcpi/D2 FQ3KIq41i0vut5jWOAz5NaTrBk2nlkR9BmYmC6llQ0k6jRX/rF57TYagfGya2D6zCA5W qsH+AtsYUgzeWCe8wTIvJKLfKRD59VUhoSNhfgKHNxXSlAwWOE8lMAjSj+6A67FmObBv G/G3a/jG7s7kEUAQUAcC1y7kh05tt9pyyQVaAbX8QC12zsnw9SlYb6fZwCBK00kXmlxg nyHi6d5bLaddpt6eIS21Xcdfj2Ed5osPLRUfUhrhbAiax0BCpM2VW+dwMoBkZVw7buuj iSjQ== 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=5XE9nYv4QLj7PH0x+jUZTOYUi6igVt6xodhzd4pePic=; b=WZmAXk7vhjuxIHoRMlHJI4jmoof+amTqttsHEySDdlTBojjGcczMjAEZHO2RptqFAx yZTazkyegz98AX5dCAeYVrhgxJiExHCDfOA48Ae0Kb2r0Xfgm+xa6jLfBAExDIOVwc75 EvCI7yPlUKipQjcxrzrq5TGIsc/TBfItExFqoTGAXeN6t8twC2Se4KpOnApVXDcOusHX eeJ3v7OBGxr17PCuNFEj1NteFp9QfgBv2IVjiZK1yC5v1Z1d15wWzIvVyEglYClb9JH8 UkXO8CT+2So6KWk5hXLjDL7VJG1mwu4Osfx6K09aYQrvAu8Na2sor0Go9vzqDnuAR6Gz A2iw== X-Gm-Message-State: AOAM531MM3vQfmJriCE98GH7hryLFEZJxYszhhJFPnSDE/F0r5zcoe2O i46zQwlWLarbRUapUtIi5mHhJYKvUmgi6CeRq/E= X-Google-Smtp-Source: ABdhPJyS7AiaHFm4pLpQVcJeOIj1vQ5N2xYulagQKC2cqTzcR8laa2/7yzM0teidB/4sqL5yvuezOqjRBmlxAGh1P4E= X-Received: by 2002:a05:6e02:20cb:: with SMTP id 11mr15319369ilq.237.1633863297374; Sun, 10 Oct 2021 03:54:57 -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: Miguel Ojeda Date: Sun, 10 Oct 2021 12:54:46 +0200 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: Marc Zyngier Cc: 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 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 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 I will send a couple patches. Cheers, Miguel 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 AB9C7C433F5 for ; Sun, 10 Oct 2021 10:57:13 +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 7592C60F45 for ; Sun, 10 Oct 2021 10:57:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7592C60F45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=h3Kr7RavDQZZsF6J/KxbrCmpbAOcrU2gHnonWFbFVco=; b=bccibmvQZ4GUKy tun6FKmnAoc0tG+7F8cWhchlkJ2OyKVvz9l1SEAbVgbhsDzcXKegukVt8Z9xYNdUuhpVxTE7wJyr5 W6wCS1aZ7BhgXXj6l7UotcCATix/tHOwAMESXbyWkvGFBPLuz38er11u93ybFBgNvG+JgklEccaUD 6tOXnGyymFVsSWgaPBSII1ItLPHJrA2gciYxV0xNj9EkSvQj/e8QoXEluTJ1/4tMqQPbK4hl1Ay8E GdbQ4T179bJAu2hUB9WY8RuPS+PEGtPKZM1KGV/sshNJQS/K8Pykgjhok7XNnAuTw6hshDLTA4i11 y0dcIiyIJ5UGUDJlOEkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZWU1-006d4U-Cs; Sun, 10 Oct 2021 10:55:09 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZWTx-006d3q-00 for linux-arm-kernel@lists.infradead.org; Sun, 10 Oct 2021 10:55:06 +0000 Received: by mail-il1-x12a.google.com with SMTP id a8so2689492ilj.10 for ; Sun, 10 Oct 2021 03:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5XE9nYv4QLj7PH0x+jUZTOYUi6igVt6xodhzd4pePic=; b=AVi63/mMVoi7nSP5HLzyyGjhmHmtLENmB+z+r/yNTGifrIQVg+Kw5XPmKbywcpi/D2 FQ3KIq41i0vut5jWOAz5NaTrBk2nlkR9BmYmC6llQ0k6jRX/rF57TYagfGya2D6zCA5W qsH+AtsYUgzeWCe8wTIvJKLfKRD59VUhoSNhfgKHNxXSlAwWOE8lMAjSj+6A67FmObBv G/G3a/jG7s7kEUAQUAcC1y7kh05tt9pyyQVaAbX8QC12zsnw9SlYb6fZwCBK00kXmlxg nyHi6d5bLaddpt6eIS21Xcdfj2Ed5osPLRUfUhrhbAiax0BCpM2VW+dwMoBkZVw7buuj iSjQ== 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=5XE9nYv4QLj7PH0x+jUZTOYUi6igVt6xodhzd4pePic=; b=7JRnOEF6V5UPWdl9J8n0t42aHKGUAhUXcB3szFSr8I363Rs8VqP5ZMla5Sx2i+fAXL 60g+5/ulzZC5WQHPIIdy8/fj+zqzgPmcpRQRNuMA6HEW5WVyL06/cMmRfIFOJf/2IWVG p/0l8Vuyp0dcs1N7OZIWXjnvLIrf/wnEfg4SERC4jwLOpfwGIJbNT7MRq1T2KrJBlnF9 btmlU9baR+bkDx3IRgsgITOJpb9I/1b0jN9XbTbBsH58z/dRBtH3iq4M4N5Z6RZTcl1/ y+HpJurgcbr8qecUjt5hsXceWacBohPMMt1E0WE7+EhRlDproDKhKoOjUrVoZtfv+WmI lkuA== X-Gm-Message-State: AOAM531ImyEbRVN1Q2mEI+ZHjO/JlfjZGt72u0z2QJfZPHYjrvECAoUE d4EXisCL8/OYFylsdv926axx6SZrf5hKI0/NTMI= X-Google-Smtp-Source: ABdhPJyS7AiaHFm4pLpQVcJeOIj1vQ5N2xYulagQKC2cqTzcR8laa2/7yzM0teidB/4sqL5yvuezOqjRBmlxAGh1P4E= X-Received: by 2002:a05:6e02:20cb:: with SMTP id 11mr15319369ilq.237.1633863297374; Sun, 10 Oct 2021 03:54:57 -0700 (PDT) MIME-Version: 1.0 References: <202110100514.3h9CI4s0-lkp@intel.com> In-Reply-To: From: Miguel Ojeda Date: Sun, 10 Oct 2021 12:54:46 +0200 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: Marc Zyngier Cc: 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-20211010_035505_085116_48174F2B X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. 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 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 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 I will send a couple patches. Cheers, Miguel _______________________________________________ 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="===============4173501489485195108==" MIME-Version: 1.0 From: Miguel Ojeda 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: Sun, 10 Oct 2021 12:54:46 +0200 Message-ID: In-Reply-To: List-Id: --===============4173501489485195108== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 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 I will send a couple patches. Cheers, Miguel --===============4173501489485195108==--