linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: paulkf@microgate.com
Cc: khc@pm.waw.pl, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] n_hdlc: fix module_param data type/warnings
Date: Mon, 10 Jan 2005 14:58:37 -0800	[thread overview]
Message-ID: <20050110145837.67521020.rddunlap@osdl.org> (raw)


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

---

                 reply	other threads:[~2005-01-10 23:12 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=20050110145837.67521020.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=khc@pm.waw.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulkf@microgate.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;
as well as URLs for NNTP newsgroup(s).