浏览代码

sh: dma: use __maybe_unused

There is no such thing as labeling a variable as __attribute__((used)).  Since
ts_shift is not referenced in inline assembly, we assume that we're simply
suppressing a warning here if the variable is declared but unreferenced.

Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Rientjes 18 年之前
父节点
当前提交
d16aaffa75
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      include/asm-sh/cpu-sh3/dma.h
  2. 1 1
      include/asm-sh/cpu-sh4/dma-sh7780.h
  3. 1 1
      include/asm-sh/cpu-sh4/dma.h

+ 1 - 1
include/asm-sh/cpu-sh3/dma.h

@@ -26,7 +26,7 @@ enum {
 	XMIT_SZ_128BIT,
 	XMIT_SZ_128BIT,
 };
 };
 
 
-static unsigned int ts_shift[] __attribute__ ((used)) = {
+static unsigned int ts_shift[] __maybe_unused = {
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_16BIT]		= 1,
 	[XMIT_SZ_16BIT]		= 1,
 	[XMIT_SZ_32BIT]		= 2,
 	[XMIT_SZ_32BIT]		= 2,

+ 1 - 1
include/asm-sh/cpu-sh4/dma-sh7780.h

@@ -28,7 +28,7 @@ enum {
 /*
 /*
  * The DMA count is defined as the number of bytes to transfer.
  * The DMA count is defined as the number of bytes to transfer.
  */
  */
-static unsigned int __attribute__ ((used)) ts_shift[] = {
+static unsigned int ts_shift[] __maybe_unused = {
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_16BIT]		= 1,
 	[XMIT_SZ_16BIT]		= 1,
 	[XMIT_SZ_32BIT]		= 2,
 	[XMIT_SZ_32BIT]		= 2,

+ 1 - 1
include/asm-sh/cpu-sh4/dma.h

@@ -53,7 +53,7 @@ enum {
 /*
 /*
  * The DMA count is defined as the number of bytes to transfer.
  * The DMA count is defined as the number of bytes to transfer.
  */
  */
-static unsigned int ts_shift[] __attribute__ ((used)) = {
+static unsigned int ts_shift[] __maybe_unused = {
 	[XMIT_SZ_64BIT]		= 3,
 	[XMIT_SZ_64BIT]		= 3,
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_8BIT]		= 0,
 	[XMIT_SZ_16BIT]		= 1,
 	[XMIT_SZ_16BIT]		= 1,