Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3146018ybd; Fri, 28 Jun 2019 03:42:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg9VJJL+ipuMZp++7ZgPf8QYchThrPr7Tbj6LHZPN/FPahO11kohE636RFhozr3UxrwAUN X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr10749087plb.277.1561718531461; Fri, 28 Jun 2019 03:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561718531; cv=none; d=google.com; s=arc-20160816; b=07tOnJ8UScJKulXFn4twgGRVUP6ZWgZOoqliRlb+AZ6uXxHgWg1bXS46DDxyHAqCpO ZBSU7WyVN6cA236TGSW/MfKD2t41jM0YeiFjYOyJs1VN24pW6LWbfCOix/8ZyNhmYlNY h6Ml5hpFvUYGv9WYRVkmSK4gx59A7unnBKM5Tp59kXdknEwsQQ0+jxcRPqLEa7DsT8MX ZV1hhjbSkHZ4xSTocA+dXo3KkQL6u2ZY5OEfxRc9s/VhGo4292rbUGCI3fhtkoIHu+AQ l2cDnxkfdQscZQ22DQthZk8oPe1+9o//EWnPZgvtuh16ivx4NxWQmIrBjUOt3R4W2JsZ Plwg== 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; bh=exVTCWzNDZC8zxJJ083/jn65Sfi0EgPlzqn7a1146+8=; b=Z3St0R7unaFl3NXPitZ//DnfMKlVrjK/1JosDshw0MNdIDobn8kvMECI6lExosVNDP mSL9lkTYzCd53vI9gUlF+0cy8Eozm20Ivk4CtdF+sZJ1XXrYqfBJ06ZsdIlLS2y+Q7M2 R4RrCUF4l4DkciTxeiM1+xofxGXDciUS0iVCVip82n1X8impDbBXGl8qjRtvs7mjigg8 1tiDhrMWE4zPrlR5IcjcvQGijRKoonCq0A/sbCnYojeb4SF/JW1TCKp3Wpnh5fSwyqSZ aCgFdoAee3/sgkhOa6RUevbOYoI3Ih7GgxVhXte5Uad0NJy9XA2/F7qGAl+5qZVgAVcu 5VAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si1782971ply.133.2019.06.28.03.41.55; Fri, 28 Jun 2019 03:42: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726837AbfF1KkK (ORCPT + 99 others); Fri, 28 Jun 2019 06:40:10 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:56605 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfF1KkJ (ORCPT ); Fri, 28 Jun 2019 06:40:09 -0400 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 Cc: Arnd Bergmann , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Alex Deucher , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Nicholas Kazlauskas , Lyude Paul , Uma Shankar , Boris Brezillon , Ramalingam C , Radhakrishna Sripada , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" : "", -- 2.20.0