From: Stephen Hemminger <shemminger@vyatta.com>
To: Michal Ostrowski <mostrows@earthlink.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] pppoe: warning fix
Date: Fri, 20 Jun 2008 16:19:12 -0700 [thread overview]
Message-ID: <20080620161912.56f4b557@extreme> (raw)
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;
next reply other threads:[~2008-06-20 23:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 23:19 Stephen Hemminger [this message]
2008-06-20 23:41 ` [PATCH] pppoe: warning fix Michal Ostrowski
2008-06-21 4:58 ` David Miller
2008-06-21 9:26 ` Mark Ryden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080620161912.56f4b557@extreme \
--to=shemminger@vyatta.com \
--cc=mostrows@earthlink.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.