Re: [PATCH] gpio: Skip over NULL and (empty string) line names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 15, 2020 at 2:41 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> The core will warn if we try to assign the name ''
> (empty string) to two lines. Actively ignore NULL
> and empty string in the name assignment loop.

> +               if (!gc->names[i] || !strlen(gc->names[i]))

> +               if (!gc->names[i] || !strlen(gc->names[i]))

> +               if (!names[i] || !strlen(names[i]))

Can we replace strlen() calls by a simple check of the first byte?

names[i][0]


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux