From patchwork Fri Jul 26 11:28:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11063323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7842E15AC for ; Mon, 29 Jul 2019 07:17:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 646521FF30 for ; Mon, 29 Jul 2019 07:17:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58E401FF73; Mon, 29 Jul 2019 07:17:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 14BEA1FF30 for ; Mon, 29 Jul 2019 07:17:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B748989C6C; Mon, 29 Jul 2019 07:16:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C8816ED1F for ; Fri, 26 Jul 2019 11:28:43 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id p17so51157604ljg.1 for ; Fri, 26 Jul 2019 04:28:43 -0700 (PDT) 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=3k2Hu9dgPAg4mXrYLegY3cs+pkVK6DYl+EmmNBVrs0g=; b=G8TZgQdHuq69+12KzMhwSAitcyjk7R9len+bNXz6Bb61/fkkEsDdvwT36Rdu9axMe+ NQdzDK3g9EYgRlEixKAvbxQItg/GHM5l4wMJmUWSR2A25G/FZSycYu47ayU020D8VIyp PzN+TPVanlr7bA+r4dTdh2ExV0WkYL/a7+Oy5Wzgu52q29McGliJ2CYD/S8Vg7vBY8d/ NBP8adtF4abe/Y5o4ZkA/C0KKohB/rZ4eDC8J9Uqf32ND4/gG16MykE31uCYo8zvRYiq 3cJAzwwWAivERD3T4tNQP8TBTtAtsGbRPOLW+Mm5SMxIkLvkMd9sGRImsksvoobD7Hl3 SZwQ== X-Gm-Message-State: APjAAAWFIz8lDDFi0UOlhabttMHLNHucx12zP9K0SWuePwoV9+OtR25a Sy4hJTMpFM0GAtu7JSIjypb4N/f5AnGbZw== X-Google-Smtp-Source: APXvYqw+KmhWFJ1zRECph4WisbngzrlfWOBHrpPa5lKCQnCIAhc96KBxovwxIYgG7Y9bz3Q2OIIhRw== X-Received: by 2002:a2e:3008:: with SMTP id w8mr50119116ljw.13.1564140521750; Fri, 26 Jul 2019 04:28:41 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id m28sm9918367ljb.68.2019.07.26.04.28.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:28:41 -0700 (PDT) From: Anders Roxell To: b.zolnierkie@samsung.com Subject: [PATCH] video: fbdev: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:28:35 +0200 Message-Id: <20190726112835.19928-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 29 Jul 2019 07:16:44 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3k2Hu9dgPAg4mXrYLegY3cs+pkVK6DYl+EmmNBVrs0g=; b=t8y9cuVI9+Yw19d8Lc6hWctxqxTCLkf+u1eC14W4J2NPPlqR5niIOpj/3Z6d0OtM/Y rTbYPQ30898Z1Dawsea0lsSoS6sks+mGr6HRiwT8DeDLpqq0wygMq3vzAhZkRDBZqFjq O9senNIWyuA3TPlYmPwaIcePkNEFE/HGREu5sjatKCeOvylXVwqKi8UUwcs9GUJLLq1A Fptqlzm0mzopq4E/Zvr2lhTDMd/AGFjNBofA/0xovrBZvfGsH7NK7MICsPtiDdXKjs1E 94HbESg/f9jtKEfzdKW3WRLDb/O2lypJ6taEfpAfmSVV0Zyvo3KJ1rnuwIqFitDzz/n0 gCAQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Anders Roxell , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When fall-through warnings was enabled by default the following warnings was starting to show up: ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_channel_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2086:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~~~~~~~~~~~~~~~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2087:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_overlay_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1596:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~~~~~~~~~~~~~~~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1597:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index ac0bcac9a865..c249763dbf0b 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1594,6 +1594,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2; @@ -2084,6 +2085,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV21: info->fix.ypanstep = 2; + /* Fall through */ case V4L2_PIX_FMT_NV16: case V4L2_PIX_FMT_NV61: info->fix.xpanstep = 2;