Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp568049pxb; Tue, 15 Feb 2022 22:20:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz64ZpWZ7sjjRtC3ZtS4lmLoV58BMnaCZ0W/w+v+VC6aDuXEazRk5RFTCouB8JJCpGFb4TL X-Received: by 2002:a17:90b:3755:b0:1b8:a1eb:f0db with SMTP id ne21-20020a17090b375500b001b8a1ebf0dbmr61748pjb.155.1644992438604; Tue, 15 Feb 2022 22:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644992438; cv=none; d=google.com; s=arc-20160816; b=FvEUwpacWXhuMqSge3zr6gsnVQgexKbfNgvuDpLUATKTx0Em9GGrMt7bi2vsDiFr/Y hPa+TnUlZZg7X7cpgeeeuDCuKZSjaAsJnqFewXbW+SgvY+b4CObqxK0i7PfQRVAehn3J xdvrGhVsz0ce2NGslG55TJVveeTWf+HH1O23CufshfFGRY7VrP+PVZEseBcvpePeA3Ch OE6fuvcM0oCDcRw5G3zvNu33o4ItfBt334376TDZtxcn2Y3fJYs8MG82SVxfPRgTtvZX B9Lh7Z5t/Rax6lR1zVByzJFVQBSyyqgvdRwRThiHfbztcDFNVNIk0i6geeNjWE2sua1k SRoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MY3aADxCC3BL/PohzEu0vsfChXWJVF+cjGEC42SVfc4=; b=tIUsP+9agmnJ1LUU6PX5e/qQYPrAiPYMgptrSKZWIqfHH3dGZji5PwB3eAt6sURjYZ PHmXTMxp6MP5lJZaBtJJAi2gIiMY3KKKnDNxQPjrzTJT8yujFQY04gsgwKp9wu0IwY09 ZghYWKl0RXAqDW0q3RxtDojdBC40ewKkmAAGzBowGhh8nLbie2PIuHccLU5xrba4MXGq Xk3sQgIyWsiszkQUNWO1EI+i9aAWCs0hERSCkve530fimlP7TurCEPcT5O1HDFsyhj2r kfjt5b7ZbNmp81xAxirfj1MuL9LE/Ss7xZEp9IgGhJAoJFaJlWtSh1a3/mrOh779uLzG YKFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YOLCaXPd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q21si9496073pff.369.2022.02.15.22.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:20:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YOLCaXPd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5777C19FAF2; Tue, 15 Feb 2022 22:18:39 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243958AbiBOWU3 (ORCPT + 99 others); Tue, 15 Feb 2022 17:20:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbiBOWU2 (ORCPT ); Tue, 15 Feb 2022 17:20:28 -0500 X-Greylist: delayed 213 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 15 Feb 2022 14:20:16 PST Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB2460DAE; Tue, 15 Feb 2022 14:20:16 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id C600CFF803; Tue, 15 Feb 2022 22:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1644963615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MY3aADxCC3BL/PohzEu0vsfChXWJVF+cjGEC42SVfc4=; b=YOLCaXPdXS5EuBm2Lx8VycDv2Hgn3lxbEU5NvFy3BGXi5f6FdeJOnoqQyXw4t5A0XWu1vo LdGKY+D9FHdhBOuAwAK8NYtrg1IMPoodgRU99gwMuXKAqUlwf7YD6UjCDHPxKtJ6bsE7vS aZnT7S1nN+eQibzXuoeZGPqnPlMFE5lGxyZSvljgof0bYI51/5LD+6b2ob3M41t6R3GVgS QUEGoT9K/fLKgDtLZxQJmaYKWJ7zk+qKBWVRHbIQyuEE2v7gzNLtcLmr61XeU4jSPqAC7+ +ySe/syr/f6OAX10W4HnmCSbzzVi/OEnfmQmyS5NcnJb/dY5ksYgjoNIce0UGg== From: Alexandre Belloni To: Victor Erminpour , a.zummo@towertech.it Cc: Alexandre Belloni , trivial@kernel.org, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: pcf8523: Fix GCC 12 warning Date: Tue, 15 Feb 2022 23:20:14 +0100 Message-Id: <164496360741.65425.10517543967622435540.b4-ty@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <1644453027-886-1-git-send-email-victor.erminpour@oracle.com> References: <1644453027-886-1-git-send-email-victor.erminpour@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Feb 2022 16:30:27 -0800, Victor Erminpour wrote: > When building with automatic stack variable initialization, GCC 12 > complains about variables defined outside of switch case statements. > Move variables outside the switch, which silences warnings: > > ./drivers/rtc/rtc-pcf8523.c:284:20: error: statement will never be executed [-Werror=switch-unreachable] > 284 | u8 mode; > | > > [...] Applied, thanks! [1/1] rtc: pcf8523: Fix GCC 12 warning commit: 85bcb01f145dc32e7f88e6eebb3b5f96d3b56eb6 Best regards, -- Alexandre Belloni