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

* Re: [PATCH] pppoe: warning fix
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Michal Ostrowski @ 2008-06-20 23:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Michal Ostrowski, netdev

Acked-by: Michal Ostrowski <mostrows@earthlink.net>



On Fri, Jun 20, 2008 at 6:19 PM, Stephen Hemminger
<shemminger@vyatta.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@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

* Re: [PATCH] pppoe: warning fix
  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
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2008-06-21  4:58 UTC (permalink / raw)
  To: shemminger; +Cc: mostrows, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Jun 2008 16:19:12 -0700

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

Applied, thanks Stephen.

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

* Re: [PATCH] pppoe: warning fix
  2008-06-21  4:58 ` David Miller
@ 2008-06-21  9:26   ` Mark Ryden
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Ryden @ 2008-06-21  9:26 UTC (permalink / raw)
  To: David Miller; +Cc: shemminger, mostrows, netdev

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

MR

On Sat, Jun 21, 2008 at 7:58 AM, David Miller <davem@davemloft.net> wrote:
>

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