android_kernel_xiaomi_sm8350/arch/mips/mm
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
..
c-r3k.c
c-r4k.c [MIPS] Avoid dupliate D-cache flush on R400C / R4400 SC and MC variants. 2006-11-30 01:14:48 +00:00
c-sb1.c [MIPS] Hack for SB1 cache issues 2006-11-22 23:34:01 +00:00
c-tx39.c
cache.c [PATCH] extend the set of "__attribute__" shortcut macros 2007-02-11 10:51:35 -08:00
cerr-sb1.c
cex-gen.S
cex-sb1.S
dma-coherent.c [PATCH] Pass struct dev pointer to dma_cache_sync() 2006-12-07 08:39:41 -08:00
dma-ip27.c [PATCH] Pass struct dev pointer to dma_cache_sync() 2006-12-07 08:39:41 -08:00
dma-ip32.c [PATCH] Pass struct dev pointer to dma_cache_sync() 2006-12-07 08:39:41 -08:00
dma-noncoherent.c [PATCH] Pass struct dev pointer to dma_cache_sync() 2006-12-07 08:39:41 -08:00
extable.c
fault.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
highmem.c [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
init.c [MIPS] Move some kernel globals from asm file to C file. 2007-02-06 16:53:16 +00:00
ioremap.c [PATCH] Generic ioremap_page_range: mips conversion 2006-12-08 08:28:52 -08:00
Makefile
pg-r4k.c [MIPS] TX49: Fix use of CDEX build_store_reg() 2007-01-08 21:41:04 +00:00
pg-sb1.c
pgtable-32.c
pgtable-64.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
pgtable.c
sc-ip22.c
sc-mips.c
sc-r5k.c
sc-rm7k.c
tlb-r3k.c
tlb-r4k.c [MIPS] Delete duplicate call to load_irq_save. 2007-01-19 01:08:26 +00:00
tlb-r8k.c
tlbex-fault.S
tlbex.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00