From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
linux-kernel@vger.kernel.org, kbuild-all@01.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/i915/pmu: fix noderef.cocci warnings
Date: Fri, 12 Jan 2018 16:33:25 +0200 [thread overview]
Message-ID: <20180112143325.GC10981@intel.com> (raw)
In-Reply-To: <20180112133116.GA14498@lkp-ib03>
On Fri, Jan 12, 2018 at 09:31:16PM +0800, kbuild test robot wrote:
> 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);
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
prev parent reply other threads:[~2018-01-12 14:33 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 ` [PATCH] drm/i915/pmu: fix noderef.cocci warnings kbuild test robot
2018-01-12 14:28 ` [Intel-gfx] " Tvrtko Ursulin
2018-01-12 14:33 ` Ville Syrjälä [this message]
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=20180112143325.GC10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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