Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3162273ybd; Fri, 28 Jun 2019 04:01:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzP4rehZR24PDQpV3pVKU+RgEGm8RrdgP5xc+keJXqMxhWds4VjX9/QMS2kYdhhUQMpNn4Z X-Received: by 2002:a17:90a:b78b:: with SMTP id m11mr12700328pjr.106.1561719684021; Fri, 28 Jun 2019 04:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561719684; cv=none; d=google.com; s=arc-20160816; b=MQY+wH696KNd2uoKdhgXFbPv/Raw2Qw8fnTKwt2Ytc1VRPD0sIfXdNxyLeEhJGVL5l 88j5XH2YbD8TWCFd9kiNP2PbFEqmS8ezN35Ug+mXK46Y9xihTaPdydlFF4xy9YqDbp0f SwEASA6uCeUEbjSFsfvubrNwDgpq6y+IdyA46eTZxK2/OhaenIQhq3hV0MD/q9/1BDiT 3Alo+tTTNuItyDYXhGmllZIw5Ckcf3Atallej62z2NXxQ0AhX9hMIagNjx3IY2haKDIv 31ybOLQ2oJSA1/5A0DYwQG8IS0xTELsdpQ3wRoiDZm+34NSPvTyILC6c0fpsxIa4Ey75 J0Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+OuEGIDJVj8zT9pSzjADXGcqHl85TXvHxG4IifX+FEs=; b=AO6rUA7I11sDx3YqTADaHxZtf7VxSUbAB31eADqHCd7nVh+WpJcULGFgu301r45cvo 544x7Vs+0tzltcFMpwS+UK1ortPQv4zAq55Dfbpm2gMLp1Y3E9scxJwa7h+FyaLS5E2K uUH4Nl/2sl3QvlZ0XDmRK+/4QNfPvdwEXORxI832CGN0Kb8bwbhburM/7iaxpq8dv0bq JMOHcQYS3pH0hUVV2hQ4fwAZRRK593V2A8lA126TuBx1eRvdXE0BKSzEss/aSAQ5/iHS PgdUgjgOmbfHH8Cxd+KypxvDeyFNajpTvnc0eocJJgmu+46QuTrKyC3CVNgWkZKBqQnI 4kZw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si1695160pgs.269.2019.06.28.04.01.06; Fri, 28 Jun 2019 04:01:24 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbfF1LBA (ORCPT + 99 others); Fri, 28 Jun 2019 07:01:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:11057 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726476AbfF1LA7 (ORCPT ); Fri, 28 Jun 2019 07:00:59 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2019 04:00:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,427,1557212400"; d="scan'208";a="361035901" Received: from ramaling-i9x.iind.intel.com (HELO intel.com) ([10.99.66.154]) by fmsmga005.fm.intel.com with ESMTP; 28 Jun 2019 04:00:55 -0700 Date: Fri, 28 Jun 2019 09:32:15 +0530 From: Ramalingam C To: Arnd Bergmann Cc: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Alex Deucher , Ville =?utf-8?B?U3lyasOkbMOk?= , Nicholas Kazlauskas , Lyude Paul , Uma Shankar , Boris Brezillon , Radhakrishna Sripada , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: connector: remove bogus NULL check Message-ID: <20190628040215.GA24852@intel.com> References: <20190628103925.2686249-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190628103925.2686249-1-arnd@arndb.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-06-28 at 12:39:05 +0200, Arnd Bergmann wrote: > 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, Looks good to me. Reviewed-by: Ramalingam C > mode->xres, mode->yres, > mode->refresh_specified ? mode->refresh : 60, > mode->rb ? " reduced blanking" : "", > -- > 2.20.0 >