lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 21 Feb 2009 12:23:41 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	rusty@...tcorp.com.au, tglx@...utronix.de, x86@...nel.org,
	linux-kernel@...r.kernel.org, hpa@...or.com, jeremy@...p.org,
	cpw@....com, mingo@...e.hu
Subject: Re: [PATCH UPDATED 09/10] percpu: implement new dynamic percpu allocator

Andrew Morton wrote:
>> +void *pcpu_base_addr;
>> +EXPORT_SYMBOL_GPL(pcpu_base_addr);
>> +
>> +/* the size of kernel static area */
>> +static int pcpu_static_size;
> 
> It would be nice to document the units of the `size' variables.  Bytes?
> Pages?

I almost always use size for bytes, so it isn't confusing to me.

> Or, better: s/size/bytes/g.  
>
>> +static int pcpu_size_to_slot(int size)
>> +{
>> +	int highbit = fls(size);
>> +	return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1);
>> +}
> 
> See,
> 
> static int pcpu_bytes_to_slot(int bytes)
> {
> 	int highbit = fls(bytes);
> 	return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1);
> }
> 
> is clearer.

but, yeah, I agree.  I'll post a patch to do the renaming.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ