n_hdlc: fix module_param data type/warnings
PATCH 1/1 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 <[email protected]>
diffstat:=
drivers/char/n_hdlc.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/char/n_hdlc.c renamed from drivers/char/n_hdlc.c~nhdlc_types +4 -5
@@ -177,7 +177,7 @@ static struct n_hdlc *n_hdlc_alloc (voidstatic 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 tstruct 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 tif (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 [email protected]" );module_param (debuglevel, int,0 ); -module_param (maxframe, int,0 ); +module_param (maxframe, uint,0 );MODULE_ALIAS_LDISC (N_HDLC );
---