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-next>] [day] [month] [year] [list]
Message-Id: <1194553148.20832.10.camel@lappy>
Date:	Thu, 08 Nov 2007 21:19:08 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Christoph Lameter <clameter@....com>
Cc:	akpm@...ux-foundation.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [patch 01/28] cpu alloc: The allocator


On Thu, 2007-11-08 at 10:31 -0800, Christoph Lameter wrote:
> On Thu, 8 Nov 2007, Peter Zijlstra wrote:
> 
> > > +#define CPU_OFFSET(__cpu) \
> > > +	((unsigned long)(__cpu) << (CONFIG_CPU_AREA_ORDER + PAGE_SHIFT))
> > > +
> > > +#define CPU_PTR(__p, __cpu) ((__typeof__(__p))((void *)(__p) + \
> > > +							CPU_OFFSET(__cpu)))
> > > +
> > > +#define CPU_ALLOC(type, flags)	cpu_alloc(sizeof(type), flags, \
> > > +					__alignof__(type))
> > > +#define CPU_FREE(pointer)	cpu_free(pointer, sizeof(*(pointer)))
> > > +
> > > +#define THIS_CPU(__p)	CPU_PTR(__p, smp_processor_id())
> > > +#define __THIS_CPU(__p)	CPU_PTR(__p, raw_smp_processor_id())
> > > +
> > > +/*
> > > + * Raw calls
> > > + */
> > > +void *cpu_alloc(unsigned long size, gfp_t gfp, unsigned long align);
> > > +void cpu_free(void *cpu_pointer, unsigned long size);
> > > +
> > > +#endif /* _LINUX_CPU_ALLOC_H_ */
> > 
> > I don't like those shouting macros.
> 
> The convention for macros is to use upper case.

We have plent macros that look like regular functions. And as a primary
interface to this functionality these shouting things look really out of
place.

-
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