From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 14/16] Define __container_of only if not defined yet.
Date: Sat, 22 Mar 2025 00:19:35 +0200 [thread overview]
Message-ID: <Z93l9whslKC-KeTR@intel.com> (raw)
In-Reply-To: <20250304155809.30399-15-info@metux.net>
On Tue, Mar 04, 2025 at 04:58:07PM +0100, Enrico Weigelt, metux IT consult wrote:
> Silence warnings.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
> benchmarks/dri3-swap.c | 2 ++
> src/intel_list.h | 3 +++
> test/present-speed.c | 2 ++
Looks like I never added the benchmarks and tests to the meson
build. So that could partially explain why I'm not seeing this.
But intel_list.h is used for real so I'm confused as to why
you are seeing some issues that I can't see.
Who is defining this in your case?
> 3 files changed, 7 insertions(+)
>
> diff --git a/benchmarks/dri3-swap.c b/benchmarks/dri3-swap.c
> index 4dd423b3..fa8ec34e 100644
> --- a/benchmarks/dri3-swap.c
> +++ b/benchmarks/dri3-swap.c
> @@ -110,8 +110,10 @@ list_move(struct list *list, struct list *head)
> }
> }
>
> +#ifndef __container_of
> #define __container_of(ptr, sample, member) \
> (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
>
> #define list_for_each_entry(pos, head, member) \
> for (pos = __container_of((head)->next, pos, member); \
> diff --git a/src/intel_list.h b/src/intel_list.h
> index c8a3187a..f0fe7af9 100644
> --- a/src/intel_list.h
> +++ b/src/intel_list.h
> @@ -305,8 +305,11 @@ list_is_empty(const struct list *head)
> #define list_last_entry(ptr, type, member) \
> list_entry((ptr)->prev, type, member)
>
> +#ifndef __container_of
> #define __container_of(ptr, sample, member) \
> (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
> +
> /**
> * Loop through the list given by head and set pos to struct in the list.
> *
> diff --git a/test/present-speed.c b/test/present-speed.c
> index eccde931..7765aa94 100644
> --- a/test/present-speed.c
> +++ b/test/present-speed.c
> @@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
> }
> }
>
> +#ifndef __container_of
> #define __container_of(ptr, sample, member) \
> (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
>
> #define list_for_each_entry(pos, head, member) \
> for (pos = __container_of((head)->next, pos, member); \
> --
> 2.39.5
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-03-21 22:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250304155809.30399-1-info@metux.net>
2025-03-04 15:57 ` [PATCH 01/16] meson.build: fix missing Xv dependencies Enrico Weigelt, metux IT consult
2025-03-21 21:56 ` Ville Syrjälä
2025-03-04 15:57 ` [PATCH 02/16] sna: stop using obsolete type aliases Enrico Weigelt, metux IT consult
2025-03-21 21:57 ` Ville Syrjälä
2025-04-09 14:44 ` Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 03/16] tools: fix FTBS on FreeBSD Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 04/16] backlight: use system() instead of System() Enrico Weigelt, metux IT consult
2025-03-21 22:49 ` Ville Syrjälä
2025-03-04 15:57 ` [PATCH 05/16] sna: use GCPtr instead of GC * Enrico Weigelt, metux IT consult
2025-03-21 22:05 ` Ville Syrjälä
2025-04-09 14:48 ` Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 06/16] gitlab CI: common scripts for driver builds Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 07/16] gitlab CI: add pipeline for building against various Xserver releases Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO() Enrico Weigelt, metux IT consult
2025-03-21 22:07 ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors() Enrico Weigelt, metux IT consult
2025-03-21 22:49 ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 10/16] use XNFalloc() instead of xnfalloc Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro Enrico Weigelt, metux IT consult
2025-03-21 22:08 ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 12/16] sna: use xserver's bswap_32() Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 13/16] meson.build: increase required version Enrico Weigelt, metux IT consult
2025-03-21 22:13 ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 14/16] Define __container_of only if not defined yet Enrico Weigelt, metux IT consult
2025-03-21 22:19 ` Ville Syrjälä [this message]
2025-03-04 15:58 ` [PATCH 15/16] use dixDestroyPixmap() instead of direct driver call Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 16/16] use xf86NameCmp() instead of xf86nameCompare() Enrico Weigelt, metux IT consult
2025-03-04 18:35 ` ✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies Patchwork
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=Z93l9whslKC-KeTR@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=info@metux.net \
--cc=intel-gfx@lists.freedesktop.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 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.