[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150710.182516.1107515769111345392.davem@davemloft.net>
Date: Fri, 10 Jul 2015 18:25:16 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: claudiu.manoil@...escale.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/4] gianfar: Fix and cleanup rxbd status
handling
From: Claudiu Manoil <claudiu.manoil@...escale.com>
Date: Thu, 9 Jul 2015 19:24:42 +0300
> @@ -2921,6 +2921,7 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
> i = rx_queue->next_to_clean;
>
> while (rx_work_limit--) {
> + unsigned long lstatus;
>
> if (cleaned_cnt >= GFAR_RX_BUFF_ALLOC) {
> gfar_alloc_rx_buffs(rx_queue, cleaned_cnt);
> @@ -2928,7 +2929,8 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
> }
>
> bdp = &rx_queue->rx_bd_base[i];
> - if (be16_to_cpu(bdp->status) & RXBD_EMPTY)
> + lstatus = be32_to_cpu(bdp->lstatus);
> + if (lstatus & BD_LFLAG(RXBD_EMPTY))
> break;
>
> /* order rx buffer descriptor reads */
"lstatus" is not an "unsigned long", it's a "u32".
Don't use ambiguous types for objects with exact known sizes.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists