Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp556494ybv; Thu, 13 Feb 2020 05:36:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzb8Ho/2WT2onrgxJUnYbTWh/EQd0KyXDfZm4OgMKPLVEOHHlZJ3t+3B7NmhsawlhVHIQEh X-Received: by 2002:aca:1c0d:: with SMTP id c13mr2801469oic.44.1581601011644; Thu, 13 Feb 2020 05:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581601011; cv=none; d=google.com; s=arc-20160816; b=Mx/crdtR9iPOylb9frVMK6fjDaqWUsIdIEADYpHRQDJKuoFRRoPPAPf32f8WeW2Ic3 PyfFSV8X92fh2XYAidAm5BVAr7zDo1uzQ4wI4RA1sL4VsNjFvmvnCF3ebPv4vhr16SC4 wxODwt2ju1LU9NdlBvNvP0EsQ52OwQgUwclJLT/7syBjd38/yojDgyZ6g6stkmH9PduI eyQexcpzLX0Amqd5xMmB5t2TxwyClp4Bxmqpj1PfwEmsh5TNOl+18aPCn51IRFwHshkN bDen38ZZn6xHVV4ATniMKV84HzYfQRzPJjbzKUM3aajh+c0eVXHTnLdZz9mYF6lBA4fg ctTA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KWOsuSgQgOL7wag+7Zev3PUsMegHiG8hmXGzf91gx4A=; b=Uo8JgivZqOzLOq6N/sIA4mVLMCMfp5BCuDXVymQi7G25aouNikwIxLYFMXm4KL+U81 V5cg5Sz445yPAz6Ukl73w8UhY4xZs8hPzTztxEvMsO/aKe3OZDqqKxFk6VZmHmZLtIEH LIPxTeQxWiouYvOo0Wj6bNPwstOwveB8ffIkiJXuel4KRnXHNAwbn/Wv/4Yq2URNxE31 L3Vo4AElSo1cdw0hYDUtgni3HGEerKnvJbe/95VNJ8SV2jun6bUwXuoclSa+0Zm9Q/Ce XaFUG0mgUwmFe3oAjRji5AO4CuZDjOo9jBYBUmTnSz4bhT25KRKDs3VAqAb+9OgfpANQ NuIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=arqhuLqs; 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 c5si1076714otp.108.2020.02.13.05.36.38; Thu, 13 Feb 2020 05:36:51 -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=arqhuLqs; 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 S1729985AbgBMNfW (ORCPT + 99 others); Thu, 13 Feb 2020 08:35:22 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34357 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729588AbgBMNfW (ORCPT ); Thu, 13 Feb 2020 08:35:22 -0500 Received: by mail-lf1-f66.google.com with SMTP id l18so4311021lfc.1 for ; Thu, 13 Feb 2020 05:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KWOsuSgQgOL7wag+7Zev3PUsMegHiG8hmXGzf91gx4A=; b=arqhuLqs/E6D16lkxGCHsGDvmVRl5t8HacQehp4Kn1EcoS1+CJNLzm7gsMOFzDWvC7 DpALBVmLi5L7NS2eVOYRucGEcO0Rv8HQ9CtREqiBBnkxbm3dRVgAUuu0jYsQLH9bK29z 5e6GPawBTyLK9rlvKBYi1tdT/GYjimkxb2B8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KWOsuSgQgOL7wag+7Zev3PUsMegHiG8hmXGzf91gx4A=; b=mr5cE2C4tJtpQnDHQabyUcyY6qK6EKtL72Xu5JRI1Z5+QdXFqR74yYMoPh5r2eD6Pu YLGzOkhmE8g3YFNJXPsx66HEv2e0wjUz2Ck4QksGkNXlgirCAI7m2Ww2WVMAlO8eICzZ KUa1B5uuN45pJOdVoAWQVvO/VbUz19VlpR1cxyIPJ5zbxro+YevMyEeqtkJcqMjvX3st 9GQr6Da67Ieask+Ni3LtuNCouBu4/i9QTzhiZeHlM7OkOjylCFB/trUVjScfCkz/ZuMW +AOQ3JQuRmIBGLsInYlH4LqS9195bHdThxQWj49v/D7CkI8tCvhqxOgIVVe4wPlGrbkp Hgjw== X-Gm-Message-State: APjAAAX7fX+HndlKRshATxxN2gzJmIBrnLxrZJkkvmZiCKRYWNQdl79I YsqfTRtV6545YKTu19EAZuu6Og== X-Received: by 2002:ac2:5e2e:: with SMTP id o14mr9546346lfg.198.1581600920427; Thu, 13 Feb 2020 05:35:20 -0800 (PST) Received: from [172.16.11.50] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id e25sm1420775ljp.97.2020.02.13.05.35.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Feb 2020 05:35:19 -0800 (PST) Subject: Re: [PATCH] usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough To: Greg Kroah-Hartman , "Gustavo A. R. Silva" Cc: Timur Tabi , Li Yang , Anton Vorontsov , kbuild test robot , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Perches References: <20200213085401.27862-1-linux@rasmusvillemoes.dk> <20200213125659.GB3325929@kroah.com> From: Rasmus Villemoes Message-ID: <6ab68169-dde6-b5ba-0909-fa685bd24aac@rasmusvillemoes.dk> Date: Thu, 13 Feb 2020 14:35:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200213125659.GB3325929@kroah.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/02/2020 13.56, Greg Kroah-Hartman wrote: >> 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. Yes, I went with the attribute/macro due to that, and the history is that Linus applied Joe's patches directly (https://lore.kernel.org/lkml/CAHk-=whOF8heTGz5tfzYUBp_UQQzSWNJ_50M7-ECXkfFRDQWFA@mail.gmail.com/), so I assumed that meant the Penguin decided that the attribute/macro is the right thing to do for new code, while existing comment annotations can be left alone or changed piecemeal as code gets refactored anyway. Rasmus