Thread (4 messages) 4 messages, 2 authors, 2021-05-20

Re: [PATCH -next resend] sfc: farch: fix compile warning in efx_farch_dimension_resources()

From: Edward Cree <ecree.xilinx@gmail.com>
Date: 2021-05-20 12:38:44
Also in: lkml

On 20/05/2021 03:13, Yang Yingliang wrote:
On 2021/5/19 22:40, Edward Cree wrote:
quoted
As I said the first time you sent this:
Reverse xmas tree is messed up here, please fix.
Apart from that, LGTM.
Do you mean like this:
That's one way to do it.  But, a couple of nits:
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/sfc/farch.c b/drivers/net/ethernet/sfc/farch.c

index 6048b08b89ec..b16f04cf7223 100644
--- a/drivers/net/ethernet/sfc/farch.c
+++ b/drivers/net/ethernet/sfc/farch.c
@@ -1668,10 +1668,10 @@ void efx_farch_rx_pull_indir_table(struct efx_nic *efx)
  */
 void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw)
 {
-    unsigned vi_count, total_tx_channels;
+    unsigned total_tx_channels, vi_count;
No need to change the order of decls within a line.
Probably this blank line should be removed while we're at it.
quoted hunk ↗ jump to hunk
 #ifdef CONFIG_SFC_SRIOV
-    struct siena_nic_data *nic_data = efx->nic_data;
+    struct siena_nic_data *nic_data;
     unsigned buftbl_min;
 #endif
@@ -1679,6 +1679,7 @@ void efx_farch_dimension_resources(struct efx_nic *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.
      */
Otherwise, looks fine.
-ed
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help