Messages in this thread Patch in this message | | | Date | Mon, 10 Jan 2005 14:58:37 -0800 | From | "Randy.Dunlap" <> | Subject | [PATCH] n_hdlc: fix module_param data type/warnings |
| |
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); --- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |