netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pppoe: warning fix
@ 2008-06-20 23:19 Stephen Hemminger
  2008-06-20 23:41 ` Michal Ostrowski
  2008-06-21  4:58 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2008-06-20 23:19 UTC (permalink / raw)
  To: Michal Ostrowski; +Cc: netdev

Fix warning:
drivers/net/pppoe.c: In function ‘pppoe_recvmsg’:
drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast
because skb->len is unsigned int and total_len is size_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/pppoe.c	2008-06-20 15:56:46.000000000 -0700
+++ b/drivers/net/pppoe.c	2008-06-20 15:57:04.000000000 -0700
@@ -942,7 +942,7 @@ static int pppoe_recvmsg(struct kiocb *i
 	m->msg_namelen = 0;
 
 	if (skb) {
-		total_len = min(total_len, skb->len);
+		total_len = min_t(size_t, total_len, skb->len);
 		error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len);
 		if (error == 0)
 			error = total_len;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-21  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 23:19 [PATCH] pppoe: warning fix Stephen Hemminger
2008-06-20 23:41 ` Michal Ostrowski
2008-06-21  4:58 ` David Miller
2008-06-21  9:26   ` Mark Ryden

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