diff mbox series

ath11k: fix noderef.cocci warnings

Message ID alpine.DEB.2.21.1903072235080.2558@hadrien (mailing list archive)
State New, archived
Headers show
Series ath11k: fix noderef.cocci warnings | expand

Commit Message

Julia Lawall March 7, 2019, 9:36 p.m. UTC
From: kbuild test robot <lkp@intel.com>

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Fixes: 258bbf525e65 ("ath11k: add driver")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-bringup
head:   e7daa3ec639f390e383dae0db9e6b143bcc7b5bc
commit: 258bbf525e652e244aa8b2331f55fda573fbe926 [3/42] ath11k: add driver
:::::: branch date: 5 hours ago
:::::: commit date: 4 weeks ago

 dp_rx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo March 8, 2019, 12:47 p.m. UTC | #1
Julia Lawall <julia.lawall@lip6.fr> writes:

> From: kbuild test robot <lkp@intel.com>
>
>  sizeof when applied to a pointer typed expression gives the size of
>  the pointer
>
> Generated by: scripts/coccinelle/misc/noderef.cocci
>
> Fixes: 258bbf525e65 ("ath11k: add driver")
> Signed-off-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

Doesn't apply for some reason.
Julia Lawall March 8, 2019, 12:51 p.m. UTC | #2
On Fri, 8 Mar 2019, Kalle Valo wrote:

> Julia Lawall <julia.lawall@lip6.fr> writes:
>
> > From: kbuild test robot <lkp@intel.com>
> >
> >  sizeof when applied to a pointer typed expression gives the size of
> >  the pointer
> >
> > Generated by: scripts/coccinelle/misc/noderef.cocci
> >
> > Fixes: 258bbf525e65 ("ath11k: add driver")
> > Signed-off-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
>
> Doesn't apply for some reason.

OK, I'll check on these.  Thanks.

julia
diff mbox series

Patch

--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -275,7 +275,7 @@  static void ath11k_dp_rx_tid_del_func(st
 	if (status == HAL_REO_CMD_DRAIN)
 		goto free_desc;

-	elem = kzalloc(sizeof(elem), GFP_ATOMIC);
+	elem = kzalloc(sizeof(*elem), GFP_ATOMIC);
 	if (!elem) {
 		ath11k_warn(ab, "failed to allocate memory for cache flush element\n");
 		goto free_desc;