public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] st.c : fix up log messages format
@ 2006-11-03  9:25 Luben Tuikov
  2006-11-03 13:32 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Luben Tuikov @ 2006-11-03  9:25 UTC (permalink / raw)
  To: linux-scsi

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 drivers/scsi/st.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

That's a very old patch.

    Luben

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 7f96f33..29d7319 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4072,10 +4072,11 @@ static int st_probe(struct device *dev)
 	disk->number = devfs_register_tape(SDp->devfs_name);
 
 	sdev_printk(KERN_WARNING, SDp,
-		    "Attached scsi tape %s", tape_name(tpnt));
-	printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
-	       tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
-	       queue_dma_alignment(SDp->request_queue) + 1);
+		    "Attached scsi tape %s\n", tape_name(tpnt));
+	sdev_printk(KERN_WARNING, SDp,
+		    "%s: try direct i/o: %s (alignment %d bytes)\n",
+		    tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
+		    queue_dma_alignment(SDp->request_queue) + 1);
 
 	return 0;
 
-- 
1.4.3.3.g6cec



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

* Re: [PATCH] [SCSI] st.c : fix up log messages format
  2006-11-03  9:25 [PATCH] [SCSI] st.c : fix up log messages format Luben Tuikov
@ 2006-11-03 13:32 ` Matthew Wilcox
  2006-11-07 19:56   ` Kai Makisara
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2006-11-03 13:32 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux-scsi

On Fri, Nov 03, 2006 at 01:25:12AM -0800, Luben Tuikov wrote:
>  	sdev_printk(KERN_WARNING, SDp,
> -		    "Attached scsi tape %s", tape_name(tpnt));
> -	printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
> -	       tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
> -	       queue_dma_alignment(SDp->request_queue) + 1);
> +		    "Attached scsi tape %s\n", tape_name(tpnt));
> +	sdev_printk(KERN_WARNING, SDp,
> +		    "%s: try direct i/o: %s (alignment %d bytes)\n",
> +		    tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
> +		    queue_dma_alignment(SDp->request_queue) + 1);
>  

I know you didn't change this ... but why are these KERN_WARNING?
Surely KERN_INFO is more appropriate here?

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

* Re: [PATCH] [SCSI] st.c : fix up log messages format
  2006-11-03 13:32 ` Matthew Wilcox
@ 2006-11-07 19:56   ` Kai Makisara
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Makisara @ 2006-11-07 19:56 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Luben Tuikov, linux-scsi

On Fri, 3 Nov 2006, Matthew Wilcox wrote:

> On Fri, Nov 03, 2006 at 01:25:12AM -0800, Luben Tuikov wrote:
> >  	sdev_printk(KERN_WARNING, SDp,
> > -		    "Attached scsi tape %s", tape_name(tpnt));
> > -	printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
> > -	       tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
> > -	       queue_dma_alignment(SDp->request_queue) + 1);
> > +		    "Attached scsi tape %s\n", tape_name(tpnt));

This has already been fixed.

> > +	sdev_printk(KERN_WARNING, SDp,
> > +		    "%s: try direct i/o: %s (alignment %d bytes)\n",
> > +		    tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
> > +		    queue_dma_alignment(SDp->request_queue) + 1);
> >  
> 
> I know you didn't change this ... but why are these KERN_WARNING?
> Surely KERN_INFO is more appropriate here?

Historical reasons: I suspected that the default loglevel at that time 
would hide the message from the testers. The classification should have 
been changed long time ago.

Looking at the code, I noticed another place with improper printk class. 
The patch below combines all of these things. Tested in todays git kernel.

--

Printk -> sdev_printk change originally from Luben Tuikov 
<ltuikov@yahoo.com>. Loglevel changes prompted by Matthew Wilcox 
<matthew@wil.cx>. 

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>

--- linux-2.6/drivers/scsi/st.c	2006-10-26 20:20:04.000000000 +0300
+++ linux-2.6-k1/drivers/scsi/st.c	2006-11-07 21:39:10.000000000 +0200
@@ -9,7 +9,7 @@
    Steve Hirsch, Andreas Koppenh"ofer, Michael Leodolter, Eyal Lebedinsky,
    Michael Schaefer, J"org Weule, and Eric Youngdale.
 
-   Copyright 1992 - 2005 Kai Makisara
+   Copyright 1992 - 2006 Kai Makisara
    email Kai.Makisara@kolumbus.fi
 
    Some small formal changes - aeb, 950809
@@ -17,7 +17,7 @@
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static const char *verstr = "20050830";
+static const char *verstr = "20061107";
 
 #include <linux/module.h>
 
@@ -999,7 +999,7 @@ static int check_tape(struct scsi_tape *
 			STp->min_block = ((STp->buffer)->b_data[4] << 8) |
 			    (STp->buffer)->b_data[5];
 			if ( DEB( debugging || ) !STp->inited)
-				printk(KERN_WARNING
+				printk(KERN_INFO
                                        "%s: Block limits %d - %d bytes.\n", name,
                                        STp->min_block, STp->max_block);
 		} else {
@@ -1224,7 +1224,7 @@ static int st_flush(struct file *filp, f
 	}
 
 	DEBC( if (STp->nbr_requests)
-		printk(KERN_WARNING "%s: Number of r/w requests %d, dio used in %d, pages %d (%d).\n",
+		printk(KERN_DEBUG "%s: Number of r/w requests %d, dio used in %d, pages %d (%d).\n",
 		       name, STp->nbr_requests, STp->nbr_dio, STp->nbr_pages, STp->nbr_combinable));
 
 	if (STps->rw == ST_WRITING && !STp->pos_unknown) {
@@ -4056,11 +4056,11 @@ static int st_probe(struct device *dev)
 			goto out_free_tape;
 	}
 
-	sdev_printk(KERN_WARNING, SDp,
+	sdev_printk(KERN_NOTICE, SDp,
 		    "Attached scsi tape %s\n", tape_name(tpnt));
-	printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
-	       tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
-	       queue_dma_alignment(SDp->request_queue) + 1);
+	sdev_printk(KERN_INFO, SDp, "%s: try direct i/o: %s (alignment %d B)\n",
+		    tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
+		    queue_dma_alignment(SDp->request_queue) + 1);
 
 	return 0;
 

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

end of thread, other threads:[~2006-11-07 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03  9:25 [PATCH] [SCSI] st.c : fix up log messages format Luben Tuikov
2006-11-03 13:32 ` Matthew Wilcox
2006-11-07 19:56   ` Kai Makisara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox