netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: make in_aton() 32-bit internally
@ 2017-03-23 21:58 Alexey Dobriyan
  2017-03-24 20:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2017-03-23 21:58 UTC (permalink / raw)
  To: davem; +Cc: netdev

Converting IPv4 address doesn't need 64-bit arithmetic.

Space savings: 10 bytes!

	add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
	function                          old     new   delta
	in_aton                            96      86     -10

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 net/core/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(net_ratelimit);
 
 __be32 in_aton(const char *str)
 {
-	unsigned long l;
+	unsigned int l;
 	unsigned int val;
 	int i;
 

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

* Re: [PATCH] net: make in_aton() 32-bit internally
  2017-03-23 21:58 [PATCH] net: make in_aton() 32-bit internally Alexey Dobriyan
@ 2017-03-24 20:27 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-24 20:27 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Fri, 24 Mar 2017 00:58:26 +0300

> Converting IPv4 address doesn't need 64-bit arithmetic.
> 
> Space savings: 10 bytes!
> 
> 	add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
> 	function                          old     new   delta
> 	in_aton                            96      86     -10
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied to net-next, thanks.

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

end of thread, other threads:[~2017-03-24 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 21:58 [PATCH] net: make in_aton() 32-bit internally Alexey Dobriyan
2017-03-24 20:27 ` David Miller

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