From: Simon Horman <simon.horman@netronome.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: kvalo@codeaurora.org, stas.yakovlev@gmail.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/3] ipw2x00: Remove redundant variable "rc"
Date: Thu, 31 Oct 2019 21:44:49 +0100 [thread overview]
Message-ID: <20191031204449.GC30739@netronome.com> (raw)
In-Reply-To: <1572529580-26594-2-git-send-email-zhongjiang@huawei.com>
On Thu, Oct 31, 2019 at 09:46:18PM +0800, zhong jiang wrote:
> local variable "rc" is not used. hence it is safe to remove and
> just return 0.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
It appears that there is only one caller of
libipw_qos_convert_ac_to_parameters() and that it ignores the return value
(which, as you point out is always 0).
Perhaps it would be cleaner if the return type of
libipw_qos_convert_ac_to_parameters() was void.
> ---
> drivers/net/wireless/intel/ipw2x00/libipw_rx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
> index 34cfd81..df0f37e4 100644
> --- a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
> +++ b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
> @@ -1005,7 +1005,6 @@ static int libipw_qos_convert_ac_to_parameters(struct
> libipw_qos_parameters
> *qos_param)
> {
> - int rc = 0;
> int i;
> struct libipw_qos_ac_parameter *ac_params;
> u32 txop;
> @@ -1030,7 +1029,8 @@ static int libipw_qos_convert_ac_to_parameters(struct
> txop = le16_to_cpu(ac_params->tx_op_limit) * 32;
> qos_param->tx_op_limit[i] = cpu_to_le16(txop);
> }
> - return rc;
> +
> + return 0;
> }
>
> /*
> --
> 1.7.12.4
>
next prev parent reply other threads:[~2019-10-31 20:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 13:46 [PATCH 0/3] wireless: remove unneeded variable and return 0 zhong jiang
2019-10-31 13:46 ` [PATCH 1/3] ipw2x00: Remove redundant variable "rc" zhong jiang
2019-10-31 20:44 ` Simon Horman [this message]
2019-11-01 1:42 ` zhong jiang
2019-10-31 13:46 ` [PATCH 2/3] iwlegacy: Remove redundant variable "ret" zhong jiang
2019-10-31 13:46 ` [PATCH 3/3] b43legacy: ASoC: ux500: Remove redundant variable "count" zhong jiang
2019-11-02 6:04 ` kbuild test robot
2019-11-02 6:04 ` kbuild test robot
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=20191031204449.GC30739@netronome.com \
--to=simon.horman@netronome.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stas.yakovlev@gmail.com \
--cc=zhongjiang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.