From: Yang Yingliang <hidden> Date: 2021-05-19 02:09:25
Fix the following kernel build warning when CONFIG_SFC_SRIOV is disabled:
drivers/net/ethernet/sfc/farch.c: In function ‘efx_farch_dimension_resources’:
drivers/net/ethernet/sfc/farch.c:1671:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable]
unsigned vi_count, buftbl_min, total_tx_channels;
Signed-off-by: Yang Yingliang <redacted>
---
drivers/net/ethernet/sfc/farch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
From: Edward Cree <ecree.xilinx@gmail.com> Date: 2021-05-19 14:41:34
On 19/05/2021 03:11, Yang Yingliang wrote:
quoted hunk
Fix the following kernel build warning when CONFIG_SFC_SRIOV is disabled:
drivers/net/ethernet/sfc/farch.c: In function ‘efx_farch_dimension_resources’:
drivers/net/ethernet/sfc/farch.c:1671:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable]
unsigned vi_count, buftbl_min, total_tx_channels;
Signed-off-by: Yang Yingliang <redacted>
---
drivers/net/ethernet/sfc/farch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
As I said the first time you sent this:
Reverse xmas tree is messed up here, please fix.
Apart from that, LGTM.
-ed
quoted hunk
total_tx_channels = efx->n_tx_channels + efx->n_extra_tx_channels;
+ vi_count = max(efx->n_channels, total_tx_channels * EFX_MAX_TXQ_PER_CHANNEL);
+
+#ifdef CONFIG_SFC_SRIOV
/* Account for the buffer table entries backing the datapath channels
* and the descriptor caches for those channels.
*/
From: Yang Yingliang <hidden> Date: 2021-05-20 02:14:30
Hi,
On 2021/5/19 22:40, Edward Cree wrote:
On 19/05/2021 03:11, Yang Yingliang wrote:
quoted
Fix the following kernel build warning when CONFIG_SFC_SRIOV is disabled:
drivers/net/ethernet/sfc/farch.c: In function ‘efx_farch_dimension_resources’:
drivers/net/ethernet/sfc/farch.c:1671:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable]
unsigned vi_count, buftbl_min, total_tx_channels;
Signed-off-by: Yang Yingliang <redacted>
---
drivers/net/ethernet/sfc/farch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
*efx, unsigned sram_lim_qw)
vi_count = max(efx->n_channels, total_tx_channels *
EFX_MAX_TXQ_PER_CHANNEL);
#ifdef CONFIG_SFC_SRIOV
+ nic_data = efx->nic_data;
/* Account for the buffer table entries backing the datapath channels
* and the descriptor caches for those channels.
*/
Thanks,
Yang
-ed
quoted
total_tx_channels = efx->n_tx_channels + efx->n_extra_tx_channels;
+ vi_count = max(efx->n_channels, total_tx_channels * EFX_MAX_TXQ_PER_CHANNEL);
+
+#ifdef CONFIG_SFC_SRIOV
/* Account for the buffer table entries backing the datapath channels
* and the descriptor caches for those channels.
*/
vi_count = max(efx->n_channels, total_tx_channels * EFX_MAX_TXQ_PER_CHANNEL);
#ifdef CONFIG_SFC_SRIOV
+ nic_data = efx->nic_data;
/* Account for the buffer table entries backing the datapath channels
* and the descriptor caches for those channels.
*/