Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp18076pxb; Tue, 17 Aug 2021 17:57:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLYJPos2OVJG0VOrd9s8hYbViXnWAy8WA4LYfiYMnaLQoR6EotyDOzNLeb3RW1GAS1YnvC X-Received: by 2002:a6b:905:: with SMTP id t5mr5012425ioi.209.1629248275849; Tue, 17 Aug 2021 17:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629248275; cv=none; d=google.com; s=arc-20160816; b=AwJzdR6Jn8vrCKMd84mmAXMXLBp6pPp10ZFMBlvbXwmjEW6uKeUtMx3Y4OuGQGb/8/ nmepazno6gjaewAFkYh1jtePsiBt1AaV1kj88n4d1VcL+vFX5udv3d+ozgkjHpA4s25C 5MOb/RhxK+UKXrqOGsytHXa9nn6Q/3ufm60p78QBdNP5rjnwr9v3TF9wrBM74rvVNnRT SqpUCmqxcYyfS6f0RkYf6xuS0c8B90dh+c+bWKxRy6p4CgUPGyyxWcBc9lJ+vDb7lEn1 JO2A39hf1mGgd3mmlwKUa6qRLBpRblZ6dGwPHXoYp45VPwlnNyfgviBDwcuRJZCVx+TZ h9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=Zz+2Cl8Uy7Fh+ejBShZ+UblbJYguC8B5HiE28CeGbhs=; b=S9K2phcelSBrqZ8t9ZWXgciFiCeHFYVHvUdda6C2a2m4o2+ofSA9qKHjq9ZBiv8+Lj kOBPlvWlGUoXb9GtU6+fegJaCp7p8kVCJi9bO6vyvqUnJ6vOyKh/g4z67UZ+gqrAkk4B so18BTPeDEq/wDodOvUPk3yw1AGEADxWHzMCwByFG3fKw8++xkZ5rbGr5G4dZ8fX6+6b FMKdrEv/kPsL3q7svCJNYHIY3Q8IXYxmh6SK20kk/SuLWxgl7ZfqQ59ULI3Oz8SVsxK8 A/wieqqEtI710x6Z3XwrYTp00FaHXUawgslnQZ/DdMXo3EsJxqG3ECp+Atdu5ICerY9S 7faw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Ov5ucLyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k16si4911361iow.1.2021.08.17.17.57.39; Tue, 17 Aug 2021 17:57:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Ov5ucLyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237128AbhHRAyq (ORCPT + 99 others); Tue, 17 Aug 2021 20:54:46 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45833 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235604AbhHRAyp (ORCPT ); Tue, 17 Aug 2021 20:54:45 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AA9665C0178; Tue, 17 Aug 2021 20:54:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 17 Aug 2021 20:54:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Zz+2Cl 8Uy7Fh+ejBShZ+UblbJYguC8B5HiE28CeGbhs=; b=Ov5ucLyuSWx9/V7SgvPj2S teM9PIItYKVZFzRtMVZ4TqJRDKVSJAm/7oCzvcLV8nhtybayC6WGm+fHWzvdw4aK +66i7T1Aq8gGLtCf3szmh1qK3zHW2vJ5R0oSs92w1vQ2Jk5/pn9QqwYWrclkERvY NXhdJUnn9XWq0EOh+YZ+FpDiDVHKsOEO9CuhrBJOqaaDwQQHbAeTpvBr4s/ncHkl wx/rCW2E7Ilx+N5z03jWLslhX+r+/9UO4S7vS709C85O61vfPv7k5eHSFZuX31gB gT3k6CEVs/UXHz9aqTTDKo/T3pyCPD6HhoIOouwYZqR5qul7P/b5XRL+gba1SAbg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleeggdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpefhihhnnhcuvfhh rghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtth gvrhhnpeffudfhgeefvdeitedugfelueegheekkeefveffhfeiveetledvhfdtveffteeu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfth hhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Aug 2021 20:54:08 -0400 (EDT) Date: Wed, 18 Aug 2021 10:54:06 +1000 (AEST) From: Finn Thain To: Nathan Chancellor cc: =?UTF-8?Q?Kai_M=C3=A4kisara?= , "James E.J. Bottomley" , "Martin K. Petersen" , "Gustavo A. R. Silva" , Nick Desaulniers , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] scsi: st: Add missing break in switch statement in st_ioctl() In-Reply-To: <20210817235531.172995-1-nathan@kernel.org> Message-ID: <7843ce6b-92ae-7b6c-1fc-acb0ffe2bbc0@linux-m68k.org> References: <20210817235531.172995-1-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Aug 2021, Nathan Chancellor wrote: > Clang + -Wimplicit-fallthrough warns: > > drivers/scsi/st.c:3831:2: warning: unannotated fall-through between > switch labels [-Wimplicit-fallthrough] > default: > ^ > drivers/scsi/st.c:3831:2: note: insert 'break;' to avoid fall-through > default: > ^ > break; > 1 warning generated. > > Clang's -Wimplicit-fallthrough is a little bit more pedantic than GCC's, > requiring every case block to end in break, return, or fallthrough, > rather than allowing implicit fallthroughs to cases that just contain > break or return. Add a break so that there is no more warning, as has > been done all over the tree already. > > Fixes: 2e27f576abc6 ("scsi: scsi_ioctl: Call scsi_cmd_ioctl() from scsi_ioctl()") > Signed-off-by: Nathan Chancellor > --- > drivers/scsi/st.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c > index 2d1b0594af69..0e36a36ed24d 100644 > --- a/drivers/scsi/st.c > +++ b/drivers/scsi/st.c > @@ -3828,6 +3828,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg) > case CDROM_SEND_PACKET: > if (!capable(CAP_SYS_RAWIO)) > return -EPERM; > + break; > default: > break; > } > > base-commit: 58dd8f6e1cf8c47e81fbec9f47099772ab75278b > Well, that sure is ugly. Do you think the following change would cause any static checkers to spit their dummys and throw their toys out of the pram? @@ -3828,6 +3828,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg) case CDROM_SEND_PACKET: if (!capable(CAP_SYS_RAWIO)) return -EPERM; + break; - default: - break; }