From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2018-01-12 14:33 UTC|newest]
Thread overview: 4+ 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]
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=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=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.