All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Elver <elver@google.com>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>,
	 Lucas De Marchi <lucas.demarchi@intel.com>,
	Jani Nikula <jani.nikula@intel.com>,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] list: Add hlist_count_nodes()
Date: Wed, 3 Jan 2024 14:46:00 +0100	[thread overview]
Message-ID: <CANpmjNMqzYsSh-DSsdFz4D_Ad0sAgf9J1A6CBz4fEOXAS4ejjw@mail.gmail.com> (raw)
In-Reply-To: <2f4a5ea1-daa2-4ede-bdc0-6692d7d52e8c@arm.com>

On Wed, 3 Jan 2024 at 13:04, Pierre Gondois <pierre.gondois@arm.com> wrote:
>
> Hello Marco,
>
> On 1/3/24 12:25, Marco Elver wrote:
> > On Wed, 3 Jan 2024 at 10:02, Pierre Gondois <pierre.gondois@arm.com> wrote:
> >>
> >> Add a function to count nodes in a hlist. hlist_count_nodes()
> >> is similar to list_count_nodes().
> >>
> >> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> >
> > Is this patch part of another patch series? As-is, this will be dead
> > code, and there's no guarantee someone will just go and delete it in
> > future. Although this function looks useful, we also should avoid
> > adding new dead code.
>
> The function is indeed not used in the project right now. I needed
> it for a private module. If it helps integrating the function and
> not make it dead code, maybe I could add usages at the following
> places:
> - drivers/gpu/drm/drm_hashtab.c::print_binder_node_nilocked()
> - drivers/md/bcache/sysfs.c::bch_cache_max_chain()

If this function allows to simplify these other places, by all means
go ahead. That would look a lot better than having an unused function.

Thanks,
-- Marco

  reply	other threads:[~2024-01-03 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  9:02 [PATCH] list: Add hlist_count_nodes() Pierre Gondois
2024-01-03 11:25 ` Marco Elver
2024-01-03 12:04   ` Pierre Gondois
2024-01-03 13:46     ` Marco Elver [this message]
2024-01-06 14:18       ` Andy Shevchenko

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=CANpmjNMqzYsSh-DSsdFz4D_Ad0sAgf9J1A6CBz4fEOXAS4ejjw@mail.gmail.com \
    --to=elver@google.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jani.nikula@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=mingo@kernel.org \
    --cc=pierre.gondois@arm.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.