[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1118ec6d-e1e7-79f3-08e4-9a79c996eed1@intel.com>
Date: Wed, 18 Oct 2023 09:32:46 +0200
From: Karolina Stolarek <karolina.stolarek@...el.com>
To: Julia Lawall <julia.lawall@...ia.fr>
CC: kenechukwu maduechesi <maduechesik@...il.com>,
<outreachy@...ts.linux.dev>, <shreeya.patel23498@...il.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
<linux-staging@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: rts5208: Replace delay function.
On 18.10.2023 09:03, Julia Lawall wrote:
>
>
> On Tue, 17 Oct 2023, kenechukwu maduechesi wrote:
>
>> Replace udelay() with usleep_range() for more precise delay handling.
>>
>> Reported by checkpatch:
>>
>> CHECK: usleep_range is preferred over udelay
>
> This message is typically not a good candidate for outreachy patches,
> because you need access to the device to be sure that any change is
> correct.
Could we add a paragraph on how to pick good checkpatch.pl error to fix
to the Outreachyfirstpatch docs? This could go to "Find a driver to
clean up" section, for example.
All the best,
Karolina
>
> julia
>
>>
>> Signed-off-by: kenechukwu maduechesi <maduechesik@...il.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);
>>
>> --
>> 2.25.1
>>
>>
>>
>
Powered by blists - more mailing lists