Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3146727ybd; Fri, 28 Jun 2019 03:42:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYtl/ZoyftEEKJZEJytORm5gQpKA0heeRyRdOwfdTGUiUW6umdnmPVHyS1YLBTvln+ZM/g X-Received: by 2002:a65:404a:: with SMTP id h10mr8855240pgp.262.1561718578421; Fri, 28 Jun 2019 03:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561718578; cv=none; d=google.com; s=arc-20160816; b=wg/FG0Wr3z9Otsw0KctUt+MFUJHH9Fjo2OFb0OTYHkUWNls+hPslXON8K5KQSLv53x MQD6DiqnvgpJwTpgdvRM3W9bHL7EGuqah6eN3Q53QxMPuL7Xa++Qz6L6uhvZVPaNG5rN bzv+LRc2KLoSiICXMuY+SiQc16mGDtRWYPA8Fq9THTvjVcy9Hf7hzErX7zCUWrWTwBZ+ j/64QOWDgR41YkNmzcCRzM6qgST3impMQA9iRxqIUgPYZmcEgWonkL0RUATtzar+HbTF huEHWb8CApoDCDXRshcsA34VxgTjRZzyV3Yc2Rwwn3FuVd9jHSYrxGdFPOEtRzFtxn1d dWvg== 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=w3ZZUmJz7Al7fKDi4w7EJzG7FLD3S3vUGrphMEM/BTk=; b=IfZ8LldiQ+JIbo0yc9viQ53nnN3oDRdEp0z7ZhYOIEKQQK3xI1aqHnzjFRyPvJqS6d WAzChBWK3GPo4Xq6XwrI7nLl2gxfKVhb+P19DOS84bSuxis49laxb8DfxWv2h3P6NUHA Myy+dOTJXCIvxbgqz+MdaEIePPdrkHDBE2j6ADM/9/Ea7UYAX2niYx5plbnaWQARM13b vaJKRBCjOdfu1PVv9BjAB6mu4LAs4H7XLz8wH80Zi4Kj4bWoqsmBvrqfYsQyZ0OT3iT9 fiX6bSxa62muw4qkPEFxbbJXM/73Uwpg9MucA5/DzlgPWI2EcCR2rcsNurvlEo6p6BUQ hZQg== 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 s12si1861169plr.338.2019.06.28.03.42.42; Fri, 28 Jun 2019 03:42:58 -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 S1726913AbfF1KmA (ORCPT + 99 others); Fri, 28 Jun 2019 06:42:00 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:53208 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726909AbfF1KmA (ORCPT ); Fri, 28 Jun 2019 06:42:00 -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 0571827EA8A; Fri, 28 Jun 2019 11:41:57 +0100 (BST) Date: Fri, 28 Jun 2019 12:41: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: <20190628124154.5245f629@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 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" : "",