From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933957AbeALOdb (ORCPT + 1 other); Fri, 12 Jan 2018 09:33:31 -0500 Received: from mga07.intel.com ([134.134.136.100]:57112 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933810AbeALOda (ORCPT ); Fri, 12 Jan 2018 09:33:30 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,349,1511856000"; d="scan'208";a="21093543" Date: Fri, 12 Jan 2018 16:33:25 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: kbuild test robot Cc: Tvrtko Ursulin , dri-devel@lists.freedesktop.org, David Airlie , intel-gfx@lists.freedesktop.org, Joonas Lahtinen , linux-kernel@vger.kernel.org, kbuild-all@01.org, Rodrigo Vivi Subject: Re: [PATCH] drm/i915/pmu: fix noderef.cocci warnings Message-ID: <20180112143325.GC10981@intel.com> References: <201801122113.PamSF4io%fengguang.wu@intel.com> <20180112133116.GA14498@lkp-ib03> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180112133116.GA14498@lkp-ib03> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 09:31:16PM +0800, kbuild test robot wrote: > From: Fengguang Wu > > drivers/gpu/drm/i915/i915_pmu.c:795:34-40: ERROR: application of sizeof to pointer > > sizeof when applied to a pointer typed expression gives the size of > the pointer > > Generated by: scripts/coccinelle/misc/noderef.cocci > > Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs") > Signed-off-by: Fengguang Wu > --- > > i915_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/gpu/drm/i915/i915_pmu.c > +++ b/drivers/gpu/drm/i915/i915_pmu.c > @@ -792,7 +792,7 @@ create_event_attributes(struct drm_i915_ > goto err_alloc; > > /* Max one pointer of each attribute type plus a termination entry. */ > - attr = kzalloc((count * 2 + 1) * sizeof(attr), GFP_KERNEL); > + attr = kzalloc((count * 2 + 1) * sizeof(*attr), GFP_KERNEL); kcalloc()? > if (!attr) > goto err_alloc; > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrjälä Intel OTC