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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3cc6c1f-97f4-45f1-a909-00cf986cd465@linux.dev>
Date: Thu, 5 Sep 2024 10:09:51 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: "Simek, Michal" <michal.simek@....com>,
 "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] net: xilinx: axienet: Remove unused checksum
 variables

On 9/4/24 13:03, Pandey, Radhey Shyam wrote:
>> -----Original Message-----
>> From: Sean Anderson <sean.anderson@...ux.dev>
>> Sent: Wednesday, September 4, 2024 12:14 AM
>> To: Pandey, Radhey Shyam <radhey.shyam.pandey@....com>; David S .
>> Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>;
>> Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>;
>> netdev@...r.kernel.org
>> Cc: Simek, Michal <michal.simek@....com>; linux-arm-
>> kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; Sean Anderson
>> <sean.anderson@...ux.dev>
>> Subject: [PATCH 1/3] net: xilinx: axienet: Remove unused checksum variables
>> 
>> These variables are set but never used. Remove them
>> 
> 
> Nit - Missing "." at the end.

Will fix if I send a v2.

> Also, just curious how you found these unused vars ? 
> using some tool or in code walkthrough?

I read the code and noticed it :)

--Sean

>> Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>
> 
> Rest seems fine.
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
> 
> 
>> ---
>> 
>>  drivers/net/ethernet/xilinx/xilinx_axienet.h      |  5 -----
>>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 12 ------------
>>  2 files changed, 17 deletions(-)
>> 
>> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> b/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> index c301dd2ee083..b9d2d7319220 100644
>> --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
>> @@ -527,8 +527,6 @@ struct skbuf_dma_descriptor {
>>   *		  supported, the maximum frame size would be 9k. Else it is
>>   *		  1522 bytes (assuming support for basic VLAN)
>>   * @rxmem:	Stores rx memory size for jumbo frame handling.
>> - * @csum_offload_on_tx_path:	Stores the checksum selection on TX
>> side.
>> - * @csum_offload_on_rx_path:	Stores the checksum selection on RX
>> side.
>>   * @coalesce_count_rx:	Store the irq coalesce on RX side.
>>   * @coalesce_usec_rx:	IRQ coalesce delay for RX
>>   * @coalesce_count_tx:	Store the irq coalesce on TX side.
>> @@ -606,9 +604,6 @@ struct axienet_local {
>>  	u32 max_frm_size;
>>  	u32 rxmem;
>> 
>> -	int csum_offload_on_tx_path;
>> -	int csum_offload_on_rx_path;
>> -
>>  	u32 coalesce_count_rx;
>>  	u32 coalesce_usec_rx;
>>  	u32 coalesce_count_tx;
>> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> index fe6a0e2e463f..60ec430f3eb0 100644
>> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
>> @@ -2631,38 +2631,26 @@ static int axienet_probe(struct platform_device
>> *pdev)
>>  	if (!ret) {
>>  		switch (value) {
>>  		case 1:
>> -			lp->csum_offload_on_tx_path =
>> -				XAE_FEATURE_PARTIAL_TX_CSUM;
>>  			lp->features |= XAE_FEATURE_PARTIAL_TX_CSUM;
>>  			/* Can checksum TCP/UDP over IPv4. */
>>  			ndev->features |= NETIF_F_IP_CSUM;
>>  			break;
>>  		case 2:
>> -			lp->csum_offload_on_tx_path =
>> -				XAE_FEATURE_FULL_TX_CSUM;
>>  			lp->features |= XAE_FEATURE_FULL_TX_CSUM;
>>  			/* Can checksum TCP/UDP over IPv4. */
>>  			ndev->features |= NETIF_F_IP_CSUM;
>>  			break;
>> -		default:
>> -			lp->csum_offload_on_tx_path =
>> XAE_NO_CSUM_OFFLOAD;
>>  		}
>>  	}
>>  	ret = of_property_read_u32(pdev->dev.of_node, "xlnx,rxcsum",
>> &value);
>>  	if (!ret) {
>>  		switch (value) {
>>  		case 1:
>> -			lp->csum_offload_on_rx_path =
>> -				XAE_FEATURE_PARTIAL_RX_CSUM;
>>  			lp->features |= XAE_FEATURE_PARTIAL_RX_CSUM;
>>  			break;
>>  		case 2:
>> -			lp->csum_offload_on_rx_path =
>> -				XAE_FEATURE_FULL_RX_CSUM;
>>  			lp->features |= XAE_FEATURE_FULL_RX_CSUM;
>>  			break;
>> -		default:
>> -			lp->csum_offload_on_rx_path =
>> XAE_NO_CSUM_OFFLOAD;
>>  		}
>>  	}
>>  	/* For supporting jumbo frames, the Axi Ethernet hardware must
>> have
>> --
>> 2.35.1.1320.gc452695387.dirty
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ