lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140114152127.GA13575@reykholt.kaiser.cx>
Date:	Tue, 14 Jan 2014 16:21:28 +0100
From:	Martin Kaiser <martin@...ser.cx>
To:	netdev@...r.kernel.org
Cc:	David Miller <davem@...emloft.net>, shahed.shaikh@...gic.com,
	linux-kernel@...r.kernel.org, trivial@...nel.org
Subject: Re: [PATCH -next] qlcnic: fix compiler warning

re-sent as requested by David M.
(I understand the concerns about portability that were raised. At the moment, I don't have a possiblity to do
further rework and testing)

Add an explicit cast to fix the following warning
(seen on Debian Wheezy, gcc 4.7.2)

CC [M]  drivers/net/wireless/rtlwifi/rtl8192ce/trx.o
    drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function ‘qlcnic_send_filter’:
    drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:349:3: warning:                   
    passing argument 2 of ‘ether_addr_equal’ from incompatible pointer type [enabled by default]
    In file included from include/linux/if_vlan.h:16:0,                                         
    from drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:9:
    include/linux/etherdevice.h:244:20: note: expected ‘const u8 *’ but argument is of type ‘u64 *’

Signed-off-by: Martin Kaiser <martin@...ser.cx>
Acked-by: Shahed Shaikh <shahed.shaikh@...gic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 6373f60..3557154 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -346,7 +346,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,
        head = &(adapter->fhash.fhead[hindex]);

        hlist_for_each_entry_safe(tmp_fil, n, head, fnode) {
-               if (ether_addr_equal(tmp_fil->faddr, &src_addr) &&
+               if (ether_addr_equal(tmp_fil->faddr, (const u8 *)&src_addr) &&
                    tmp_fil->vlan_id == vlan_id) {
                        if (jiffies > (QLCNIC_READD_AGE * HZ + tmp_fil->ftime))
                                qlcnic_change_filter(adapter, &src_addr,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ