Message ID | 20190726112802.19563-1-anders.roxell@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12909381ilk; Fri, 26 Jul 2019 04:28:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCJs+kXMxci6WSsxnKFbRaanxG8SOkKBAX0IO7VQpOMM4uzWWxAhxMvhCXy4FPy9GyjZQ2 X-Received: by 2002:a65:690e:: with SMTP id s14mr77871966pgq.47.1564140491887; Fri, 26 Jul 2019 04:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564140491; cv=none; d=google.com; s=arc-20160816; b=lWYI7X3NDRxpv2DLJvFuRWXzpr5uN8XPVFWFjCILczaoauCoY9tQ2CDh4Uf/2G/dn2 18P8hdv3VSG8I5PHr6vaWPfMU50q/q43TXGzaZhfrADpDq71xLBpv5h/W/BP10yKEGBs Rgul5l7hqAQUkhDFOKs1N4ghlchT6ZxACFOpMRpmf+shDcovzyML4pjTFuV8xI270gqm 0N52us5sQb+TdBU4tl35RCZWtvbYs1xos0AipTLb/sHgIihBuXrvr+jifneDDbaIzVGT oQd2ygCNrKs3ZgnO3x9/hsuqEEZbV5IKNBMGsxlVix0b5bewxKjSEjk8w0uRvLJM46or h/yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RBXqC7DkQwKqkOuJceKqqWGtbn5TCwbm7RbUyvhZTFE=; b=NSjOeR7PhhIcO+0A2WYiYH4WtiNFT4Bql3i6Q+0ZEAdKyN2kQxpFhERNmniDA+D2Yo BYyfe0gEAqaTxBhOpdKNVXmmQDNxwPUDCvG32yXbkdIjLu5bHiFQyw0Ggpwr47OeIeq0 otq+hDiSzBTvD8hcpB4hyT8CIAjttQTzMMHNUnDF/RRUhxke8IAEALM+u/yx14syEbvL ggZjZGFHzRoti3x5F++XQdz4MQmyQDhv3WnH8OfJO3mazRtJQSUbnUczdnXDGrIKJnF7 dhbWClQSkoRyZkPw0ErXKfa1J0CfzD6lvDtJnc9yS2GwZRFRj8CRu/s816Sn7IsLBJQm Rmfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S+2C7W+3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37si20468886plb.351.2019.07.26.04.28.11; Fri, 26 Jul 2019 04:28:11 -0700 (PDT) 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=@linaro.org header.s=google header.b=S+2C7W+3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfGZL2K (ORCPT <rfc822;mike.holmes@linaro.org> + 29 others); Fri, 26 Jul 2019 07:28:10 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46786 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbfGZL2J (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 26 Jul 2019 07:28:09 -0400 Received: by mail-lf1-f66.google.com with SMTP id z15so32570268lfh.13 for <linux-kernel@vger.kernel.org>; Fri, 26 Jul 2019 04:28:07 -0700 (PDT) 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=RBXqC7DkQwKqkOuJceKqqWGtbn5TCwbm7RbUyvhZTFE=; b=S+2C7W+37ohe6bGgtuXYTdXJGM8T5ohSQlHPAzmsrvk398LEdPoWhPV/m/nzghQI5v W/ynOWka+ROdXjq3wZx0SU5bXSkI8xsvR7m9JeSogoFZ9okwuGEnqPEjlGjROjHjGIva mB1VipwLDzpthrV0Oe/nYMqcKcnKgfaK0ocaFXs9wuRQrGEiGE8p5MAwmLKboL370EQ/ 7HsqDSPXh0uLWTzNzKXAhZdPAy50RxUyeN8iSN7WJUVHNXAAbGEFRYbwtye13r4H0RN6 d1O6oWzPXvPJVyEhSHBHvBtoWervTtRey3wpMXYA9PJrRYUAwaiQ/LmzqdeBN4YwXTPw dL3w== 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=RBXqC7DkQwKqkOuJceKqqWGtbn5TCwbm7RbUyvhZTFE=; b=VIQCyeJej6PkwI9x2jiPm50f00fUm9yCGaCuoJOWuRaVrsuE5CUhoJhaJXXTv1ukP2 J6vVJ2sSFSBYIyQ4Csgvf1kNWE6vyY3anSvbjnSBhoIUC1xfUUyBXia1z8Yh1fZhsw57 XpIW2mIDB8ixu5tAi/EZMXgW7HGdkGe48C6GHBGgLb+38IWx+mXNdT1R+vtZHqDG2jfI fCcNUVU2idPI8f2KrosE/Sln6oX1XnzrnX3Pi/Ea+NHyplOOJbPtMSqA3AizjQnWqJbW nktvOyFFDMO2HoYZMNK4+U1t2dz6PVSKKheid53A3wGy8Pt0m/WCCNPcQfxUPOS9W7aP 45SA== X-Gm-Message-State: APjAAAXZzr7WXvf9wXWoNnAv3HYQmYveg+CyzDWGah5Ts9oBXXKp2qZB HyqRbLgOJZxVKcukK2gVHq1zmaEtbBRVKQ== X-Received: by 2002:ac2:48a5:: with SMTP id u5mr45521185lfg.62.1564140487096; Fri, 26 Jul 2019 04:28:07 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id z25sm8306560lfi.51.2019.07.26.04.28.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:28:06 -0700 (PDT) From: Anders Roxell <anders.roxell@linaro.org> To: airlied@linux.ie, daniel@ffwll.ch, wens@csie.org Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell <anders.roxell@linaro.org> Subject: [PATCH 1/2] drm: sun4i: sun6i_mipi_dsi: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:28:02 +0200 Message-Id: <20190726112802.19563-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[1/2] drm: sun4i: sun6i_mipi_dsi: Mark expected switch fall-through
|
expand
|
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 472f73985deb..40ed21e527f9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -992,8 +992,10 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, case MIPI_DSI_DCS_READ: if (msg->rx_len == 1) { ret = sun6i_dsi_dcs_read(dsi, msg); - break; + } else { + ret = -EINVAL; } + break; default: ret = -EINVAL;
When fall-through warnings was enabled by default the following warning was starting to show up: ../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c: In function ‘sun6i_dsi_transfer’:../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:992:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (msg->rx_len == 1) { ^ ../drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:997:2: note: here default: ^~~~~~~ Rework so that the compiler doesn't warn about fall-through. Change the if-statement so that we can move out 'break;' one level. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1