Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PPP]: Sparse warning fixes.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Stephen Hemminger and committed by
David S. Miller
3c582b30 ac97f75f

+8 -6
+2 -2
drivers/net/ppp_deflate.c
··· 206 206 * Returns the length of the compressed packet, or 0 if the 207 207 * packet is incompressible. 208 208 */ 209 - int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf, 209 + static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf, 210 210 int isize, int osize) 211 211 { 212 212 struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg; ··· 435 435 * bug, so we return DECOMP_FATALERROR for them in order to turn off 436 436 * compression, even though they are detected by inspecting the input. 437 437 */ 438 - int z_decompress(void *arg, unsigned char *ibuf, int isize, 438 + static int z_decompress(void *arg, unsigned char *ibuf, int isize, 439 439 unsigned char *obuf, int osize) 440 440 { 441 441 struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
+1 -1
drivers/net/ppp_generic.c
··· 1871 1871 * complete packet, or we get to the sequence number for a fragment 1872 1872 * which hasn't arrived but might still do so. 1873 1873 */ 1874 - struct sk_buff * 1874 + static struct sk_buff * 1875 1875 ppp_mp_reconstruct(struct ppp *ppp) 1876 1876 { 1877 1877 u32 seq = ppp->nextseq;
+1 -1
drivers/net/ppp_synctty.c
··· 560 560 * Procedures for encapsulation and framing. 561 561 */ 562 562 563 - struct sk_buff* 563 + static struct sk_buff* 564 564 ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb) 565 565 { 566 566 int proto;
+2
drivers/net/pppoe.c
··· 989 989 } 990 990 991 991 static void *pppoe_seq_start(struct seq_file *seq, loff_t *pos) 992 + __acquires(pppoe_hash_lock) 992 993 { 993 994 loff_t l = *pos; 994 995 ··· 1023 1022 } 1024 1023 1025 1024 static void pppoe_seq_stop(struct seq_file *seq, void *v) 1025 + __releases(pppoe_hash_lock) 1026 1026 { 1027 1027 read_unlock_bh(&pppoe_hash_lock); 1028 1028 }
+2 -2
drivers/net/slhc.c
··· 174 174 175 175 176 176 /* Encode a number */ 177 - unsigned char * 177 + static unsigned char * 178 178 encode(unsigned char *cp, unsigned short n) 179 179 { 180 180 if(n >= 256 || n == 0){ ··· 199 199 } 200 200 201 201 /* Decode a number */ 202 - long 202 + static long 203 203 decode(unsigned char **cpp) 204 204 { 205 205 register int x;