mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Trivial Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [TRIVIAL] 2.5.31_drivers_char_lp.c
Date: Tue, 10 Sep 2002 19:20:15 +1000	[thread overview]
Message-ID: <20020910092648.E88382C38D@lists.samba.org> (raw)

[ As per 2.4.19 AC kernel tree, makes sense --RR ]
From:  Lucas Correia Villa Real <lucasvr@terra.com.br>

  Hi,
  
  This is a trivial patch already applied in the -ac tree for the 2.4.19 kernel.
  Patch for lp.c avoid +/- operations with 0 and explicit some debug information
  as KERN_INFO or KERN_ERR.
  
  Comments?
  
  Lucas
  
  
  

--- trivial-2.5.34/drivers/char/lp.c.orig	2002-09-10 19:10:55.000000000 +1000
+++ trivial-2.5.34/drivers/char/lp.c	2002-09-10 19:10:55.000000000 +1000
@@ -335,7 +335,7 @@
 	do {
 		/* Write the data. */
 		written = parport_write (port, kbuf, copy_size);
-		if (written >= 0) {
+		if (written > 0) {
 			copy_size -= written;
 			count -= written;
 			buf  += written;
@@ -840,7 +840,7 @@
 		    port->probe_info[0].class != PARPORT_CLASS_PRINTER)
 			return;
 		if (lp_count == LP_NO) {
-			printk("lp: ignoring parallel port (max. %d)\n",LP_NO);
+			printk(KERN_INFO "lp: ignoring parallel port (max. %d)\n",LP_NO);
 			return;
 		}
 		if (!lp_register(lp_count, port))
@@ -904,14 +904,14 @@
 	}
 
 	if (register_chrdev (LP_MAJOR, "lp", &lp_fops)) {
-		printk ("lp: unable to get major %d\n", LP_MAJOR);
+		printk (KERN_ERR "lp: unable to get major %d\n", LP_MAJOR);
 		return -EIO;
 	}
 
 	devfs_handle = devfs_mk_dir (NULL, "printers", NULL);
 
 	if (parport_register_driver (&lp_driver)) {
-		printk ("lp: unable to register with parport\n");
+		printk (KERN_ERR "lp: unable to register with parport\n");
 		return -EIO;
 	}
 
-- 
  Don't blame me: the Monkey is driving
  File: Lucas Correia Villa Real <lucasvr@terra.com.br>: [PATCH] 2.5.31_drivers_char_lp.c

                 reply	other threads:[~2002-09-10  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020910092648.E88382C38D@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®