Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp16677143ybl; Wed, 1 Jan 2020 10:52:53 -0800 (PST) X-Google-Smtp-Source: APXvYqypZj0rvyiwFmD9Fw/A/QOBTJ0Y8ckj57LwTpHVj8tCTBGrP5qu5IXR3rbTIJB/noDTKDM+ X-Received: by 2002:a05:6830:1401:: with SMTP id v1mr56765739otp.360.1577904773794; Wed, 01 Jan 2020 10:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577904773; cv=none; d=google.com; s=arc-20160816; b=0FIJXsD5OoMg2qsIdvr3po/T3/zOKCrZFs6sy7mW2AIwnpXpmyUp+2QRPp7K0E7xRZ QEbIqDxau3n98O70/+k5wDSAA1fijTosvP3M1dQk5QHbXpJtypGT0jKOb0jRfH0Kfq1g 8D1lGPTxBgI9AK5PuLqvnyg4ji1u7Limaep+suWku7g0jyEQR573kM03XBmyki7bVb1U rjuJIDrK6lgXr0+gCy8x2H1hKG0gRdauszokXhXt06HNq+fJPvuD5SNs5jNMvLi2JByy JblfsuhT8IMlJCKKYPunBNfdqGUoDfEMWkAns0lEm4Ama4moiShwO8FEo/NVHzBtdCOY RfRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=D8uPCxi3Y1/pc0576oAFGCcv9ILxWB3/3GiCiHCXgko=; b=AbIzpKXCCiHahN0i51cYn92oayiNtjLZPT1PudekEIPP35SaJ4S/xIuu+ai9Pm/840 oeS/JwyGyj16ccl3CDAr4UO4i3jIfEcM0BY39KTr5C08oQN20bjrtPArP3vtVzHQJtqG dwcBUp23oDoenRHs2ZuwnYjCFvKdbBRdRsSzScUZjdinyxMVWBeJUvxIfjZYXhD0eUJ7 MIG0RRTi/CpvqGLbCY82R5xIBLIA2Yk5696DUoeayF9Pw15Kkb0WOeEoFfAl14Muq0z6 jnRnPBDWcV5H4i8aOfKGtHxMllSi3aoBddOK2T8vPUZcfGRojqGQCEg5e9nL6L1GDpl+ lJ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=CovNZjlE; 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 t82si23498942oif.45.2020.01.01.10.52.41; Wed, 01 Jan 2020 10:52:53 -0800 (PST) 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; dkim=pass header.i=@ffwll.ch header.s=google header.b=CovNZjlE; 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 S1727377AbgAASvx (ORCPT + 99 others); Wed, 1 Jan 2020 13:51:53 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55031 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727311AbgAASvx (ORCPT ); Wed, 1 Jan 2020 13:51:53 -0500 Received: by mail-wm1-f66.google.com with SMTP id b19so3973323wmj.4 for ; Wed, 01 Jan 2020 10:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=D8uPCxi3Y1/pc0576oAFGCcv9ILxWB3/3GiCiHCXgko=; b=CovNZjlE6y41FxRRV2dQgC2LXmUHj1E8p0Nrv8qiRfWxbkQdYpbWLSMjj/b+oII78U wl3wEHZITaqtJDiX2UUnM3rU9Poj3VDz0KTlFfXfgsLsgcwqUU8n+ad18kAFMtdYP3Nl H6F+gk0amyScbp2FsWH2Pzgq8Mylv+lGIT/y0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=D8uPCxi3Y1/pc0576oAFGCcv9ILxWB3/3GiCiHCXgko=; b=X5afWAIkhnPv1AqPp40LBJzwAz2crIlHEj2QxicWgaDe+mRtRUIvF7HgQsE/JGPErd 2zgXwBzkO7bYBM7Tk22wuQrY96442EdVTbkqInAPce0pg6HKWINpWE6atBuhdlok/q6V 3/fSZMynW9u+pm1JfcfUDoEWXP5UXIQs/ZJ4awzcgZQm336GCo/hXJxcOSkaqqgSI5yw Od4JGVt/QbUW5oRtZ7BVe4/b/7Han78ggWcJWAvJVfmpKFgz3Apr3i/iAehufOYdllwC NOI2FhJg4EjEcfV78oQvq+rrRU6It26JzRzA2j26iPrlxrezQ/9iCSmLUJ56MXaVKPZQ rA2Q== X-Gm-Message-State: APjAAAWJ8b5ZkplEUNxZ3rZtte6hoEb1XAD3KZLZdSKFs93/z4rxHG9F Fs5Lt6YZGVmHkMMUbuysde+OxHPmiMk= X-Received: by 2002:a05:600c:224d:: with SMTP id a13mr10459265wmm.70.1577904711502; Wed, 01 Jan 2020 10:51:51 -0800 (PST) Received: from dvetter-linux.ger.corp.intel.com ([194.230.159.125]) by smtp.gmail.com with ESMTPSA id b21sm6272694wmd.37.2020.01.01.10.51.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 10:51:50 -0800 (PST) Date: Wed, 1 Jan 2020 19:51:47 +0100 From: Daniel Vetter To: Wambui Karuga Cc: bskeggs@redhat.com, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/nouveau: use NULL for pointer assignment. Message-ID: <20200101185147.GB3856@dvetter-linux.ger.corp.intel.com> Mail-Followup-To: Wambui Karuga , bskeggs@redhat.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20191231205734.1452-1-wambui.karugax@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191231205734.1452-1-wambui.karugax@gmail.com> X-Operating-System: Linux dvetter-linux.ger.corp.intel.com 5.2.11-200.fc30.x86_64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 31, 2019 at 11:57:34PM +0300, Wambui Karuga wrote: > Replace the use of 0 in the pointer assignment with NULL to address the > following sparse warning: > drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer > > Signed-off-by: Wambui Karuga Reviewed-by: Daniel Vetter I'll check with Ben next week or so whether he wants to pick these up or whether I should stuff them into drm-misc-next. -Daniel > --- > drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > index d445c6f3fece..1c3104d20571 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c > +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > @@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev) > special_groups[i++] = &pwm_fan_sensor_group; > } > > - special_groups[i] = 0; > + special_groups[i] = NULL; > hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev, > &nouveau_chip_info, > special_groups); > -- > 2.17.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch