linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sch_choke: Use kvcalloc
@ 2020-01-28 19:12 Joe Perches
  2020-01-29 10:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2020-01-28 19:12 UTC (permalink / raw)
  To: Jamal Hadi Salim, Cong Wang, Jiri Pirko
  Cc: David S. Miller, Jakub Kicinski, netdev, linux-kernel

Convert the use of kvmalloc_array with __GFP_ZERO to
the equivalent kvcalloc.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/sched/sch_choke.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index dba7037..a36974e 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -377,7 +377,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt,
 	if (mask != q->tab_mask) {
 		struct sk_buff **ntab;
 
-		ntab = kvmalloc_array((mask + 1), sizeof(struct sk_buff *), GFP_KERNEL | __GFP_ZERO);
+		ntab = kvcalloc(mask + 1, sizeof(struct sk_buff *), GFP_KERNEL);
 		if (!ntab)
 			return -ENOMEM;
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sch_choke: Use kvcalloc
  2020-01-28 19:12 [PATCH] sch_choke: Use kvcalloc Joe Perches
@ 2020-01-29 10:58 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-29 10:58 UTC (permalink / raw)
  To: joe; +Cc: jhs, xiyou.wangcong, jiri, kuba, netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Tue, 28 Jan 2020 11:12:03 -0800

> Convert the use of kvmalloc_array with __GFP_ZERO to
> the equivalent kvcalloc.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-29 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 19:12 [PATCH] sch_choke: Use kvcalloc Joe Perches
2020-01-29 10:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).