Hi,
On 21.06.21 06:52, Sascha Hauer wrote:
> Hi Ahmad,
>
> On Sat, Jun 19, 2021 at 05:26:53AM +0200, Ahmad Fatoum wrote:
>> -}
>> -
>> static int sscanf_two_digits(char *s, int *res)
>> {
>> char buf[3];
>> diff --git a/drivers/of/base.c b/drivers/of/base.c
>> index
Hi Ahmad,
On Sat, Jun 19, 2021 at 05:26:53AM +0200, Ahmad Fatoum wrote:
> -}
> -
> static int sscanf_two_digits(char *s, int *res)
> {
> char buf[3];
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 6e716fcdcf27..f375fcd67572 100644
> --- a/drivers/of/base.c
> +++
We have at least two places opencoding strchrnul, one of them needlessly
iterating twice instead of once over the string. Replace both by calling
a single pass implementation.
Signed-off-by: Ahmad Fatoum
---
commands/hwclock.c | 8
drivers/of/base.c | 5 +