Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1273217rwi; Thu, 27 Oct 2022 13:36:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TdCnj/gQFg6Mu0O0Z0eifQzqifFUHAzTx8clt27eg3UENZcdpy3l4SiepA6Wz9B+7SROv X-Received: by 2002:a63:1455:0:b0:438:e26b:ab1f with SMTP id 21-20020a631455000000b00438e26bab1fmr42304835pgu.183.1666902996761; Thu, 27 Oct 2022 13:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666902996; cv=none; d=google.com; s=arc-20160816; b=DntfJUiUaWJrhenifLlxHrJucvyfbcKLhiF41Qr5FiwAOcVzimvPcJIxXlYlyA6O5s /ZZFdRgPB7N91m6xAIxb+IvhcEMvyp2SmGT7JkOmAipF+mmlnzDSgLC19XPtSH2cTr5u ZTxi9VmjrNsd1rivOZi+J0X7XDoqlIf0ytufDVTPSG16wpH5p59P64GnzCjHXgWTdh8u ubeNuaEQS02ZiazeGSJ46qYV5b5tkVx+VasgOE01vmCLMHWnN9m88/NxApIxcj0gEZwO iZp3u/c51kxZcvHHoHsikMJkNnU26ahUX5IC2EFrLs9tFTmsjFqqgSP/Vd+z9XoEclgG esDw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=KRtI9GuQ6PTGVpNqeb+df3N+5lKMG/yG+eRcjuiQKMI=; b=0bE/p1KzN9XFPfilotl5gElUMeCNWFB+LP6HQsIsC4YPPGY2rhTTG1Z++d6eU5RlHX JS7i3oMMnG5sa/7A1c9w0rNg8jEi54jcqYj2UGJYU1hhbjMQHSfWX0Vv9N0VAg4rqpD5 NrLukDzwY/0ajKpmD2qJ/aiW7gbumDQ1wvwToq5Io/12QhsUHqVabps/LMz44q9tHJEV gJCqanSu9bBEQowf3hx8H1nRdDbUtLcjxRISIT0XQjT8xfTVIS0Bx/NVT7dz1+EhdiKb iyrdgEVkiJJp3xfVia+/2gVb98/+BwogSl/Ov8Ud/CvBkE8tFCytfdFqlk/A/q5rpCYZ G17g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cVO/GHMP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u32-20020a634560000000b0042b57d7bc14si2651995pgk.763.2022.10.27.13.36.25; Thu, 27 Oct 2022 13:36:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cVO/GHMP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236688AbiJ0Tw7 (ORCPT + 99 others); Thu, 27 Oct 2022 15:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236017AbiJ0Tw5 (ORCPT ); Thu, 27 Oct 2022 15:52:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C5E885A83; Thu, 27 Oct 2022 12:52:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AC730624C8; Thu, 27 Oct 2022 19:52:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DB6CC433D6; Thu, 27 Oct 2022 19:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666900376; bh=35cFf88kblVuwSgahftZiRQRYQbkqp7M3ibAvifLwnQ=; h=From:To:Cc:Subject:Date:From; b=cVO/GHMPGprH3caldUb141wNEv7znCzlhkzwQLKHBqih2wnXFR+D+D4eKDbHATdLz dmzTEtzhKzDBiwuSVaqPaLx4W3HZDODH1ekvGQww03b4+ZekZP8rwtzymg44UuGrbk k9BmDtzXMNTrFDsSC6MRQMCITRguw3Syjmr41rSesBwO+pmfRHjasHfZ6stfA3gXvT 6HSyNo+uWu692nnxZbv2iD4nCJ5cEKdADcZP7sVyh8ydAnvLdOonHcztKU7HGfoziK AUxnGf/++G+ioNTD1on1w7LF0ddmyYdoJNLlpOMAHGizjtEGmS3nOUkS8gBnM0S8Ji HOhhsfsmrbYzg== From: Nathan Chancellor To: Jean Delvare , Guenter Roeck Cc: Nick Desaulniers , Tom Rix , Quan Nguyen , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor Subject: [PATCH -next] hwmon: (smpro-hwmon) Add missing break in smpro_is_visible() Date: Thu, 27 Oct 2022 12:52:38 -0700 Message-Id: <20221027195238.1789586-1-nathan@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Clang warns: drivers/hwmon/smpro-hwmon.c:378:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ drivers/hwmon/smpro-hwmon.c:378:2: note: insert 'break;' to avoid fall-through default: ^ break; 1 error generated. Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Fixes: a87456864cbb ("hwmon: Add Ampere's Altra smpro-hwmon driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1751 Signed-off-by: Nathan Chancellor --- drivers/hwmon/smpro-hwmon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/smpro-hwmon.c b/drivers/hwmon/smpro-hwmon.c index ee54e21c2c12..667e88b6bae5 100644 --- a/drivers/hwmon/smpro-hwmon.c +++ b/drivers/hwmon/smpro-hwmon.c @@ -375,6 +375,7 @@ static umode_t smpro_is_visible(const void *data, enum hwmon_sensor_types type, return 0; break; } + break; default: break; } base-commit: 0ffb687b6508c36a17b99bdaf014b38532404182 -- 2.38.1