From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: cgel.zte@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] drivers/ata: remove redundant val variable
Date: Wed, 5 Jan 2022 14:54:30 +0900 [thread overview]
Message-ID: <e0dcea41-9be3-1555-90a0-eb977c1ea799@opensource.wdc.com> (raw)
In-Reply-To: <20220104112545.601962-1-chi.minghao@zte.com.cn>
On 1/4/22 20:25, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from DIV_ROUND_UP() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> drivers/ata/pata_octeon_cf.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
> index b5a3f710d76d..70f91800fe9e 100644
> --- a/drivers/ata/pata_octeon_cf.c
> +++ b/drivers/ata/pata_octeon_cf.c
> @@ -73,16 +73,12 @@ MODULE_PARM_DESC(enable_dma,
> */
> static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
> {
> - unsigned int val;
> -
> /*
> * Compute # of eclock periods to get desired duration in
> * nanoseconds.
> */
> - val = DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
> + return DIV_ROUND_UP(nsecs * (octeon_get_io_clock_rate() / 1000000),
> 1000 * tim_mult);
> -
> - return val;
> }
>
> static void octeon_cf_set_boot_reg_cfg(int cs, unsigned int multiplier)
Applied to for-5.17. Thanks.
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2022-01-05 5:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 11:25 cgel.zte
2022-01-05 5:54 ` Damien Le Moal [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=e0dcea41-9be3-1555-90a0-eb977c1ea799@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zealci@zte.com.cn \
/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®