android_kernel_motorola_sm6225/include
Robert P. J. Day 82ddcb0405 [PATCH] extend the set of "__attribute__" shortcut macros
Extend the set of "__attribute__" shortcut macros, and remove identical
(and now superfluous) definitions from a couple of source files.

based on a page at robert love's blog:

	http://rlove.org/log/2005102601

extend the set of shortcut macros defined in compiler-gcc.h with the
following:

#define __packed                       __attribute__((packed))
#define __weak                         __attribute__((weak))
#define __naked                        __attribute__((naked))
#define __noreturn                     __attribute__((noreturn))
#define __pure                         __attribute__((pure))
#define __aligned(x)                   __attribute__((aligned(x)))
#define __printf(a,b)                  __attribute__((format(printf,a,b)))

Once these are in place, it's up to subsystem maintainers to decide if they
want to take advantage of them.  there is already a strong precedent for
using shortcuts like this in the source tree.

The ones that might give people pause are "__aligned" and "__printf", but
shortcuts for both of those are already in use, and in some ways very
confusingly.  note the two very different definitions for a macro named
"ALIGNED":

  drivers/net/sgiseeq.c:#define ALIGNED(x) ((((unsigned long)(x)) + 0xf) & ~(0xf))
  drivers/scsi/ultrastor.c:#define ALIGNED(x) __attribute__((aligned(x)))

also:

  include/acpi/platform/acgcc.h:
    #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1)))

Given the precedent, then, it seems logical to at least standardize on a
consistent set of these macros.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:35 -08:00
..
acpi Pull sysfs into test branch 2007-02-03 01:14:35 -05:00
asm-alpha [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-arm [PATCH] Remove the last reference to rwlock_is_locked() macro. 2007-02-11 10:51:34 -08:00
asm-arm26 [PATCH] fix sparse warnings from {asm,net}/checksum.h 2007-02-11 10:51:31 -08:00
asm-avr32 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-cris [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-frv [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-generic [PATCH] typeof __page_to_pfn with SPARSEMEM=y 2007-02-11 10:51:17 -08:00
asm-h8300 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-i386 [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
asm-ia64 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-m32r [PATCH] fix sparse warnings from {asm,net}/checksum.h 2007-02-11 10:51:31 -08:00
asm-m68k [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-m68knommu [PATCH] m68knommu: removed include of system.h from bitops 2007-02-09 10:45:33 -08:00
asm-mips [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-parisc [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-powerpc [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-ppc [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-s390 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-sh [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-sh64 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-sparc [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-sparc64 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-um [PATCH] uml: x86_64 ptrace fixes 2007-02-11 10:51:24 -08:00
asm-v850 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-x86_64 [PATCH] fix sparse warnings from {asm,net}/checksum.h 2007-02-11 10:51:31 -08:00
asm-xtensa [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
crypto [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
keys
linux [PATCH] extend the set of "__attribute__" shortcut macros 2007-02-11 10:51:35 -08:00
math-emu
media V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1 2006-12-27 14:20:46 -02:00
mtd Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-10-01 17:55:53 +01:00
net [NET]: change layout of ehash table 2007-02-08 14:16:46 -08:00
pcmcia Driver core: convert pcmcia code to use struct device 2007-02-07 10:37:11 -08:00
rdma IB: Make sure struct ib_user_mad.data is aligned 2007-02-04 14:11:56 -08:00
rxrpc
scsi [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc(). 2007-02-11 10:51:27 -08:00
sound [PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED 2007-02-09 16:25:48 +01:00
video [PATCH] sstfb: add sysfs interface 2006-12-13 09:05:55 -08:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00