Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4864111ybi; Tue, 30 Jul 2019 09:26:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyry2/x2+njSOqokoutmml5Ov3y7JyHhy8TrmFAMn0egCxz0QeqJTLz3yXsbyzi22TZgRtY X-Received: by 2002:a17:90a:db52:: with SMTP id u18mr118913418pjx.107.1564503987432; Tue, 30 Jul 2019 09:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564503987; cv=none; d=google.com; s=arc-20160816; b=KnZogtwG0rxTFZ8YgmYoHcz3yexmQmIOyfgmd90TvKLMRwgIgG3ZI6Ro0KWpR8cnU3 HDQ61cmUVThln/sUpE2nJ+fEAQrsz8yU5nx9WP7/wKw9dQdiI09l3wm8eVdRvpQm+cSX VJa/YbzHfuaC4B3lCb69yKwPKPg2WR1t7AFtiFVm+rUetMY+HRiZHE7ewdm+VUb44hg/ me/qVqfHimwqh6WvvRth2z72SFM1BOUX3J4p87dt1lSpYE8rs8ZGVkO/clLxbG+QNDZe T2SH9cMpmlUTYCpM5Un7fcFGQruDwseMsmuYL2b1MqcjRcAU4VBhZ6+pnSbQI07TD5Vk 4jYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:in-reply-to:subject:cc:to:from:date; bh=rRGE93wk7d4Tm0OVzNTVHR2WX5ukwWKRiaZZmVXwkr0=; b=XrAIA0yt7TYp59cI6pSrCAouTqWa9iBLC25i6ZHW80MXZjETu9FitOB5C4/ya9bdmd CiQEw1/glLeEyxWgVRw/pJwtYniNf3TC5uGgaI8SeAnh4h0wxYFFyGiQbihYYPbkIPY6 VDdsjzyIG2/F/XG+gbj+fZLknuA4vbaSwn1r/e2iMClYEq+pXLtqT14E1yT09wv0++3l UeOKzqn3Au/9PRdBT1O7VoJDTQ8gMKGJ6TnoOyG70CLECow1Ma884XuWwozDjc55+Y3Q 2PM2pEYiPDJbsROcOPCnbJ2pG4AVQeMq3Ao6kQqfG0DSfDeVUUZYM+GEExlfbdFE0C65 u4TQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d6si27974971pjc.7.2019.07.30.09.26.11; Tue, 30 Jul 2019 09:26:27 -0700 (PDT) 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; 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 S1728187AbfG3Nvh (ORCPT + 99 others); Tue, 30 Jul 2019 09:51:37 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:37792 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726969AbfG3Nvh (ORCPT ); Tue, 30 Jul 2019 09:51:37 -0400 Received: (qmail 1723 invoked by uid 2102); 30 Jul 2019 09:51:36 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 30 Jul 2019 09:51:36 -0400 Date: Tue, 30 Jul 2019 09:51:36 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Gustavo A. R. Silva" cc: Greg Kroah-Hartman , , , Kees Cook Subject: Re: [PATCH] usb: host: ohci-tmio: Mark expected switch fall-throughs In-Reply-To: <20190729222201.GA19408@embeddedor> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Jul 2019, Gustavo A. R. Silva wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: arm): > > drivers/usb/host/ohci-tmio.c: In function ‘tmio_stop_hc’: > ./include/linux/device.h:1499:2: warning: this statement may fall through [-Wimplicit-fallthrough=] > _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/usb/host/ohci-tmio.c:99:4: note: in expansion of macro ‘dev_err’ > dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports); > ^~~~~~~ > In file included from drivers/usb/host/ohci-hcd.c:1257:0: > drivers/usb/host/ohci-tmio.c:100:3: note: here > case 3: > ^~~~ > drivers/usb/host/ohci-tmio.c:101:7: warning: this statement may fall through [-Wimplicit-fallthrough=] > pm |= CCR_PM_USBPW3; > ^ > drivers/usb/host/ohci-tmio.c:102:3: note: here > case 2: > ^~~~ > drivers/usb/host/ohci-tmio.c:103:7: warning: this statement may fall through [-Wimplicit-fallthrough=] > pm |= CCR_PM_USBPW2; > ^ > drivers/usb/host/ohci-tmio.c:104:3: note: here > case 1: > ^~~~ > > Signed-off-by: Gustavo A. R. Silva > --- Acked-by: Alan Stern > drivers/usb/host/ohci-tmio.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c > index d5a293a707b6..fb6f5e9ae5c6 100644 > --- a/drivers/usb/host/ohci-tmio.c > +++ b/drivers/usb/host/ohci-tmio.c > @@ -97,10 +97,13 @@ static void tmio_stop_hc(struct platform_device *dev) > switch (ohci->num_ports) { > default: > dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports); > + /* fall through */ > case 3: > pm |= CCR_PM_USBPW3; > + /* fall through */ > case 2: > pm |= CCR_PM_USBPW2; > + /* fall through */ > case 1: > pm |= CCR_PM_USBPW1; > } >