linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors <kernel-janitors@vger.kernel.org>,
	Julia Lawall <Julia.Lawall@inria.fr>,
	alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: [PATCH resend] sound: Convert strlcpy to strscpy when return value is unused
Date: Thu, 07 Jan 2021 19:05:53 +0100	[thread overview]
Message-ID: <s5hmtxkzkou.wl-tiwai@suse.de> (raw)
In-Reply-To: <22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com>

On Mon, 04 Jan 2021 18:17:34 +0100,
Joe Perches wrote:
> 
> strlcpy is deprecated.  see: Documentation/process/deprecated.rst
> 
> Change the calls that do not use the strlcpy return value to the
> preferred strscpy.
> 
> Done with cocci script:
> 
> @@
> expression e1, e2, e3;
> @@
> 
> -	strlcpy(
> +	strscpy(
> 	e1, e2, e3);
> 
> This cocci script leaves the instances where the return value is
> used unchanged.
> 
> After this patch, sound/ has 3 uses of strlcpy() that need to be
> manually inspected for conversion and changed one day.
> 
> $ git grep -w strlcpy sound/
> sound/usb/card.c:               len = strlcpy(card->longname, s, sizeof(card->longname));
> sound/usb/mixer.c:      return strlcpy(buf, p->name, buflen);
> sound/usb/mixer.c:                      return strlcpy(buf, p->names[index], buflen);
> 
> Miscellenea:
> 
> o Remove trailing whitespace in conversion of sound/core/hwdep.c
> 
> Link: https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied now.  Thanks.


Takashi

      parent reply	other threads:[~2021-01-07 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 17:17 [PATCH resend] sound: Convert strlcpy to strscpy when return value is unused Joe Perches
2021-01-05 17:55 ` Takashi Iwai
2021-01-07 16:43   ` Mark Brown
2021-01-07 18:05 ` Takashi Iwai [this message]

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=s5hmtxkzkou.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Julia.Lawall@inria.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).