Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp518362ybv; Thu, 13 Feb 2020 04:57:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyLHdjZRsP8WDqQSlztYniOJ7dp+Lx2fjOkDeHn0FqrTOL4K7Y/7tR92JrVk9dbdyTTH7Zk X-Received: by 2002:aca:aa05:: with SMTP id t5mr2770627oie.93.1581598672096; Thu, 13 Feb 2020 04:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581598672; cv=none; d=google.com; s=arc-20160816; b=ZBo4PnvOjZqzKUdlKbsus5ghYQ430fmmOErvWJoCnMmIn4BOfJxY6lJtGKJNyFUMU/ llW2NSVKc9y5hv9+YIqJWB49cI4LfLdwdJZl5J4MLHFkIe7HyL6mUKoidacg6xMP4gc7 HmB7wORt2q7u9FZLfUZ5O1VR5kYViLEkDoLwolQjgt/22qNTNtsQGbJlPF7K0OgmRMcH td+oJ6zQKKP7toj8ZeIfATKdxMFpGFfKBYncRCvBePlFqJVaTxjVhNXZhSjQ3j8GF17W CFtfQYEFKQPWtkKXjk3Bix+w5GYiOixBW6hZV8sq2fy8/NKmShnACfLWLQZHtKNIjbKl t+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=60pR3MYiAiUtEIlOJ0Z8w8ckk7rgZScuSFKTb4no23E=; b=WlU9eEspMDBiG8tEzKaRbzG/1vuvH64KtMo00KuXV6wQ3TAZWpFmshiL+/F+ztJyPT V5Iw3XBloh5tqh3AnFg/vR1bVqSe+MXv9XNLS4k3gc79wclVyYQZvKAlpAf9pv1bUH3N yKVLpzuPtSSvaoIIMQzAJeABeiCG9cvwB+Fb5pw2GqUJw/eCSkMWYeseg0lPcc3dWIBV D8zs2nyJ7rkzmkwZhNvjH6dTj502pyXmT6wF5Prkua0VepnywJZ0+Kfrb02tsZRAvxdw H3tzLKL/Nm7Llmu8NHe/y8yFa1ESfKfwW3qkJR7FZDN8PXFQyYWhT3mRlk2vZmg6KjvL by7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A2L+zQ25; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si1015599oth.175.2020.02.13.04.57.39; Thu, 13 Feb 2020 04:57:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A2L+zQ25; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729971AbgBMM5A (ORCPT + 99 others); Thu, 13 Feb 2020 07:57:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:46044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729557AbgBMM5A (ORCPT ); Thu, 13 Feb 2020 07:57:00 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87ACE2168B; Thu, 13 Feb 2020 12:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581598619; bh=hR6bwzbgQ4PVp+wweLDY51C8dgqXKoNzqDDCI8q8+qU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A2L+zQ25Xq+c9Nvo0PBn6EELnbeuVsw/b/+OMFKz1Wk4GWZZAfEkwaBlWEIebjoRe 6t8bYSewpR/qIpxVGbq2UkYKE12suzS4+TygWxlKYaMRhJoFJL6hgB1usAzz8T8I8I zpM4LspbmWWMFq7dRInZmUu7AgjKvyuMPcyPAIhs= Date: Thu, 13 Feb 2020 04:56:59 -0800 From: Greg Kroah-Hartman To: "Gustavo A. R. Silva" , Rasmus Villemoes Cc: Timur Tabi , Li Yang , "Gustavo A. R. Silva" , Anton Vorontsov , kbuild test robot , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough Message-ID: <20200213125659.GB3325929@kroah.com> References: <20200213085401.27862-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213085401.27862-1-linux@rasmusvillemoes.dk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 09:54:00AM +0100, Rasmus Villemoes wrote: > After this was made buildable for something other than PPC32, kbuild > starts warning > > drivers/usb/host/fhci-hcd.c:398:8: warning: this statement may fall > through [-Wimplicit-fallthrough=] > > I don't know this code, but from the construction (initializing size > with 0 and explicitly using "size +=" in the PIPE_BULK case) I assume > that fallthrough is indeed intended. > > Reported-by: kbuild test robot > Fixes: 5a35435ef4e6 (soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE) > Fixes: a035d552a93b (Makefile: Globally enable fall-through warning) > Signed-off-by: Rasmus Villemoes > --- > > Two different Fixes: Obviously my 5a35435ef4e6 is the one that started > making kbuild complain, but that's just because apparently kbuild > doesn't cover a PPC32+USB_FHCI_HCD .config. Note for -stable folks, > just in case 5.3.y is still maintained somewhere: a035d552a93b > appeared in 5.3, but the #define fallthrough that I'm using here > wasn't introduced until 5.4 (294f69e662d15). So either ignore this, > make it /* fallthrough */, or backport 294f69e662d15 to 5.3.y as well. > > drivers/usb/host/fhci-hcd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c > index 04733876c9c6..a8e1048278d0 100644 > --- a/drivers/usb/host/fhci-hcd.c > +++ b/drivers/usb/host/fhci-hcd.c > @@ -396,6 +396,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, > case PIPE_CONTROL: > /* 1 td fro setup,1 for ack */ > size = 2; > + fallthrough; We have an attribute for that? Shouldn't this be /* fall through */ instead? Gustavo, what's the best practice here, I count only a few "fallthrough;" instances in the kernel, although one is in our coding style document, and thousands of the /* */ version. thanks, greg k-h