Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3462361ybi; Tue, 2 Jul 2019 08:12:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1NaOVkfna+JaN7Zr2PBm2T53p3dM87PUhmhkcPCyJARXZq3WF0gwBwRKMyexkHVYeA+Ni X-Received: by 2002:a17:90a:9386:: with SMTP id q6mr1165465pjo.81.1562080324747; Tue, 02 Jul 2019 08:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562080324; cv=none; d=google.com; s=arc-20160816; b=iqeXYbgt1A4+IEjBWLMJJssOLMTD66woBCHuf8OkkQP/6veuVOwkQXU3zeSicevnJS K8mixBwqJMNLwwzKKGHgJteyG4fY1yreTomEeSHgJydGt3h4HUtox/a/sDpuDEy/q6jp hapQdYnRopyw758WHf3Q+pE7iEU7Sf2/bUpYrf9k1ptP6n8q83D3Xkwx1Z+6kXIWXHcf YPkcbnMbOCyNYcqvOnJT1m0gK6A0pKaoe7RoTcxGngZ/Wory3VGtP2fgAzZy594qhgeu X5KYfVbOe5zm9NZh/fg1fsfqtj0AB0C7OkvY/oFI8KDzJlat1YDmALApT8r6cjH/WArd srkA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=CwSkN779X8z6LzPZS3xXfdVvvNTm4/CeiiOyNvcPJxA=; b=svbTZavhvv+Q11UIDDuzPiJSd9m5zoC60kseMojlz9G8CykuzhqmnwdHiR0yjauDoz a8cAlS9sNNWRzO9QLNipA3mKxRMgywA0F5hKedIhSlshmZ+ZVGr3yunTALuwWY1wFpmg HxeNBXkvN4q8md/jCpJWUMo6rfq0n/6UfC5xRD9SxdoEieGc6NJVLld/PiHETQ3tidQK bd8teEYwRjFki9Faykc7UUz2B2BkhT1GFJ2RLQluXM60j47dUN/aXcUGBT8TtqUtsyJr uEj+V6BqnJYjBcbjiPDMS6cPljmjtHlkDRUkWffyFfZfz49jR8A9kcKGZAOL2N5xKIMi w9qA== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j33si12994567pgi.89.2019.07.02.08.11.49; Tue, 02 Jul 2019 08:12:04 -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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbfGBPJ7 (ORCPT + 99 others); Tue, 2 Jul 2019 11:09:59 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58158 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfGBPJ7 (ORCPT ); Tue, 2 Jul 2019 11:09:59 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id E4CB9283DB4; Tue, 2 Jul 2019 16:09:56 +0100 (BST) Date: Tue, 2 Jul 2019 17:09:54 +0200 From: Boris Brezillon To: Arnd Bergmann Cc: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Noralf =?UTF-8?B?VHLDuG5uZXM=?= , Alex Deucher , Ville =?UTF-8?B?U3lyasOkbMOk?= , Nicholas Kazlauskas , Lyude Paul , Uma Shankar , Boris Brezillon , Ramalingam C , Radhakrishna Sripada , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: connector: remove bogus NULL check Message-ID: <20190702170954.4594bb21@collabora.com> In-Reply-To: <20190628103925.2686249-1-arnd@arndb.de> References: <20190628103925.2686249-1-arnd@arndb.de> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Jun 2019 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 Queued to drm-misc-next-fixes. Thanks, Boris > --- > 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" : "",