From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-xe@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH v3 1/3] drm/xe: Add helpers for manipulating macro arguments
Date: Fri, 3 May 2024 18:59:07 +0300 [thread overview]
Message-ID: <ZjUJyy7Ziy8cWdx0@smile.fi.intel.com> (raw)
In-Reply-To: <20240502223313.2527-2-michal.wajdeczko@intel.com>
On Fri, May 03, 2024 at 12:33:11AM +0200, Michal Wajdeczko wrote:
> Define generic helpers that will replace private definitions used
> by the RTP code and will allow reuse by the new code.
>
> Put them in new xe_args.h file (instead of infamous xe_macros.h)
> as once we find more potential users outside of the Xe driver we
> may want to move all of these macros as-is to linux/args.h.
...
> +#define DROP_FIRST(args...) __DROP_FIRST(args)
> +#define __DROP_FIRST(a, b...) b
> +#define PICK_FIRST(args...) __PICK_FIRST(args)
> +#define __PICK_FIRST(a, b...) a
> +#define PICK_LAST(args...) __PICK_ARG(COUNT_ARGS(args), args)
All but these have ARG(S) in the name, I would add it.
> +#define __PICK_ARG(n, args...) CALL_ARGS(CONCATENATE(PICK_ARG, n), args)
Interesting, why FIRST and LAST are not symmetrical. Maybe the first
counterpart can use the __PICK_ARG()?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-05-03 15:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 22:33 [PATCH v3 0/3] Define generic helpers for manipulating macro arguments Michal Wajdeczko
2024-05-02 22:33 ` [PATCH v3 1/3] drm/xe: Add " Michal Wajdeczko
2024-05-03 15:59 ` Andy Shevchenko [this message]
2024-05-06 13:17 ` Michal Wajdeczko
2024-05-06 13:59 ` Andy Shevchenko
2024-05-02 22:33 ` [PATCH v3 2/3] drm/xe/kunit: Add simple tests for new xe_args macros Michal Wajdeczko
2024-05-03 2:40 ` Lucas De Marchi
2024-05-02 22:33 ` [PATCH v3 3/3] drm/xe/rtp: Prefer helper macros from xe_args.h Michal Wajdeczko
2024-05-02 22:54 ` ✓ CI.Patch_applied: success for Define generic helpers for manipulating macro arguments (rev3) Patchwork
2024-05-02 22:54 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-02 22:55 ` ✓ CI.KUnit: success " Patchwork
2024-05-02 23:11 ` ✓ CI.Build: " Patchwork
2024-05-02 23:14 ` ✓ CI.Hooks: " Patchwork
2024-05-02 23:16 ` ✓ CI.checksparse: " Patchwork
2024-05-02 23:51 ` ✓ CI.BAT: " Patchwork
2024-05-03 1:47 ` ✓ CI.FULL: " 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=ZjUJyy7Ziy8cWdx0@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=michal.wajdeczko@intel.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