Skip to content

Commit

Permalink
sh: dma: use __maybe_unused
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Rientjes authored and Linus Torvalds committed May 9, 2007
1 parent f6744c0 commit d16aaff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/asm-sh/cpu-sh3/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum {
XMIT_SZ_128BIT,
};

static unsigned int ts_shift[] __attribute__ ((used)) = {
static unsigned int ts_shift[] __maybe_unused = {
[XMIT_SZ_8BIT] = 0,
[XMIT_SZ_16BIT] = 1,
[XMIT_SZ_32BIT] = 2,
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sh/cpu-sh4/dma-sh7780.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum {
/*
* 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_16BIT] = 1,
[XMIT_SZ_32BIT] = 2,
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sh/cpu-sh4/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum {
/*
* 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_8BIT] = 0,
[XMIT_SZ_16BIT] = 1,
Expand Down

0 comments on commit d16aaff

Please sign in to comment.