linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <davem@davemloft.net>,
	<kuba@kernel.org>
Subject: Re: [PATCH wireless] iwlwifi: fw: simplify the iwl_fw_dbg_collect_trig()
Date: Wed, 09 Dec 2020 11:45:54 +0200	[thread overview]
Message-ID: <87im9bb9d9.fsf@codeaurora.org> (raw)
In-Reply-To: <20201209092835.20630-1-zhengyongjun3@huawei.com> (Zheng Yongjun's message of "Wed, 9 Dec 2020 17:28:35 +0800")

Zheng Yongjun <zhengyongjun3@huawei.com> writes:

> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
>  drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
> index ab4a8b942c81..9393fcb62076 100644
> --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
> +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
> @@ -2558,7 +2558,7 @@ int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
>  			    struct iwl_fw_dbg_trigger_tlv *trigger,
>  			    const char *fmt, ...)
>  {
> -	int ret, len = 0;
> +	int len = 0;
>  	char buf[64];
>  
>  	if (iwl_trans_dbg_ini_valid(fwrt->trans))
> @@ -2580,13 +2580,8 @@ int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
>  		len = strlen(buf) + 1;
>  	}
>  
> -	ret = iwl_fw_dbg_collect(fwrt, le32_to_cpu(trigger->id), buf, len,
> +	return iwl_fw_dbg_collect(fwrt, le32_to_cpu(trigger->id), buf, len,
>  				 trigger);
> -
> -	if (ret)
> -		return ret;
> -
> -	return 0;
>  }
>  IWL_EXPORT_SYMBOL(iwl_fw_dbg_collect_trig);

Up to Luca of course, but I prefer the original style.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

      reply	other threads:[~2020-12-09  9:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  9:28 [PATCH wireless] iwlwifi: fw: simplify the iwl_fw_dbg_collect_trig() Zheng Yongjun
2020-12-09  9:45 ` Kalle Valo [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=87im9bb9d9.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhengyongjun3@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;
as well as URLs for NNTP newsgroup(s).