linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] n_hdlc: fix module_param data type/warnings
@ 2005-01-10 22:58 Randy.Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy.Dunlap @ 2005-01-10 22:58 UTC (permalink / raw)
  To: paulkf; +Cc: khc, lkml


Linux 2.6.10-bk13

Fix gcc warning:
drivers/char/n_hdlc.c:979: warning: return from incompatible pointer type

module_param() for ssize_t is not supported.
Change to uint and fix other associated types.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>

diffstat:=
 drivers/char/n_hdlc.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff -Naurp ./drivers/char/n_hdlc.c~nhdlc_types ./drivers/char/n_hdlc.c
--- ./drivers/char/n_hdlc.c~nhdlc_types	2005-01-10 12:17:58.318622256 -0800
+++ ./drivers/char/n_hdlc.c	2005-01-10 12:15:45.545806792 -0800
@@ -177,7 +177,7 @@ static struct n_hdlc *n_hdlc_alloc (void
 static int debuglevel;
 
 /* max frame size for memory allocations */
-static ssize_t maxframe = 4096;
+static uint maxframe = 4096;
 
 /* TTY callbacks */
 
@@ -657,7 +657,7 @@ static ssize_t n_hdlc_tty_write(struct t
 	struct n_hdlc_buf *tbuf;
 
 	if (debuglevel >= DEBUG_LEVEL_INFO)	
-		printk("%s(%d)n_hdlc_tty_write() called count=%Zd\n",
+		printk("%s(%d)n_hdlc_tty_write() called count=%zu\n",
 			__FILE__,__LINE__,count);
 		
 	/* Verify pointers */
@@ -672,8 +672,7 @@ static ssize_t n_hdlc_tty_write(struct t
 		if (debuglevel & DEBUG_LEVEL_INFO)
 			printk (KERN_WARNING
 				"n_hdlc_tty_write: truncating user packet "
-				"from %lu to %Zd\n", (unsigned long) count,
-				maxframe );
+				"from %zu to %u\n", count, maxframe );
 		count = maxframe;
 	}
 	
@@ -976,5 +975,5 @@ module_exit(n_hdlc_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Paul Fulghum paulkf@microgate.com");
 module_param(debuglevel, int, 0);
-module_param(maxframe, int, 0);
+module_param(maxframe, uint, 0);
 MODULE_ALIAS_LDISC(N_HDLC);

---

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-10 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 22:58 [PATCH] n_hdlc: fix module_param data type/warnings Randy.Dunlap

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).