From: Andrew Morton <akpm@linux-foundation.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: torvalds@linux-foundation.org, acme@ghostprotocols.net,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix incorrect prototype for ipxrtr_route_packet()
Date: Thu, 17 May 2007 15:27:46 -0700 [thread overview]
Message-ID: <20070517152746.8bd3ea07.akpm@linux-foundation.org> (raw)
In-Reply-To: <1179398893.2859.479.camel@shinybook.infradead.org>
On Thu, 17 May 2007 18:48:12 +0800
David Woodhouse <dwmw2@infradead.org> wrote:
> The function ipxrtr_route_packet() takes a 'len' argument of type
> size_t. However, its prototype in af_ipx.c incorrectly suggests that the
> corresponding argument is of type 'int' instead.
>
> Discovered by building with --combine and letting the compiler see it
> all at once.
>
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
>
> --- a/net/ipx/af_ipx.c
> +++ b/net/ipx/af_ipx.c
> @@ -87,7 +87,7 @@ extern int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc,
> unsigned char *node);
> extern void ipxrtr_del_routes(struct ipx_interface *intrfc);
> extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
> - struct iovec *iov, int len, int noblock);
> + struct iovec *iov, size_t len, int noblock);
> extern int ipxrtr_route_skb(struct sk_buff *skb);
> extern struct ipx_route *ipxrtr_lookup(__be32 net);
> extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg);
Lovely. So it was actually generating wrong code on all
sizeof(size_t)!=sizeof(int) architectures.
If only we could find some way in which all callers of a function as
well as its definition can see the same declaration?
next prev parent reply other threads:[~2007-05-17 22:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 10:48 [PATCH] Fix incorrect prototype for ipxrtr_route_packet() David Woodhouse
2007-05-17 22:27 ` Andrew Morton [this message]
2007-05-18 1:48 ` David Woodhouse
2007-05-18 3:03 ` David Miller
2007-05-23 17:25 ` Ingo Oeser
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=20070517152746.8bd3ea07.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=acme@ghostprotocols.net \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.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 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).