From: Heiner Kallweit <hkallweit1@gmail.com>
To: Atlas Yu <atlas.yu@canonical.com>
Cc: davem@davemloft.net, edumazet@google.com, hau@realtek.com,
kuba@kernel.org, netdev@vger.kernel.org, nic_swsd@realtek.com,
pabeni@redhat.com
Subject: Re: DRY rules - extract into inline helper functions
Date: Wed, 27 Mar 2024 07:37:33 +0100 [thread overview]
Message-ID: <ade53d2b-193a-4f78-b2d4-186919359103@gmail.com> (raw)
In-Reply-To: <20240327021541.6499-1-atlas.yu@canonical.com>
On 27.03.2024 03:15, Atlas Yu wrote:
> On Wed, Mar 27, 2024 at 4:29 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
>> cond like conditional would be a little too generic here IMO.
>> Something like rtl_dash_loop_wait_high()/low() would make clear
>> that the poll loop is relevant only if DASH is enabled.
>
> I don't know if cond might be reused later somewhere, so I am thinking of
> creating both dash_loop_wait and cond_loop_wait. And specifying them to be
> inline functions explicitly. What do you think?
It's about replacing a very simple check in 6 places. So we shouldn't
over-engineer the helpers.
It's discouraged to use inline in source files. Kernel standard is to let
the compiler decide.
next prev parent reply other threads:[~2024-03-27 6:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 3:46 [PATCH] r8169: skip DASH fw status checks when DASH is disabled pseudoc
2024-03-22 7:01 ` Heiner Kallweit
2024-03-22 8:16 ` Jiri Pirko
2024-03-22 8:26 ` [PATCH v2] " pseudoc
2024-03-22 9:07 ` Jiri Pirko
2024-03-22 9:20 ` Sorry Jiri Pirko pseudoc
2024-03-22 9:10 ` Sorry for the spam, ignore the previous email please pseudoc
2024-03-26 9:08 ` [PATCH v2] r8169: skip DASH fw status checks when DASH is disabled Paolo Abeni
2024-03-26 10:08 ` DRY rules - extract into rtl_cond_loop_wait_high() Atlas Yu
2024-03-26 20:28 ` Heiner Kallweit
2024-03-27 2:15 ` DRY rules - extract into inline helper functions Atlas Yu
2024-03-27 6:37 ` Heiner Kallweit [this message]
2024-03-22 8:33 ` [PATCH] r8169: skip DASH fw status checks when DASH is disabled pseudoc
2024-03-22 10:16 ` Heiner Kallweit
2024-03-22 10:49 ` Heiner Kallweit Atlas Yu
2024-03-22 12:32 ` r8169 DASH-related issue Heiner Kallweit
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=ade53d2b-193a-4f78-b2d4-186919359103@gmail.com \
--to=hkallweit1@gmail.com \
--cc=atlas.yu@canonical.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hau@realtek.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).