Skip to contentSkip to conversation

pppoe: warning fix

PATCH Applied Stephen Hemminger 4 participants 4 messages Jun 20, 2008 – Jun 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pppoe: warning fix

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

drivers/net/pppoe.c +1 -1
@@ -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;
Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · Stephen Hemminger

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

drivers/net/pppoe.c 2008-06-20 15:57:04.000000000 -0700 renamed from drivers/net/pppoe.c 2008-06-20 15:56:46.000000000 -0700 +1 -1
@@ -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;
#3 lore raw

Hi,
David, it seemed that your reply has no text inside !

MR

Quoted 1 line · David Miller