mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH -next resend] sfc: farch: fix compile warning in efx_farch_dimension_resources()
Date: Thu, 20 May 2021 12:52:08 +0100	[thread overview]
Message-ID: <ae7d9137-af9f-7434-a1ea-f390765a73eb@gmail.com> (raw)
In-Reply-To: <3bf4adf0-ed98-ab86-cd5a-efca3ea856bc@huawei.com>

On 20/05/2021 03:13, Yang Yingliang wrote:
> On 2021/5/19 22:40, Edward Cree wrote:
>> 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:

> 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.
>  #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

      reply	other threads:[~2021-05-20 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  2:11 Yang Yingliang
2021-05-19 14:40 ` Edward Cree
2021-05-20  2:13   ` Yang Yingliang
2021-05-20 11:52     ` Edward Cree [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae7d9137-af9f-7434-a1ea-f390765a73eb@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®