From: Stephen Hemminger <shemminger@vyatta.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] ppp: sparse warning fixes
Date: Wed, 23 Jan 2008 23:40:19 +0000 [thread overview]
Message-ID: <20080123154019.7cd9c471@deepthought> (raw)
Fix a bunch of warnings in PPP and related drivers. Mostly because
sparse doesn't like it when the the function is only marked private
in the forward declaration.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/ppp_deflate.c | 4 ++--
drivers/net/ppp_generic.c | 2 +-
drivers/net/ppp_synctty.c | 2 +-
drivers/net/pppoe.c | 2 ++
drivers/net/slhc.c | 4 ++--
5 files changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/net/ppp_deflate.c 2008-01-23 15:35:22.000000000 -0800
+++ b/drivers/net/ppp_deflate.c 2008-01-23 15:35:40.000000000 -0800
@@ -206,7 +206,7 @@ static void z_comp_reset(void *arg)
* Returns the length of the compressed packet, or 0 if the
* packet is incompressible.
*/
-int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
+static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
int isize, int osize)
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
@@ -435,7 +435,7 @@ static void z_decomp_reset(void *arg)
* bug, so we return DECOMP_FATALERROR for them in order to turn off
* compression, even though they are detected by inspecting the input.
*/
-int z_decompress(void *arg, unsigned char *ibuf, int isize,
+static int z_decompress(void *arg, unsigned char *ibuf, int isize,
unsigned char *obuf, int osize)
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
--- a/drivers/net/ppp_generic.c 2008-01-23 15:34:40.000000000 -0800
+++ b/drivers/net/ppp_generic.c 2008-01-23 15:34:45.000000000 -0800
@@ -1871,7 +1871,7 @@ ppp_mp_insert(struct ppp *ppp, struct sk
* complete packet, or we get to the sequence number for a fragment
* which hasn't arrived but might still do so.
*/
-struct sk_buff *
+static struct sk_buff *
ppp_mp_reconstruct(struct ppp *ppp)
{
u32 seq = ppp->nextseq;
--- a/drivers/net/ppp_synctty.c 2008-01-23 15:35:04.000000000 -0800
+++ b/drivers/net/ppp_synctty.c 2008-01-23 15:35:08.000000000 -0800
@@ -560,7 +560,7 @@ static void ppp_sync_process(unsigned lo
* Procedures for encapsulation and framing.
*/
-struct sk_buff*
+static struct sk_buff*
ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb)
{
int proto;
--- a/drivers/net/pppoe.c 2008-01-23 15:35:52.000000000 -0800
+++ b/drivers/net/pppoe.c 2008-01-23 15:36:16.000000000 -0800
@@ -989,6 +989,7 @@ out:
}
static void *pppoe_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(pppoe_hash_lock)
{
loff_t l = *pos;
@@ -1022,6 +1023,7 @@ out:
}
static void pppoe_seq_stop(struct seq_file *seq, void *v)
+ __releases(pppoe_hash_lock)
{
read_unlock_bh(&pppoe_hash_lock);
}
--- a/drivers/net/slhc.c 2008-01-23 15:36:45.000000000 -0800
+++ b/drivers/net/slhc.c 2008-01-23 15:37:22.000000000 -0800
@@ -174,7 +174,7 @@ put16(unsigned char *cp, unsigned short
/* Encode a number */
-unsigned char *
+static unsigned char *
encode(unsigned char *cp, unsigned short n)
{
if(n >= 256 || n = 0){
@@ -199,7 +199,7 @@ pull16(unsigned char **cpp)
}
/* Decode a number */
-long
+static long
decode(unsigned char **cpp)
{
register int x;
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] ppp: sparse warning fixes
Date: Wed, 23 Jan 2008 15:40:19 -0800 [thread overview]
Message-ID: <20080123154019.7cd9c471@deepthought> (raw)
Fix a bunch of warnings in PPP and related drivers. Mostly because
sparse doesn't like it when the the function is only marked private
in the forward declaration.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/ppp_deflate.c | 4 ++--
drivers/net/ppp_generic.c | 2 +-
drivers/net/ppp_synctty.c | 2 +-
drivers/net/pppoe.c | 2 ++
drivers/net/slhc.c | 4 ++--
5 files changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/net/ppp_deflate.c 2008-01-23 15:35:22.000000000 -0800
+++ b/drivers/net/ppp_deflate.c 2008-01-23 15:35:40.000000000 -0800
@@ -206,7 +206,7 @@ static void z_comp_reset(void *arg)
* Returns the length of the compressed packet, or 0 if the
* packet is incompressible.
*/
-int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
+static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
int isize, int osize)
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
@@ -435,7 +435,7 @@ static void z_decomp_reset(void *arg)
* bug, so we return DECOMP_FATALERROR for them in order to turn off
* compression, even though they are detected by inspecting the input.
*/
-int z_decompress(void *arg, unsigned char *ibuf, int isize,
+static int z_decompress(void *arg, unsigned char *ibuf, int isize,
unsigned char *obuf, int osize)
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
--- a/drivers/net/ppp_generic.c 2008-01-23 15:34:40.000000000 -0800
+++ b/drivers/net/ppp_generic.c 2008-01-23 15:34:45.000000000 -0800
@@ -1871,7 +1871,7 @@ ppp_mp_insert(struct ppp *ppp, struct sk
* complete packet, or we get to the sequence number for a fragment
* which hasn't arrived but might still do so.
*/
-struct sk_buff *
+static struct sk_buff *
ppp_mp_reconstruct(struct ppp *ppp)
{
u32 seq = ppp->nextseq;
--- a/drivers/net/ppp_synctty.c 2008-01-23 15:35:04.000000000 -0800
+++ b/drivers/net/ppp_synctty.c 2008-01-23 15:35:08.000000000 -0800
@@ -560,7 +560,7 @@ static void ppp_sync_process(unsigned lo
* Procedures for encapsulation and framing.
*/
-struct sk_buff*
+static struct sk_buff*
ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb)
{
int proto;
--- a/drivers/net/pppoe.c 2008-01-23 15:35:52.000000000 -0800
+++ b/drivers/net/pppoe.c 2008-01-23 15:36:16.000000000 -0800
@@ -989,6 +989,7 @@ out:
}
static void *pppoe_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(pppoe_hash_lock)
{
loff_t l = *pos;
@@ -1022,6 +1023,7 @@ out:
}
static void pppoe_seq_stop(struct seq_file *seq, void *v)
+ __releases(pppoe_hash_lock)
{
read_unlock_bh(&pppoe_hash_lock);
}
--- a/drivers/net/slhc.c 2008-01-23 15:36:45.000000000 -0800
+++ b/drivers/net/slhc.c 2008-01-23 15:37:22.000000000 -0800
@@ -174,7 +174,7 @@ put16(unsigned char *cp, unsigned short
/* Encode a number */
-unsigned char *
+static unsigned char *
encode(unsigned char *cp, unsigned short n)
{
if(n >= 256 || n == 0){
@@ -199,7 +199,7 @@ pull16(unsigned char **cpp)
}
/* Decode a number */
-long
+static long
decode(unsigned char **cpp)
{
register int x;
next reply other threads:[~2008-01-23 23:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 23:40 Stephen Hemminger [this message]
2008-01-23 23:40 ` [PATCH] ppp: sparse warning fixes Stephen Hemminger
2008-01-24 4:54 ` David Miller
2008-01-24 4:54 ` David Miller
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=20080123154019.7cd9c471@deepthought \
--to=shemminger@vyatta.com \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.