From: kbuild test robot <fengguang.wu@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: kbuild-all@01.org, Chris Wilson <chris@chris-wilson.co.uk>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] drm/i915/pmu: fix noderef.cocci warnings
Date: Fri, 12 Jan 2018 21:31:16 +0800 [thread overview]
Message-ID: <20180112133116.GA14498@lkp-ib03> (raw)
In-Reply-To: <201801122113.PamSF4io%fengguang.wu@intel.com>
From: Fengguang Wu <fengguang.wu@intel.com>
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 <fengguang.wu@intel.com>
---
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);
if (!attr)
goto err_alloc;
next parent reply other threads:[~2018-01-12 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201801122113.PamSF4io%fengguang.wu@intel.com>
2018-01-12 13:31 ` kbuild test robot [this message]
2018-01-12 14:28 ` [Intel-gfx] [PATCH] drm/i915/pmu: fix noderef.cocci warnings Tvrtko Ursulin
2018-01-12 14:33 ` Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180112133116.GA14498@lkp-ib03 \
--to=fengguang.wu@intel.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox