[Nouveau] [PATCH 2/6] drm/nouveau/core: make use of new strtolower() function

Alexandre Courbot gnurou at gmail.com
Sat Jul 2 01:18:11 UTC 2016


On Fri, Jul 1, 2016 at 8:50 AM, Markus Mayer <mmayer at broadcom.com> wrote:
> Call strtolower() rather than walking the string explicitly to convert
> it to lowercase.
>
> Signed-off-by: Markus Mayer <mmayer at broadcom.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
> index 34ecd4a..c50594c 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
> @@ -36,16 +36,11 @@ nvkm_firmware_get(struct nvkm_device *device, const char *fwname,
>  {
>         char f[64];
>         char cname[16];
> -       int i;
>
>         /* Convert device name to lowercase */
>         strncpy(cname, device->chip->name, sizeof(cname));
>         cname[sizeof(cname) - 1] = '\0';
> -       i = strlen(cname);
> -       while (i) {
> -               --i;
> -               cname[i] = tolower(cname[i]);
> -       }
> +       strtolower(cname);

This function doesn't seem to exist as of next-20160701, where have
you found it?


More information about the Nouveau mailing list