[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6d1cecd0806201641y602ca494o7730302357664f06@mail.gmail.com>
Date: Fri, 20 Jun 2008 18:41:44 -0500
From: "Michal Ostrowski" <mostrows@...il.com>
To: "Stephen Hemminger" <shemminger@...tta.com>
Cc: "Michal Ostrowski" <mostrows@...thlink.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] pppoe: warning fix
Acked-by: Michal Ostrowski <mostrows@...thlink.net>
On Fri, Jun 20, 2008 at 6:19 PM, Stephen Hemminger
<shemminger@...tta.com> wrote:
> 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@...tta.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;
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists