From patchwork Fri Jun 28 10:39:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168061 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3521954ilk; Fri, 28 Jun 2019 03:40:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMsllv8cqHcdqF8iXfNUczjAWkqOzCBu8pWN/Q8+3Wv79zUiLt8Apboy8WdZbDHbPfJbVF X-Received: by 2002:a17:902:9688:: with SMTP id n8mr10466197plp.227.1561718407323; Fri, 28 Jun 2019 03:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561718407; cv=none; d=google.com; s=arc-20160816; b=stwg2XRsas9EJmZbzdMkATMlIVZxoPyuqTzt7/Rj6GurBtJlDbck7D/di7SOwmSBPZ ndThWbn3fmcF53IQXgrBepFdv3LSd/zd+qBZC/lfIaAbS8qofH2F2PBar6Mhf7CWzcZe X1QUKHzSQ2sq7AyoLPR0U9nUpxPOpbgsl0fxcajNAPVPR/Nwra/Y9CgqgFll30RPPZxy taht1v0ddjciq2NSmdEZgtSNu0DDZWfzfs+IY1mh37FRctxe1xt4g1eBDTe9nl64CQVt uBUFvFuIH15k6TkHxDZUEkSSh4WkoFKWTaeLgAKz8ZW7ShxYAJvXvhtyCr/QgzAJ3JYS iJtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=NnHjgqe/ikyxKsL4Z7uvLGHrNWpSYmsATylZiCWGt7A=; b=ZbFrIc0UAteIaST0Wjny0DeyID6FHMG8gGAk3W31xY+pj1VAke1XVss/uJw3loYBFm MrVVUwzoUS1nez1yekKfk+0qcrO9IHQU8NSJ/B+c68dnmyBhgVzgw1ZxuL/ZVmCT6Ojd snBjbN6Xy7aZl349KnSC4xh/IrfdjvI+5JfbzyhYDSU/Q4IOPSbeLi/sBDWo6XQN5x3I VfSPbP66wRZ8pZYksWBGJCJ0GP/6/NDXMycWMcKALtWbRGSgX3vHyX0rLcG3/AyzYNGj 4ATwrBgCisIvUrYQItlTr5LuFCljKyQCe5ZLsge4vA9X5BllOiRnmKiieBvak1ujq5Jl cw7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id l13si1958568pjq.69.2019.06.28.03.40.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jun 2019 03:40:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DBF66E8D4; Fri, 28 Jun 2019 10:40:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CD606E8D4 for ; Fri, 28 Jun 2019 10:40:04 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MEmMt-1hneqR1qUl-00GHwL; Fri, 28 Jun 2019 12:39:28 +0200 From: Arnd Bergmann To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter Subject: [PATCH] drm: connector: remove bogus NULL check Date: Fri, 28 Jun 2019 12:39:05 +0200 Message-Id: <20190628103925.2686249-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:G+y7LV1vsF/Vm55AUncbp7hvJIftzjKCKc7IizEy2E4LX7bp3+s Zw7dhRDtUzvEZDId+yfWbpw7nAAKWql8TNlnL1aGyNF4xHXL7NKNptNoY9TGI+Imy9RymzU AdTEA6pt6PQT+Me+UmPcFCEuOmU1kr4EdP7bU4i4bQ+Da1W4IrqtrFTFJeF2EfQV+QQRbba vqpPkiNLkJs2Q2Mk+srmw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:afF7kKP7CwA=:2IzTp9enG36FNhGD7pD+vz CJiQeyTns2tWzHZdGzNZz1vmnjcVF0b1fPoyB5mJl6KhNYkW4LDlOrn/beaVC5aaAa0rmATxD x2M3BrQXcYdB08bAUsttlahDS5JlcF/jgJ82LiM+CDmP5Xr7UQRx/hBooV+ujCaDFoNWz0NEE lOdoEdAUIBTz0nudc1sk6mZgph3PHth+BBxb6Jv/2CTS6+00MJCJiVw9f6QemhP4ljCxc93+2 R+P8pQlnD2R3pGXn8c6Ya5KobpGDvnMISmpYVSjiYetnp0bRvpsmyt8T/RS4NZ44NHN9ntCql ZbfFxIx0oqY1TUTjAO7BeDhU8+F8/oBQw1ey2ohjRE9LcFvJJYXw5O8KSOBrMs06+diJPkmQM 1JXExkme8h7pXdYx6rEoNFO+rxSMSNYxNOXGG/yJ/Q99IDsfnHZf5bdiav+U3/QxeDeICGnaF xGYetucBIBr+v4iIJ1Kn3D+lHJFfkhIVW+KYzfR7YIfvr7ckBivb3DASpqqKcjkm9zw8NlL44 18flev/L1SVObA+e+bo1ml5DOV0t+Hv5tuPIk+JOob1vycIiB+LxodkAWk2pFst6ud7ts4Ydm LX1l+XP2mMuLPzE+O3/nNy5OPMD5am0ofKA7+q1/eRoA81QTufhDEYYRtw73GL7rM8qm+XRVS F+FlqOS8jbESNjPFwY4v4f8vzvx1MQn+Vgs74UoLU4ANk16HRJ05LxgVuzXPCXFX4X+HBzyiU BMrDZVYuJlrcBZXG72L43FgzJA3Rxo0E0mzBbA== 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: Arnd Bergmann , Boris Brezillon , Radhakrishna Sripada , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alex Deucher , Uma Shankar , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" mode->name is a character array in a structure, checking it's address is pointless and causes a warning with some compilers: drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] mode->name ? mode->name : "", ~~~~~~^~~~ ~ include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS' drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ Remove the check here. Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/drm_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 3afed5677946..b3f2cf7eae9c 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector) DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n", connector->name, - mode->name ? mode->name : "", + mode->name, mode->xres, mode->yres, mode->refresh_specified ? mode->refresh : 60, mode->rb ? " reduced blanking" : "",