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 1/2] args.h: add more helpers for manipulating macro arguments
Date: Thu, 2 May 2024 13:17:26 +0300 [thread overview]
Message-ID: <ZjNoNoLib_A8EKNa@smile.fi.intel.com> (raw)
In-Reply-To: <d0d5a86c-3234-4cfc-b41b-f0b164d2e287@intel.com>
On Thu, May 02, 2024 at 11:49:16AM +0200, Michal Wajdeczko wrote:
>
>
> On 02.05.2024 09:27, Andy Shevchenko wrote:
> > On Thu, May 02, 2024 at 12:32:20AM +0200, Michal Wajdeczko wrote:
> >> Some advanced macros used to generate code may use helper macros
> >> to manipulate the argument lists. Define generic helpers that can
> >> replace existing local definitions and allow reuse by new code.
> >
> > Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >
> > In general I have no objections, but as I pointed out in the reply to cover
> > letter the statistics is a bit scary, i.e. we add too many lines without clear
>
> with another spotted potential user (macro FIRST from bpf_probe.h) and
> without comments those statistics will look like:
>
> drivers/gpu/drm/xe/xe_rtp.h | 4 ++--
> drivers/gpu/drm/xe/xe_rtp_helpers.h | 26 ++++++++++----------------
> include/linux/args.h | 26 ++++++++++++++++++++++++++
> include/trace/bpf_probe.h | 7 ++-----
> 4 files changed, 40 insertions(+), 23 deletions(-)
Still not convincing, I would suggest to have xe_args.h for now. You may put
a comment that if new users will come, these macros may be moved to args.h.
> > benefit. Anyway, if people okay with that my tag is above (but also pay
> > attention that args.h is used in dozen of cases, including headers, right now
> > and this extension may affect a lot the build time of the kernel).
>
> not an expert here, but I guess the cost of parsing another dozen of
> lines should negligible compared with opening hundreds of other include
> files during compilation ...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-05-02 10:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 22:32 [PATCH 0/2] Define generic helpers for manipulating macro arguments Michal Wajdeczko
2024-05-01 22:32 ` [PATCH 1/2] args.h: add more " Michal Wajdeczko
2024-05-02 7:27 ` Andy Shevchenko
2024-05-02 9:49 ` Michal Wajdeczko
2024-05-02 10:17 ` Andy Shevchenko [this message]
2024-05-01 22:32 ` [PATCH 2/2] drm/xe/rtp: Prefer helper macros from args.h Michal Wajdeczko
2024-05-01 22:38 ` ✓ CI.Patch_applied: success for Define generic helpers for manipulating macro arguments Patchwork
2024-05-01 22:38 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-01 22:39 ` ✓ CI.KUnit: success " Patchwork
2024-05-01 22:51 ` ✓ CI.Build: " Patchwork
2024-05-01 22:53 ` ✓ CI.Hooks: " Patchwork
2024-05-01 22:54 ` ✗ CI.checksparse: warning " Patchwork
2024-05-01 23:17 ` ✓ CI.BAT: success " Patchwork
2024-05-02 0:21 ` ✓ CI.FULL: " Patchwork
2024-05-02 7:24 ` [PATCH 0/2] " Andy Shevchenko
2024-05-02 9:24 ` Michal Wajdeczko
2024-05-02 17:38 ` Lucas De Marchi
2024-05-02 19:50 ` Michal Wajdeczko
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=ZjNoNoLib_A8EKNa@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