Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4572049ybv; Mon, 17 Feb 2020 01:39:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzg5B5UTRsFQAdVMu3yF177094YVF6yzsiL3lHC4dUm0mQrIQFVFN5/M2nio/UpOs8Ew0Ga X-Received: by 2002:a05:6830:22cd:: with SMTP id q13mr11552830otc.224.1581932350761; Mon, 17 Feb 2020 01:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581932350; cv=none; d=google.com; s=arc-20160816; b=nVogFBBSeHkMhujQN4GEIdWmO3IW6JyTbVdgflo/AGRKUgl81pB/iLT4if0BtfqR4a 2Qvj5BQnFMoiT14s3xx8cjglUU/4vNQXiTUQDI7nf79DfOZyTcgAnwQT406we6HpryVC UM5ZuZAkeFcsTJLQsxl6U6eJRiIRnl39rRI+bkrj8vkeEsAFFpkXs9n0oBmC2KuOvcRw pFdWM8taNXspxQotHTXAoldTd/XMFwxHIOlffJK41W7lckPCBkj9F19Bpy5AyFdsj/zA XU8BjnazG57CxoO9B48sZ5m20+CgmbvtgmQpdLeQgMbvg/vOCqXnSUUP1bcAoH36mhFZ sKcw== 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=ZPgJna2V0iTpeZSvKZ/VsKPBfI5w38+Tw2e4m9VPYHs=; b=s0lwDUFSS+6j3CIt7HZYu4FjJz8wHwAp6MDqZTB+ASTxMtm5/kU4RVjrbllDMREC+e xmDsX7YPtG4SBypmhLcnKzhg1nhXTxQezweL6UjgDOnVt4DBUNSaGSXy8DiyF0hQQfCj qZKaUFnsCXf5q9dintd1w918VeHosU5WnaUQeQvqeUVs4rj/et912YEA9Vh6tZlImIbo lVS6qRCp6I3CGA5e7IclHxlVZ2O2PSD0jEjVk9OaukmGxwZ/N8Y/p5cf/hxaF69jGUs6 ejQU1gs4yMZPIFOf1qxqt22o2Tyk/vkLMEA/4NNWB6LUcN26WN6VOJzUet6KVUSpqCmu 088Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="WxI3/gTy"; 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 j2si6382861otr.255.2020.02.17.01.38.59; Mon, 17 Feb 2020 01:39:10 -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="WxI3/gTy"; 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 S1728919AbgBQJik (ORCPT + 99 others); Mon, 17 Feb 2020 04:38:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:39818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728817AbgBQJik (ORCPT ); Mon, 17 Feb 2020 04:38:40 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 0D2502070B; Mon, 17 Feb 2020 09:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581932319; bh=SuXoQe14sUtU4TExPbAcKe1WLOznzq8a2n5/3rFEUrA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WxI3/gTy9lJamw+rQUW+k+XD45M7AL0Qf+QqRHOetXZDP7JRawLIe6t51RXB79kJg txk44xHI1KGlXHe4ZWKzmq0XHhd7CXerwUjyK1nWeMVNeBtjE2ki1ZFhWGtbwEshWn ixFtOquvRvRPAt45w8Dmyh2b79SCjaNRSBDzIHxA= Date: Mon, 17 Feb 2020 10:38:36 +0100 From: Greg Kroah-Hartman To: Rasmus Villemoes Cc: "Gustavo A. R. Silva" , Timur Tabi , Li Yang , Anton Vorontsov , kbuild test robot , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Perches Subject: Re: [PATCH] usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough Message-ID: <20200217093836.GA37937@kroah.com> References: <20200213085401.27862-1-linux@rasmusvillemoes.dk> <20200213125659.GB3325929@kroah.com> <6ab68169-dde6-b5ba-0909-fa685bd24aac@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ab68169-dde6-b5ba-0909-fa685bd24aac@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 02:35:18PM +0100, Rasmus Villemoes wrote: > 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. But, to be fair, Gustavo went and fixed up thousands of these, with the /* */ version, not the attribute. Gustavo, can coverity notice the "fallthrough;" attribute properly? I don't want to start adding things that end up triggering false-positives. thanks, greg k-h