From: Karolina Stolarek <karolina.stolarek@intel.com>
To: kenechukwu maduechesi <maduechesik@gmail.com>
Cc: <outreachy@lists.linux.dev>, <shreeya.patel23498@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
<linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: rts5208: Replace delay function.
Date: Wed, 18 Oct 2023 10:04:02 +0200 [thread overview]
Message-ID: <c82a0b17-d6fe-39bf-27b3-e0658994a834@intel.com> (raw)
In-Reply-To: <20231018004300.GA3189@ubuntu>
On 18.10.2023 03:03, kenechukwu maduechesi wrote:
> Replace udelay() with usleep_range() for more precise delay handling.
>
> Reported by checkpatch:
>
> CHECK: usleep_range is preferred over udelay
Have you tried to compile your patch? This is something you should do
before sending it to the mailing list.
All the best,
Karolina
>
> Signed-off-by: kenechukwu maduechesi <maduechesik@gmail.com>
> ---
> drivers/staging/rts5208/sd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
> index 74c4f476b3a4..059f99b0a727 100644
> --- a/drivers/staging/rts5208/sd.c
> +++ b/drivers/staging/rts5208/sd.c
> @@ -865,7 +865,7 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)
> PHASE_CHANGE);
> if (retval)
> return retval;
> - udelay(50);
> + usleep_range(50);
> retval = rtsx_write_register(chip, SD_VP_CTL, 0xFF,
> PHASE_CHANGE |
> PHASE_NOT_RESET |
> @@ -877,14 +877,14 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)
> CHANGE_CLK, CHANGE_CLK);
> if (retval)
> return retval;
> - udelay(50);
> + usleep_range(50);
> retval = rtsx_write_register(chip, SD_VP_CTL, 0xFF,
> PHASE_NOT_RESET |
> sample_point);
> if (retval)
> return retval;
> }
> - udelay(100);
> + usleep_range(100);
>
> rtsx_init_cmd(chip);
> rtsx_add_cmd(chip, WRITE_REG_CMD, SD_DCMPS_CTL, DCMPS_CHANGE,
> @@ -918,7 +918,7 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 sample_point, u8 tune_dir)
> return retval;
> }
>
> - udelay(50);
> + usleep_range(50);
> }
>
> retval = rtsx_write_register(chip, SD_CFG1, SD_ASYNC_FIFO_NOT_RST, 0);
> @@ -1416,7 +1416,7 @@ static int sd_wait_data_idle(struct rtsx_chip *chip)
> retval = STATUS_SUCCESS;
> break;
> }
> - udelay(100);
> + usleep_range(100);
> }
> dev_dbg(rtsx_dev(chip), "SD_DATA_STATE: 0x%02x\n", val);
>
next prev parent reply other threads:[~2023-10-18 8:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 1:03 [PATCH] staging: rts5208: Replace delay function kenechukwu maduechesi
2023-10-18 3:38 ` Andi Shyti
2023-10-18 7:03 ` Julia Lawall
2023-10-18 7:32 ` Karolina Stolarek
2023-10-18 7:45 ` Greg Kroah-Hartman
2023-10-18 7:52 ` Karolina Stolarek
2023-10-18 10:28 ` Julia Lawall
2023-10-18 10:40 ` Karolina Stolarek
2023-10-18 22:17 ` Alison Schofield
2023-10-18 10:42 ` Dan Carpenter
2023-10-18 10:38 ` Andi Shyti
2023-10-18 8:04 ` Karolina Stolarek [this message]
2023-10-23 23:09 ` kernel test robot
2023-11-05 20:58 ` kernel 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=c82a0b17-d6fe-39bf-27b3-e0658994a834@intel.com \
--to=karolina.stolarek@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=maduechesik@gmail.com \
--cc=outreachy@lists.linux.dev \
--cc=shreeya.patel23498@gmail.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