Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp319636ybv; Thu, 13 Feb 2020 00:56:11 -0800 (PST) X-Google-Smtp-Source: APXvYqyPpjBLX2TFarWegwoaC0xpLnGLceto8rec8L14lsTL3rm8MHMOf1BAwFAlqmm7BTL5mSI4 X-Received: by 2002:a9d:6a48:: with SMTP id h8mr12625564otn.264.1581584171800; Thu, 13 Feb 2020 00:56:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581584171; cv=none; d=google.com; s=arc-20160816; b=uLzbACtH4CTJI9MCrN45tC1UK30P8c3JxP0HIwKcS2zYFcXphBW5N01EuJ9E8qUmds KJr4pTM5hRDmYE8GzJEGKBDtqLw8Uu8eUH4Eov9iftD7bktV1ztEekm7V7t3YZQIqjT8 uAMqNWoSa5Ad3XkgSpD3x7L/yYAwRPQSztKc/MPSB+Us2yb1Z7nLtVk9VO4+bQQFGNCv JoghBhL+L2M/CWk2h6TZIIU/Eef/0K5o+ClqJ8SpdrJZTo/sbRE3olDVjM4BiA+ZsE0p vPV11I5VdF1PE9oFDDmiOH52pBlforsMo+a1de/S3VTZjq9ErCy93AzelwtJ4Cd2Hve+ sauw== 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:date:subject:cc:to:from:dkim-signature; bh=4rkGF5v8vVDO4e6MS975js5HBclxWpED/LpMGJ9Hey0=; b=avOtUv0PKIw0kKUBb8ixo6NtwHHHkl869/3j3/e1xKgRWD0tiKGKQ/nBLOkq3gmAzd VAvt2fPYoSN/m3FsP/wLu+WXCJpUuT5s+vDg11+IWfMIVUx3c2eh1FmrftbBHzYjgehs 5X+/py3NhGjPD/1I+otjOhtW1sSWrVZAUb+f7XiqBLsOwZqPjysGPsMz/hkm/xoU/Hf0 nOK1asbgZPrNQo9IRr4s1luA7Cpt8fO0REqvq+qq40v0I8o9V4IzweCw5f7L9sXvAX4v 9F4fb1lTwAWaQ/9F2nunvkwaMXrSTO9mB0zTXkByRwvmAcA1nqM/IFbGe80qYX1Ycs18 9HkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=NZZYkVhg; 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 l14si848774oic.222.2020.02.13.00.55.56; Thu, 13 Feb 2020 00:56:11 -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=@rasmusvillemoes.dk header.s=google header.b=NZZYkVhg; 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 S1729559AbgBMIyK (ORCPT + 99 others); Thu, 13 Feb 2020 03:54:10 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38814 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729485AbgBMIyJ (ORCPT ); Thu, 13 Feb 2020 03:54:09 -0500 Received: by mail-lj1-f194.google.com with SMTP id w1so5644757ljh.5 for ; Thu, 13 Feb 2020 00:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4rkGF5v8vVDO4e6MS975js5HBclxWpED/LpMGJ9Hey0=; b=NZZYkVhgDADY3Ce/7aWSfp11q9xMdrEsM9cTzr53u4TTDFfdWqyd1tDLbiJPEsMUIL nrdHXw7yMCpASuFZT8HdPBUOmSr5SiPyHGz7I4gCQxWPYEcM7fcN4IojRYzUu0vNgtoS KtnddPHF+VlRj2imrmImc3aduXSr+In5jlqFY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4rkGF5v8vVDO4e6MS975js5HBclxWpED/LpMGJ9Hey0=; b=WygQxCT8c7fNx4TVZKkDDlEFXbMfZBWGdtPkfOuw8wk0zhrh5+84gORwXFES4Wm/W8 6zSK9YJey54rDIp/IY7KStX7mj9fDX0YqFpEOYI+7EMnITof3o6oPdQHpa+XwpVXXt54 6u+jUMOgT5ExCKvmyFkDFOJEhwgyGPcSzuYk2pb7O/erCeodRi7DjGTZqL2VD/5lL3K3 RzNQaZbcsK3ki1zqTSR2JDi3xQOP5XArOSzD5A+ItkyKDpKLn3LN1+/hlsE11yB9Kdf1 OrXuXeDUsvzX1xeCZYAwcgLxomBt1ktnKMD3nplEu27YM1DKxP/Txpfp0a23U2WJ2XNz UuxA== X-Gm-Message-State: APjAAAXOVB0+y58tR7jsHnqOfHMX5MQyB9HBUd1NlGGpRSn5frkT7f+R MA8uxsuJegxXZickq+I/2fiW6g== X-Received: by 2002:a2e:9e16:: with SMTP id e22mr10980352ljk.220.1581584047321; Thu, 13 Feb 2020 00:54:07 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id 5sm966893lju.69.2020.02.13.00.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 00:54:06 -0800 (PST) From: Rasmus Villemoes To: Greg Kroah-Hartman , Timur Tabi , Li Yang , Rasmus Villemoes , "Gustavo A. R. Silva" Cc: Anton Vorontsov , kbuild test robot , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough Date: Thu, 13 Feb 2020 09:54:00 +0100 Message-Id: <20200213085401.27862-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; case PIPE_BULK: /* one td for every 4096 bytes(can be up to 8k) */ size += urb->transfer_buffer_length / 4096; -- 2.23.0