All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Marius Kittler <mkittler@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v9 4/4] Extend ioctl02 to test termio and termios
Date: Thu, 2 Nov 2023 14:26:17 +0100	[thread overview]
Message-ID: <ZUOjeXGrVZizSLBi@yuki> (raw)
In-Reply-To: <1880149.tdWV9SEqCh@linux-9lzf>

Hi!
> So I'm honestly not sure whether any of this is better than just making it a 
> macro or maybe I don't understand your suggestion.

And that what macros are for, avoiding repetitive parameters, my
soulution would be to add a macro that just prepares the parameters
for the function and then keep all the code in a function, i.e.

#define CMP_ATTR(term_exp, term, attr) \
        cmp_attr((term_exp)->attr, (term)->attr, #attr)

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-11-02 13:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 11:47 [LTP] [PATCH v9 0/4] Improve ioctl02.c Marius Kittler
2023-10-26 11:47 ` [LTP] [PATCH v9 1/4] Refactor ioctl02.c to use the new test API Marius Kittler
2023-10-26 13:31   ` Petr Vorel
2023-10-26 11:47 ` [LTP] [PATCH v9 2/4] Make checks for termio flags more strict Marius Kittler
2023-10-26 13:32   ` Petr Vorel
2023-10-26 11:47 ` [LTP] [PATCH v9 3/4] Remove disabled code in ioctl02.c Marius Kittler
2023-10-26 13:32   ` Petr Vorel
     [not found]   ` <ZTvPszXRVkkh4vcL@yuki>
2023-10-30 11:21     ` Petr Vorel
2023-10-26 11:47 ` [LTP] [PATCH v9 4/4] Extend ioctl02 to test termio and termios Marius Kittler
     [not found]   ` <ZTvQMpx-q4LnBJgN@yuki>
2023-11-02 13:15     ` Marius Kittler
2023-11-02 13:26       ` Cyril Hrubis [this message]
2023-11-02 15:26         ` Marius Kittler

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=ZUOjeXGrVZizSLBi@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mkittler@suse.de \
    /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.