linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] g_NCR5380: Kill compiler warning if builtin
  2015-03-09  5:48 [PATCH 0/3] NCR5380 patches from mailing list Finn Thain
@ 2015-01-03 22:00 ` Finn Thain
  2015-01-29  6:54 ` [PATCH 1/3] ncr5380: Drop owner assignment from platform_drivers Finn Thain
  2015-02-04 18:30 ` [PATCH 3/3] ncr5380: Harmonize jiffies conversion with msecs_to_jiffies Finn Thain
  2 siblings, 0 replies; 4+ messages in thread
From: Finn Thain @ 2015-01-03 22:00 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

From: Geert Uytterhoeven <geert@linux-m68k.org>

If CONFIG_SCSI_GENERIC_NCR5380=y:

drivers/scsi/g_NCR5380.c:727: warning: 'id_table' defined but not used

In the non-modular case, MODULE_DEVICE_TABLE() expands to nothing, and
id_table is not referenced.

Correct the existing #ifdef to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/scsi/g_NCR5380.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index f35792f..74ec2f5 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -723,7 +723,7 @@ module_param(ncr_53c400a, int, 0);
 module_param(dtc_3181e, int, 0);
 MODULE_LICENSE("GPL");
 
-#ifndef SCSI_G_NCR5380_MEM
+#if !defined(SCSI_G_NCR5380_MEM) && defined(MODULE)
 static struct isapnp_device_id id_table[] = {
 	{
 	 ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-- 
2.0.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/3] ncr5380: Drop owner assignment from platform_drivers
  2015-03-09  5:48 [PATCH 0/3] NCR5380 patches from mailing list Finn Thain
  2015-01-03 22:00 ` [PATCH 2/3] g_NCR5380: Kill compiler warning if builtin Finn Thain
@ 2015-01-29  6:54 ` Finn Thain
  2015-02-04 18:30 ` [PATCH 3/3] ncr5380: Harmonize jiffies conversion with msecs_to_jiffies Finn Thain
  2 siblings, 0 replies; 4+ messages in thread
From: Finn Thain @ 2015-01-29  6:54 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

From: Wolfram Sang <wsa@the-dreams.de>

This platform_driver does not need to set an owner, it will be populated by
the driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/scsi/atari_scsi.c | 1 -
 drivers/scsi/mac_scsi.c   | 1 -
 drivers/scsi/sun3_scsi.c  | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index d1c37a3..5ede3da 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -1014,7 +1014,6 @@ static struct platform_driver atari_scsi_driver = {
 	.remove = __exit_p(atari_scsi_remove),
 	.driver = {
 		.name	= DRV_MODULE_NAME,
-		.owner	= THIS_MODULE,
 	},
 };
 
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index 1e85c07..d64a769 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -483,7 +483,6 @@ static struct platform_driver mac_scsi_driver = {
 	.remove = __exit_p(mac_scsi_remove),
 	.driver = {
 		.name	= DRV_MODULE_NAME,
-		.owner	= THIS_MODULE,
 	},
 };
 
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 2a906d1..22a4283 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -676,7 +676,6 @@ static struct platform_driver sun3_scsi_driver = {
 	.remove = __exit_p(sun3_scsi_remove),
 	.driver = {
 		.name	= DRV_MODULE_NAME,
-		.owner	= THIS_MODULE,
 	},
 };
 
-- 
2.0.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ncr5380: Harmonize jiffies conversion with msecs_to_jiffies
  2015-03-09  5:48 [PATCH 0/3] NCR5380 patches from mailing list Finn Thain
  2015-01-03 22:00 ` [PATCH 2/3] g_NCR5380: Kill compiler warning if builtin Finn Thain
  2015-01-29  6:54 ` [PATCH 1/3] ncr5380: Drop owner assignment from platform_drivers Finn Thain
@ 2015-02-04 18:30 ` Finn Thain
  2 siblings, 0 replies; 4+ messages in thread
From: Finn Thain @ 2015-02-04 18:30 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

From: Nicholas Mc Guire <hofrat@osadl.org>

Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
In addition some timing constants that assumed HZ 100 were adjusted
to HZ independent settings based on review comments from Michael Schmitz
<schmitzmic@gmail.com> and review of the original drivers in 1.0.31 and
2.2.16.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/scsi/NCR5380.c       | 10 +++++-----
 drivers/scsi/atari_NCR5380.c |  2 +-
 drivers/scsi/g_NCR5380.c     |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 8981701..a777e5c 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -474,11 +474,11 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
  */
 #ifndef USLEEP_SLEEP
 /* 20 ms (reasonable hard disk speed) */
-#define USLEEP_SLEEP (20*HZ/1000)
+#define USLEEP_SLEEP msecs_to_jiffies(20)
 #endif
 /* 300 RPM (floppy speed) */
 #ifndef USLEEP_POLL
-#define USLEEP_POLL (200*HZ/1000)
+#define USLEEP_POLL msecs_to_jiffies(200)
 #endif
 #ifndef USLEEP_WAITLONG
 /* RvC: (reasonable time to wait on select error) */
@@ -576,7 +576,7 @@ static int __init __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance,
 		if ((mask & possible) && (request_irq(i, &probe_intr, 0, "NCR-probe", NULL) == 0))
 			trying_irqs |= mask;
 
-	timeout = jiffies + (250 * HZ / 1000);
+	timeout = jiffies + msecs_to_jiffies(250);
 	probe_irq = NO_IRQ;
 
 	/*
@@ -634,7 +634,7 @@ static void prepare_info(struct Scsi_Host *instance)
 	         "sg_tablesize %d, this_id %d, "
 	         "flags { %s%s%s}, "
 #if defined(USLEEP_POLL) && defined(USLEEP_WAITLONG)
-	         "USLEEP_POLL %d, USLEEP_WAITLONG %d, "
+		 "USLEEP_POLL %lu, USLEEP_WAITLONG %lu, "
 #endif
 	         "options { %s} ",
 	         instance->hostt->name, instance->io_port, instance->n_io_port,
@@ -1346,7 +1346,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
 	 * selection.
 	 */
 
-	timeout = jiffies + (250 * HZ / 1000);
+	timeout = jiffies + msecs_to_jiffies(250);
 
 	/* 
 	 * XXX very interesting - we're seeing a bounce where the BSY we 
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index a702554..db87ece 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -1486,7 +1486,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
 	 * selection.
 	 */
 
-	timeout = jiffies + (250 * HZ / 1000);
+	timeout = jiffies + msecs_to_jiffies(250);
 
 	/*
 	 * XXX very interesting - we're seeing a bounce where the BSY we
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 74ec2f5..f8d2478 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -57,9 +57,9 @@
  */
 
 /* settings for DTC3181E card with only Mustek scanner attached */
-#define USLEEP_POLL	1
-#define USLEEP_SLEEP	20
-#define USLEEP_WAITLONG	500
+#define USLEEP_POLL	msecs_to_jiffies(10)
+#define USLEEP_SLEEP	msecs_to_jiffies(200)
+#define USLEEP_WAITLONG	msecs_to_jiffies(5000)
 
 #define AUTOPROBE_IRQ
 
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/3] NCR5380 patches from mailing list
@ 2015-03-09  5:48 Finn Thain
  2015-01-03 22:00 ` [PATCH 2/3] g_NCR5380: Kill compiler warning if builtin Finn Thain
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Finn Thain @ 2015-03-09  5:48 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

As requested by James, these are the NCR5380 patches that were reviewed
on the linux-scsi mailing list.

I've changed my acked-by tags to signed-off-by tags. git am and
git format-patch helpfully moved the email From: headers to the
message bodies, but not the Date: headers, and it chucked out the
recipient headers found in the email submissions and everything
after the "---" cut lines, which might make further review
more difficult...

Geert Uytterhoeven (1):
  g_NCR5380: Kill compiler warning if builtin

Nicholas Mc Guire (1):
  ncr5380: Harmonize jiffies conversion with msecs_to_jiffies

Wolfram Sang (1):
  ncr5380: Drop owner assignment from platform_drivers

 drivers/scsi/NCR5380.c       | 10 +++++-----
 drivers/scsi/atari_NCR5380.c |  2 +-
 drivers/scsi/atari_scsi.c    |  1 -
 drivers/scsi/g_NCR5380.c     |  8 ++++----
 drivers/scsi/mac_scsi.c      |  1 -
 drivers/scsi/sun3_scsi.c     |  1 -
 6 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.0.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-09  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09  5:48 [PATCH 0/3] NCR5380 patches from mailing list Finn Thain
2015-01-03 22:00 ` [PATCH 2/3] g_NCR5380: Kill compiler warning if builtin Finn Thain
2015-01-29  6:54 ` [PATCH 1/3] ncr5380: Drop owner assignment from platform_drivers Finn Thain
2015-02-04 18:30 ` [PATCH 3/3] ncr5380: Harmonize jiffies conversion with msecs_to_jiffies Finn Thain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).