Commit 6fea7f6f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen

scsi: acornscsi: mark calc_sync_xfer as __maybe_unused

The calc_sync_xfer function is only used if CONFIG_SCSI_ACORNSCSI_SYNC
is set, otherwise we get a compiler warning:

scsi/arm/acornscsi.c:680:15: warning: 'calc_sync_xfer' defined but not used [-Wunused-function]
 unsigned char calc_sync_xfer(unsigned int period, unsigned int offset)

This marks the function as __maybe_unused to shut up the warning and
silently drop the function in the object code when there is no caller.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 28558f5a
...@@ -677,7 +677,8 @@ int round_period(unsigned int period) ...@@ -677,7 +677,8 @@ int round_period(unsigned int period)
* Copyright: Copyright (c) 1996 John Shifflett, GeoLog Consulting * Copyright: Copyright (c) 1996 John Shifflett, GeoLog Consulting
*/ */
static static
unsigned char calc_sync_xfer(unsigned int period, unsigned int offset) unsigned char __maybe_unused calc_sync_xfer(unsigned int period,
unsigned int offset)
{ {
return sync_xfer_table[round_period(period)].reg_value | return sync_xfer_table[round_period(period)].reg_value |
((offset < SDTR_SIZE) ? offset : SDTR_SIZE); ((offset < SDTR_SIZE) ? offset : SDTR_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment