mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] list: rename debugging hooks
Date: Thu, 4 Jan 2024 10:12:21 +0100	[thread overview]
Message-ID: <20240104091221.GN1318922@pengutronix.de> (raw)
In-Reply-To: <20240103101948.2630473-1-a.fatoum@pengutronix.de>

On Wed, Jan 03, 2024 at 11:19:47AM +0100, Ahmad Fatoum wrote:
> Linux recently renamed the name of these helpers, so have barebox follow
> suit before implementing them out of line when optional list debugging
> is enabled.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  include/linux/list.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/include/linux/list.h b/include/linux/list.h
> index 1341806b59da..60b0111f467c 100644
> --- a/include/linux/list.h
> +++ b/include/linux/list.h
> @@ -37,18 +37,18 @@ static inline void INIT_LIST_HEAD(struct list_head *list)
>  }
>  
>  #ifdef CONFIG_DEBUG_LIST
> -extern bool __list_add_valid(struct list_head *new,
> -			      struct list_head *prev,
> -			      struct list_head *next);
> -extern bool __list_del_entry_valid(struct list_head *entry);
> +extern bool __list_add_valid_or_report(struct list_head *new,
> +				       struct list_head *prev,
> +				       struct list_head *next);
> +extern bool __list_del_entry_valid_or_report(struct list_head *entry);
>  #else
> -static inline bool __list_add_valid(struct list_head *new,
> -				struct list_head *prev,
> -				struct list_head *next)
> +static inline bool __list_add_valid_or_report(struct list_head *new,
> +					      struct list_head *prev,
> +					      struct list_head *next)
>  {
>  	return true;
>  }
> -static inline bool __list_del_entry_valid(struct list_head *entry)
> +static inline bool __list_del_entry_valid_or_report(struct list_head *entry)
>  {
>  	return true;
>  }
> @@ -64,7 +64,7 @@ static inline void __list_add(struct list_head *new,
>  			      struct list_head *prev,
>  			      struct list_head *next)
>  {
> -	if (!__list_add_valid(new, prev, next))
> +	if (!__list_add_valid_or_report(new, prev, next))
>  		return;
>  
>  	next->prev = new;
> @@ -129,7 +129,7 @@ static inline void __list_del_clearprev(struct list_head *entry)
>  
>  static inline void __list_del_entry(struct list_head *entry)
>  {
> -	if (!__list_del_entry_valid(entry))
> +	if (!__list_del_entry_valid_or_report(entry))
>  		return;
>  
>  	__list_del(entry->prev, entry->next);
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2024-01-04  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 10:19 Ahmad Fatoum
2024-01-03 10:19 ` [PATCH 2/2] lib: add optional linked list debugging Ahmad Fatoum
2024-01-04  9:12 ` Sascha Hauer [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=20240104091221.GN1318922@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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