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: 11021939 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 6D08014C0 for ; Fri, 28 Jun 2019 10:40:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E0872878F for ; Fri, 28 Jun 2019 10:40:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51D1F287AA; Fri, 28 Jun 2019 10:40:07 +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 0A7122878F for ; Fri, 28 Jun 2019 10:40:07 +0000 (UTC) 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-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" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ramalingam C Reviewed-by: Boris Brezillon --- 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" : "",