pppoe: warning fix
Subsystems (2)
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;
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 becauseskb->lenis unsigned int andtotal_lenissize_tSigned-off-by Stephen Hemminger <[email protected]>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;
From: Stephen Hemminger <[email protected]>
Date: Fri, 20 Jun 2008 16:19:12 -0700
Quoted 6 lines
Fix warning:
drivers/net/pppoe.c: In function ‘pppoe_recvmsg’:drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast becauseskb->lenis unsigned int andtotal_lenissize_tSigned-off-by Stephen Hemminger <[email protected]>
Applied, thanks Stephen.
Hi,
David, it seemed that your reply has no text inside !
MR