Skip to content

Commit

Permalink
scsi: acornscsi: mark calc_sync_xfer as __maybe_unused
Browse files Browse the repository at this point in the history
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: Arnd Bergmann <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
arndb authored and martinkpetersen committed Feb 24, 2016
1 parent 28558f5 commit 6fea7f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/arm/acornscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ int round_period(unsigned int period)
* Copyright: Copyright (c) 1996 John Shifflett, GeoLog Consulting
*/
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 |
((offset < SDTR_SIZE) ? offset : SDTR_SIZE);
Expand Down

0 comments on commit 6fea7f6

Please sign in to comment.