lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 3/8] net: bcmgenet: use CHECKSUM_COMPLETE for NETIF_F_RXCSUM
On Tue, 17 Dec 2019 13:02:24 -0800, Doug Berger wrote:
> @@ -1793,6 +1792,10 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
>
> status = (struct status_64 *)skb->data;
> dma_length_status = status->length_status;
> + if (priv->desc_rxchk_en) {
> + skb->csum = ntohs(status->rx_csum & 0xffff);

This adds a new warning for a W=1 C=1 build:

../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43: warning: incorrect t\
ype in assignment (different base types)
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43: expected restrict\
ed __wsum [usertype] csum
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43: got int

Could you perhaps consider a __force cast or such?

> + skb->ip_summed = CHECKSUM_COMPLETE;
> + }
> }
>
> /* DMA flags and length are still valid no matter how

\
 
 \ /
  Last update: 2019-12-18 00:09    [W:0.082 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site