From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80B43C433E0 for ; Mon, 3 Aug 2020 20:14:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 245F32075A for ; Mon, 3 Aug 2020 20:14:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="3KQCWpB4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 245F32075A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HGGv9g5ijdVYwS4lVeNyddSekvu5IhvIucEGpn8IyZI=; b=3KQCWpB45h8AINsNo/nu5A+Wt E6142tclLqn9cBs1NbkMP44jVNZZrSVdzOrUZmCRWZ6UzHK9oPRDUbHg86R1hxEanhRTCgFSv7Wxa 2sP8Rskbz3C50CfBO26Ogn0ZRrGp4Dk83qVRj3Ka+kMmCN8sS98mW0H4QlKslFNpxivOVcB/gV4W7 WLuPLoJeiwFvazoe+KVTYdKGqdVJ7KOHI4xnIfs0Oz+PPCEohzbVACZHRQp1EN0xYEyQp/WF4mMFX OumhBiUxcdwDbckE8U9m79IfuVwMkzljtLH2uRvG4D27Db45Pk5u74mrby5RyC7+ePSpeGsnEUzU8 wJ2UxpX1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2gok-0003kG-Tn; Mon, 03 Aug 2020 20:12:18 +0000 Received: from asavdk3.altibox.net ([109.247.116.14]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2goi-0003jS-0j for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2020 20:12:17 +0000 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id D00AF20023; Mon, 3 Aug 2020 22:12:10 +0200 (CEST) Date: Mon, 3 Aug 2020 22:12:09 +0200 From: Sam Ravnborg To: Joe Perches Subject: Re: [PATCH][next] fbdev: Use fallthrough pseudo-keyword Message-ID: <20200803201209.GA579791@ravnborg.org> References: <20200707210539.GA12530@embeddedor> <20200803194024.GA525506@ravnborg.org> <101585b1d3c2a9db8fe394c51f64115e8bfc1754.camel@perches.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <101585b1d3c2a9db8fe394c51f64115e8bfc1754.camel@perches.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=f+hm+t6M c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=VwQbUJbxAAAA:8 a=JD9iRpnvPCjC92fAJV8A:9 a=CjuIK1q_8ugA:10 a=1F1461vogZIA:10 a=5kKzt1m56AEA:10 a=AjGcO6oz07-iQ99wixmX:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_161216_325329_A7955C5B X-CRM114-Status: GOOD ( 28.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Antonino Daplas , Timur Tabi , Bartlomiej Zolnierkiewicz , Benjamin Herrenschmidt , dri-devel@lists.freedesktop.org, "Gustavo A. R. Silva" , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, Jingoo Han , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 03, 2020 at 12:52:40PM -0700, Joe Perches wrote: > On Mon, 2020-08-03 at 21:41 +0200, Sam Ravnborg wrote: > > On Tue, Jul 07, 2020 at 04:05:39PM -0500, Gustavo A. R. Silva wrote: > > > Replace the existing /* fall through */ comments and its variants with > > > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary > > > fall-through markings when it is the case. > > > > > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through > > > > > > Signed-off-by: Gustavo A. R. Silva > > > > Thanks. > > > > Fixed indent in arcfb.c while applying. > > Applied to drm-misc-next and it will appear in 5.10 > > Perhaps better would be to fix all the switch / case > brace uses so that it looks more typical kernel style. falltrhough seems like an OK thing to do even if fbdev is in pure maintenance mode. Mostly so tools do not stumble upon this and we continue to see patches. But larger refactorings seems a little pointless. If we do this change, should we then also start to accept indent fixes for the other switch () cases in the fbdev drivers. My initial reaction is therefore thanks, but no thanks. Sam > > > > diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c > > > index 6f7838979f0a..ae3d8e8b8d33 100644 > > > --- a/drivers/video/fbdev/arcfb.c > > > +++ b/drivers/video/fbdev/arcfb.c > > > @@ -419,7 +419,7 @@ static int arcfb_ioctl(struct fb_info *info, > > > schedule(); > > > finish_wait(&arcfb_waitq, &wait); > > > } > > > - /* fall through */ > > > + fallthrough; > > > > > > case FBIO_GETCONTROL2: > > > { > > --- > drivers/video/fbdev/arcfb.c | 52 ++++++++++++++++++++++----------------------- > 1 file changed, 25 insertions(+), 27 deletions(-) > > diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c > index 6f7838979f0a..4419655e3e58 100644 > --- a/drivers/video/fbdev/arcfb.c > +++ b/drivers/video/fbdev/arcfb.c > @@ -403,35 +403,33 @@ static int arcfb_ioctl(struct fb_info *info, > unsigned long flags; > > switch (cmd) { > - case FBIO_WAITEVENT: > - { > - DEFINE_WAIT(wait); > - /* illegal to wait on arc if no irq will occur */ > - if (!par->irq) > - return -EINVAL; > - > - /* wait until the Arc has generated an interrupt > - * which will wake us up */ > - spin_lock_irqsave(&par->lock, flags); > - prepare_to_wait(&arcfb_waitq, &wait, > - TASK_INTERRUPTIBLE); > - spin_unlock_irqrestore(&par->lock, flags); > - schedule(); > - finish_wait(&arcfb_waitq, &wait); > - } > - /* fall through */ > + case FBIO_WAITEVENT: { > + DEFINE_WAIT(wait); > + /* illegal to wait on arc if no irq will occur */ > + if (!par->irq) > + return -EINVAL; > > - case FBIO_GETCONTROL2: > - { > - unsigned char ctl2; > + /* wait until the Arc has generated an interrupt > + * which will wake us up */ > + spin_lock_irqsave(&par->lock, flags); > + prepare_to_wait(&arcfb_waitq, &wait, TASK_INTERRUPTIBLE); > + spin_unlock_irqrestore(&par->lock, flags); > + schedule(); > + finish_wait(&arcfb_waitq, &wait); > + fallthrough; > + } > > - ctl2 = ks108_readb_ctl2(info->par); > - if (copy_to_user(argp, &ctl2, sizeof(ctl2))) > - return -EFAULT; > - return 0; > - } > - default: > - return -EINVAL; > + case FBIO_GETCONTROL2: { > + unsigned char ctl2; > + > + ctl2 = ks108_readb_ctl2(info->par); > + if (copy_to_user(argp, &ctl2, sizeof(ctl2))) > + return -EFAULT; > + return 0; > + } > + > + default: > + return -EINVAL; > } > } > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel