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 7D6F2C433DF for ; Mon, 3 Aug 2020 19:54:24 +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 0F53420775 for ; Mon, 3 Aug 2020 19:54:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mBP6wPZC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F53420775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com 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:MIME-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0mDv6SZ38Q9/Lf3+bly0WKTEzTT6eO69nnlidKuv0ho=; b=mBP6wPZCm5UB9MAP+H1N+ZWdo fm837QaN6SyBciuSsv9t6p0n9iUFsvCrwb8Mkm+8u4CX24CfY5FftwZWdwQveqrbTTvpeSHhn2rWf vnpskSj47qqx6BysThYk4CeuyJ9yOMBrQGbw8KGaS/lRo8heZUR14Qhkk+XNQQVIAA0Gyu5VtQSeR zWlMrfy+DwoQRSZiVF+bQ4r+LaOIEddGsgrGsU+4BTxUkbIafVN1kn+2RtkdU2oJlbsNBT9yvEhIJ PojNURGpKELalgR0nEgpUT+1jz+pKEcb8zkCA3K8WnUgZI1ty9koJfxSWqlv15+qnRoQDJKErRblr 9D6JAMkTg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2gW9-0001pB-OU; Mon, 03 Aug 2020 19:53:05 +0000 Received: from smtprelay0107.hostedemail.com ([216.40.44.107] helo=smtprelay.hostedemail.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2gVw-0001i3-EH for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2020 19:53:03 +0000 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 8CCEB180A9F23; Mon, 3 Aug 2020 19:52:44 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: bath65_48004ae26fa0 X-Filterd-Recvd-Size: 4366 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Mon, 3 Aug 2020 19:52:42 +0000 (UTC) Message-ID: <101585b1d3c2a9db8fe394c51f64115e8bfc1754.camel@perches.com> Subject: Re: [PATCH][next] fbdev: Use fallthrough pseudo-keyword From: Joe Perches To: Sam Ravnborg , "Gustavo A. R. Silva" Date: Mon, 03 Aug 2020 12:52:40 -0700 In-Reply-To: <20200803194024.GA525506@ravnborg.org> References: <20200707210539.GA12530@embeddedor> <20200803194024.GA525506@ravnborg.org> User-Agent: Evolution 3.36.3-0ubuntu1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_155252_594393_FC42DC8F X-CRM114-Status: GOOD ( 21.03 ) 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, linux-kernel@vger.kernel.org, Ludovic Desroches , linux-fbdev@vger.kernel.org, Jingoo Han , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.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, 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. > > 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