From 730a646ddfea239aa9f6b732d5c10118f6801bc1 Mon Sep 17 00:00:00 2001 From: Amol Lad Date: Wed, 23 May 2007 14:41:37 -0700 Subject: [SCSI] NCR5380: Replace yield() with a better alternative Replaced yield() with cond_resched() Signed-off-by: Amol Lad Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/NCR5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/NCR5380.c') diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index bb3cb336054..18359f6372f 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -347,7 +347,7 @@ static int NCR5380_poll_politely(struct Scsi_Host *instance, int reg, int bit, i if((r & bit) == val) return 0; if(!in_interrupt()) - yield(); + cond_resched(); else cpu_relax(); } -- cgit v1.2.2 From 702809ce9b1e91400826ec2ff203c06fdad36034 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 23 May 2007 14:41:56 -0700 Subject: [SCSI] ncr5380 warning fixes squish these: drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used drivers/scsi/NCR5380.c:633: warning: 'NCR5380_print_options' defined but not used drivers/scsi/NCR5380.c:708: warning: 'NCR5380_proc_info' defined but not used drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used drivers/scsi/NCR5380.c:579: warning: 'NCR5380_probe_irq' defined but not used drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used drivers/scsi/NCR5380.c:708: warning: 'notyet_generic_proc_info' defined but not used drivers/scsi/NCR5380.c:708: warning: 'notyet_generic_proc_info' defined but not used Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/NCR5380.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/NCR5380.c') diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 18359f6372f..37de6b37b08 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -357,7 +357,7 @@ static int NCR5380_poll_politely(struct Scsi_Host *instance, int reg, int bit, i static struct { unsigned char value; const char *name; -} phases[] = { +} phases[] __maybe_unused = { {PHASE_DATAOUT, "DATAOUT"}, {PHASE_DATAIN, "DATAIN"}, {PHASE_CMDOUT, "CMDOUT"}, @@ -575,7 +575,8 @@ static irqreturn_t __init probe_intr(int irq, void *dev_id) * Locks: none, irqs must be enabled on entry */ -static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) +static int __init __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance, + int possible) { NCR5380_local_declare(); struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; @@ -629,7 +630,8 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) * Locks: none */ -static void __init NCR5380_print_options(struct Scsi_Host *instance) +static void __init __maybe_unused +NCR5380_print_options(struct Scsi_Host *instance) { printk(" generic options" #ifdef AUTOPROBE_IRQ @@ -703,8 +705,8 @@ char *lprint_command(unsigned char *cmd, char *pos, char *buffer, int len); static char *lprint_opcode(int opcode, char *pos, char *buffer, int length); -static -int NCR5380_proc_info(struct Scsi_Host *instance, char *buffer, char **start, off_t offset, int length, int inout) +static int __maybe_unused NCR5380_proc_info(struct Scsi_Host *instance, + char *buffer, char **start, off_t offset, int length, int inout) { char *pos = buffer; struct NCR5380_hostdata *hostdata; -- cgit v1.2.2