]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net: Use int instead of u8 for boolean flag
authorJoe Hershberger <joe.hershberger@ni.com>
Sun, 22 Mar 2015 22:09:05 +0000 (17:09 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:30 +0000 (21:47 +0200)
On some archs masking the parameter is inefficient, so don't use u8.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/net.h
net/eth.c

index 22b3e3ab70a3fa4b9fc96940999d5151d3a5e727..f434b9150344b0cd38dfc1d5306f929c6701aeb4 100644 (file)
@@ -178,7 +178,7 @@ void eth_halt(void);                        /* stop SCC */
 const char *eth_get_name(void);                /* get name of current device */
 
 #ifdef CONFIG_MCAST_TFTP
-int eth_mcast_join(IPaddr_t mcast_addr, u8 join);
+int eth_mcast_join(IPaddr_t mcast_addr, int join);
 u32 ether_crc(size_t len, unsigned char const *p);
 #endif
 
index 9ad15cd8a33cfa196bd45ca11e7976e09612742e..b86994e9eb546aa50a285dea9aaba6e8dfa17af0 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -321,7 +321,7 @@ int eth_initialize(bd_t *bis)
  * mcast_addr: multicast ipaddr from which multicast Mac is made
  * join: 1=join, 0=leave.
  */
-int eth_mcast_join(IPaddr_t mcast_ip, u8 join)
+int eth_mcast_join(IPaddr_t mcast_ip, int join)
 {
        u8 mcast_mac[6];
        if (!eth_current || !eth_current->mcast)