From patchwork Tue Jul 30 04:37:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 1138763 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45yP2K4Hh8z9s3Z for ; Tue, 30 Jul 2019 14:38:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="CTRXVnpH"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45yP2K0SMszDqTn for ; Tue, 30 Jul 2019 14:38:33 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45yP0d0Q2FzDqQM for ; Tue, 30 Jul 2019 14:37:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="CTRXVnpH"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45yP0c5bvwz9s3Z; Tue, 30 Jul 2019 14:37:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1564461424; bh=ZEK/SveL+CYAKkTNLqtDMeYcvcYDJezeg9+KKvNlKX8=; h=Date:From:To:Cc:Subject:From; b=CTRXVnpHci8dgwsm4WCheU0z7Wo7RhRqoLsYsB9dHCqCAqBuW/V0C43fq8dnSdqvS G89D86dDP6iOiXMy8YMBGh2U1E/PJJ/5SWBNYjbgsfAGPeUslwM4+vBhb5otx/bCEq tZhSdPCRoaUnXhl0Ow8yRxkYjcSxI+ORx4sY8wbCtQQz53lnfw7rutolOzGJwWnEEG /uKoL12TKT610vhMFkemVe9d0L8Ta1ky8eRa+QqOG8i/QMA65E/nJTqEtn6BYPorL0 JSDh1womcDyczzaJOwKPC2lQ5oEckKnnlJPqO42sAOyr7NRXvfWft3BMrQ+49kPLFr ncu6ya2dz0k4w== Date: Tue, 30 Jul 2019 14:37:04 +1000 From: Stephen Rothwell To: Benjamin Herrenschmidt , Michael Ellerman Subject: [PATCH] drivers/macintosh/smu.c: Mark expected switch fall-through Message-ID: <20190730143704.060a2606@canb.auug.org.au> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux kernel Mailing List , PowerPC , Kees Cook , "Gustavo A. R. Silva" Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: powerpc): drivers/macintosh/smu.c: In function 'smu_queue_i2c': drivers/macintosh/smu.c:854:21: warning: this statement may fall through [-Wimplicit-fallthrough=] cmd->info.devaddr &= 0xfe; ~~~~~~~~~~~~~~~~~~^~~~~~~ drivers/macintosh/smu.c:855:2: note: here case SMU_I2C_TRANSFER_STDSUB: ^~~~ Cc: Benjamin Herrenschmidt Cc: Gustavo A. R. Silva Cc: Kees Cook Signed-off-by: Stephen Rothwell Reviewed-by: Kees Cook --- drivers/macintosh/smu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 276065c888bc..23f1f41c8602 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -852,6 +852,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd) break; case SMU_I2C_TRANSFER_COMBINED: cmd->info.devaddr &= 0xfe; + /* fall through */ case SMU_I2C_TRANSFER_STDSUB: if (cmd->info.sublen > 3) return -EINVAL;