linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Geoff Levand <geoff@infradead.org>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Jim Paris <jim@jtan.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Minchan Kim <minchan@kernel.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	linuxppc-dev@lists.ozlabs.org, Nitin Gupta <ngupta@vflare.org>,
	drbd-dev@lists.linbit.com
Subject: Re: [PATCH] block: move from strlcpy with unused retval to strscpy
Date: Fri, 19 Aug 2022 17:24:50 +0200	[thread overview]
Message-ID: <a6d3e3a8-f0a6-dffc-c3b6-45d81efc7664@linbit.com> (raw)
In-Reply-To: <20220818205958.6552-1-wsa+renesas@sang-engineering.com>

Am 18.08.22 um 22:59 schrieb Wolfram Sang:
> Follow the advice of the below link and prefer 'strscpy' in this
> subsystem. Conversion is 1:1 because the return value is not used.
> Generated by a coccinelle script.
> 
> Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/block/brd.c               |  2 +-
>  drivers/block/drbd/drbd_nl.c      |  2 +-

For the drbd part:

Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>

>  drivers/block/mtip32xx/mtip32xx.c | 12 ++++++------
>  drivers/block/ps3vram.c           |  2 +-
>  drivers/block/zram/zram_drv.c     |  6 +++---
>  5 files changed, 12 insertions(+), 12 deletions(-)
...
> diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
> index 013d355a2033..864c98e74875 100644
> --- a/drivers/block/drbd/drbd_nl.c
> +++ b/drivers/block/drbd/drbd_nl.c
> @@ -4752,7 +4752,7 @@ void notify_helper(enum drbd_notification_type type,
>  	struct drbd_genlmsghdr *dh;
>  	int err;
>  
> -	strlcpy(helper_info.helper_name, name, sizeof(helper_info.helper_name));
> +	strscpy(helper_info.helper_name, name, sizeof(helper_info.helper_name));
>  	helper_info.helper_name_len = min(strlen(name), sizeof(helper_info.helper_name));
>  	helper_info.helper_status = status;
>
-- 
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage

  parent reply	other threads:[~2022-08-19 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 20:59 [PATCH] block: move from strlcpy with unused retval to strscpy Wolfram Sang
2022-08-19 15:21 ` Geoff Levand
2022-08-19 15:24 ` Christoph Böhmwalder [this message]
2022-09-22  1:45 ` Jens Axboe

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=a6d3e3a8-f0a6-dffc-c3b6-45d81efc7664@linbit.com \
    --to=christoph.boehmwalder@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=geoff@infradead.org \
    --cc=jim@jtan.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=npiggin@gmail.com \
    --cc=philipp.reisner@linbit.com \
    --cc=senozhatsky@chromium.org \
    --cc=wsa+renesas@sang-engineering.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).