All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Xose Vazquez Perez <xose.vazquez@gmail.com>,
	Martin Wilck <mwilck@suse.com>,
	dm-devel@lists.linux.dev
Subject: Re: [PATCH v2 7/8] libmpathutil: remove vector_repack()
Date: Mon, 12 May 2025 14:35:18 -0400	[thread overview]
Message-ID: <aCI_Znj42P7M5fig@redhat.com> (raw)
In-Reply-To: <20250507190552.209637-8-mwilck@suse.com>

On Wed, May 07, 2025 at 09:05:51PM +0200, Martin Wilck wrote:
> This function is unused, and its implementation looks odd.
> Remove it.
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>

> ---
>  libmpathutil/vector.c | 13 -------------
>  libmpathutil/vector.h |  1 -
>  2 files changed, 14 deletions(-)
> 
> diff --git a/libmpathutil/vector.c b/libmpathutil/vector.c
> index f69d644..6ad5dd5 100644
> --- a/libmpathutil/vector.c
> +++ b/libmpathutil/vector.c
> @@ -138,19 +138,6 @@ vector_del_slot(vector v, int slot)
>  	}
>  }
>  
> -void
> -vector_repack(vector v)
> -{
> -	int i;
> -
> -	if (!v || !v->allocated)
> -		return;
> -
> -	for (i = 0; i < VECTOR_SIZE(v); i++)
> -		if (i > 0 && v->slot[i] == NULL)
> -			vector_del_slot(v, i--);
> -}
> -
>  vector
>  vector_reset(vector v)
>  {
> diff --git a/libmpathutil/vector.h b/libmpathutil/vector.h
> index 85127ad..171ab6a 100644
> --- a/libmpathutil/vector.h
> +++ b/libmpathutil/vector.h
> @@ -86,7 +86,6 @@ extern void vector_del_slot(vector v, int slot);
>  extern void *vector_insert_slot(vector v, int slot, void *value);
>  int find_slot(vector v, const void *addr);
>  int vector_find_or_add_slot(vector v, void *value);
> -extern void vector_repack(vector v);
>  extern void vector_dump(vector v);
>  extern void dump_strvec(vector strvec);
>  extern int vector_move_up(vector v, int src, int dest);
> -- 
> 2.49.0


  reply	other threads:[~2025-05-12 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 19:05 [PATCH v2 0/8] multipath-tools: static analyzer fixes Martin Wilck
2025-05-07 19:05 ` [PATCH v2 1/8] kpartx_id: fix shellcheck reported errors Martin Wilck
2025-05-07 19:05 ` [PATCH v2 2/8] kpartx: fix file descriptor leak Martin Wilck
2025-05-07 19:05 ` [PATCH v2 3/8] libmpathpersist: fix memory leak in mpath_prout_rel() Martin Wilck
2025-05-07 19:05 ` [PATCH v2 4/8] libmpathutil: vector_del_slot: modify v->allocated if realloc fails Martin Wilck
2025-05-12 18:34   ` Benjamin Marzinski
2025-05-07 19:05 ` [PATCH v2 5/8] libmultipath: fix undefined behavior in 31-bit shift Martin Wilck
2025-05-07 19:05 ` [PATCH v2 6/8] libmultipath: prioritizers/iet: fix possible NULL dereference Martin Wilck
2025-05-07 19:05 ` [PATCH v2 7/8] libmpathutil: remove vector_repack() Martin Wilck
2025-05-12 18:35   ` Benjamin Marzinski [this message]
2025-05-07 19:05 ` [PATCH v2 8/8] libmpathutil: remove VECTOR_DEFAULT_SIZE macro Martin Wilck
2025-05-12 18:44   ` Benjamin Marzinski

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=aCI_Znj42P7M5fig@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=martin.wilck@suse.com \
    --cc=mwilck@suse.com \
    --cc=xose.vazquez@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.