[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1489965221.16816.14.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Sun, 19 Mar 2017 16:13:41 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2/4] flowcache: make flow_cache_hash_size() return
"unsigned int"
On Mon, 2017-03-20 at 01:24 +0300, Alexey Dobriyan wrote:
> Hash size can't negative so "unsigned int" is logically correct.
> struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
> - size_t sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc);
> + unsigned int sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc);
>
> if (!fcp->hash_table) {
> fcp->hash_table = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
> if (!fcp->hash_table) {
> - pr_err("NET: failed to allocate flow cache sz %zu\n", sz);
> + pr_err("NET: failed to allocate flow cache sz %u\n", sz);
I do not see any improvement here.
What is wrong with size_t exactly ?
Powered by blists - more mailing lists