RE: [PATCH -next] qlcnic: fix compiler warning

From: Shahed Shaikh
Date: Fri Jan 10 2014 - 02:19:58 EST



Adding netdev.

> -----Original Message-----
> From: Martin Kaiser,,, [mailto:martin@xxxxxxxxxxxxxxxxxx] On Behalf Of
> Martin Kaiser
> Sent: Thursday, January 09, 2014 9:29 PM
> To: Himanshu Madhani; Rajesh Borundia
> Cc: linux-kernel; trivial@xxxxxxxxxx
> Subject: [PATCH -next] qlcnic: fix compiler warning
>
> 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 *â
>

If I am not wrong, this patch should go to David's net-next tree.

> Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>

Acked-by: Shahed Shaikh <shahed.shaikh@xxxxxxxxxx>

Thanks,
Shahed
> ---
> 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,
> --
> 1.7.10.4


¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_