From patchwork Mon Jan 14 20:27:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10764057 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 B48961580 for ; Tue, 15 Jan 2019 07:58:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A73F12AEE7 for ; Tue, 15 Jan 2019 07:58:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B5FB2AEE9; Tue, 15 Jan 2019 07:58:26 +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 9E2482AEE7 for ; Tue, 15 Jan 2019 07:58:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ACF376EBE2; Tue, 15 Jan 2019 07:57:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id A42B96EB3E for ; Mon, 14 Jan 2019 20:28:09 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id r10so383022wrs.10 for ; Mon, 14 Jan 2019 12:28:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=6mRgFtaQSDGQ8meA3Ni8+iUvpq1Q85dE+uuhMia3848=; b=sEI3PztuFPwJllnQJsiH70OOpQfOYuIyGJcxvwjxElQl3WCOVw8AoAGfLK4S4uW18r 2B0Xy+Cq0I+eECriG26xaIvUSdjpiHnNccRzmEnlThsKdlv7UnSd3aNLAWE0/0U1I5r8 xI7h1X9Fg5w3G+LvvxHdqzgoRh2h37dqoxLAYPayO3F8RmH/b13PG4mla8eariEgudZX JR4ZBkBtVE1ZTH/LdaNG2vlVyjOZ25f6oATCpT2iAFWonWp6kVD7nwKIyZJM9oVBfzSm ep6kLFBvudIa1u8RSSRT3EAjpaJ1q86B5tv6dDIDISWiuODxVKVuLdE9clL4H+CgJHlU XOkA== X-Gm-Message-State: AJcUukccHECrehQQPcq1/r257nvX0ihoSnKFXTTLDMSFZ4CRdKGwU/pD MGrFL5rG1Kjnm8CvL6va7zg= X-Google-Smtp-Source: ALg8bN7iGUTW8m0gD/Lq0Ws+gqhghbke9152QTB22qD+Y23EIamw8MSI7P1YEY0JeSN+vAY67n19NA== X-Received: by 2002:adf:eec9:: with SMTP id a9mr193032wrp.242.1547497688288; Mon, 14 Jan 2019 12:28:08 -0800 (PST) Received: from macbookpro.malat.net ([2a01:e34:ee1e:860:6f23:82e6:aa2d:bbd1]) by smtp.gmail.com with ESMTPSA id g129sm27976691wmf.39.2019.01.14.12.28.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 12:28:07 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 6A58411422AD; Mon, 14 Jan 2019 21:28:06 +0100 (CET) From: Mathieu Malaterre To: Maarten Lankhorst Subject: [PATCH] drm/dp: annotate implicit fall throughs Date: Mon, 14 Jan 2019 21:27:47 +0100 Message-Id: <20190114202748.15584-1-malat@debian.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 15 Jan 2019 07:57:40 +0000 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: Mathieu Malaterre , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Maxime Ripard , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings (W=1). Fix them up. This commit remove the following warnings: include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' drivers/gpu/drm/drm_dp_helper.c:155:3: note: in expansion of macro 'WARN' include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' drivers/gpu/drm/drm_dp_helper.c:173:3: note: in expansion of macro 'WARN' drivers/gpu/drm/drm_dp_helper.c:547:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre --- drivers/gpu/drm/drm_dp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 516e82d0ed50..26835d174939 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -154,6 +154,7 @@ u8 drm_dp_link_rate_to_bw_code(int link_rate) default: WARN(1, "unknown DP link rate %d, using %x\n", link_rate, DP_LINK_BW_1_62); + /* fall through */ case 162000: return DP_LINK_BW_1_62; case 270000: @@ -171,6 +172,7 @@ int drm_dp_bw_code_to_link_rate(u8 link_bw) switch (link_bw) { default: WARN(1, "unknown DP link BW code %x, using 162000\n", link_bw); + /* fall through */ case DP_LINK_BW_1_62: return 162000; case DP_LINK_BW_2_7: @@ -552,6 +554,7 @@ int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE], case DP_DS_16BPC: return 16; } + /* fall through */ default: return 0; }