From: Chintan Patel <chintanlike@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, andy@kernel.org,
gregkh@linuxfoundation.org
Subject: Re: [PATCH 0/3] fbdev: Guard sysfs interfaces under CONFIG_FB_DEVICE
Date: Tue, 9 Dec 2025 20:26:41 -0800 [thread overview]
Message-ID: <d71e2795-f918-482b-af0e-18376f8ca835@gmail.com> (raw)
In-Reply-To: <CAHp75Vds8GP+daMe9WcEbOaNT91kMHUjidzGUN-1_kVDuWBtLw@mail.gmail.com>
On 12/9/25 06:25, Andy Shevchenko wrote:
> On Tue, Dec 9, 2025 at 10:23 AM Helge Deller <deller@gmx.de> wrote:
>> On 12/9/25 08:27, Thomas Zimmermann wrote:
>
> ...
>
>> This whole series adds a whole lot of ifdef'ery, which I think is the
>> worst approach. It makes the code less readable and leads to two code
>> paths, which may trigger different build errors depending on the config.
>>
>> I'm sure it must be possible to do the same without adding more #ifdefs,
>> e.g. by introducing a function like dev_of_fbinfo(fbinfo) which
>> simply returns NULL for the FB_DEVICE=n case. Then, that value can be tested
>> like
>> if (dev_of_fbinfo(fbinfo))
>> {...do-the-things...}
>> For the FB_DEVICE=n case this will then be optimized out by the compiler,
>> while you still have full compiler syntax checking.
>>
>> Thoughts?
>
> I second you. I am also not a fan of ifdeffery when it can be avoided.
>
Thank you for the review! Will do the change.
prev parent reply other threads:[~2025-12-10 4:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 4:27 [PATCH 0/3] fbdev: Guard sysfs interfaces under CONFIG_FB_DEVICE Chintan Patel
2025-12-09 4:27 ` [PATCH 1/3] fbtft: Make sysfs and dev_*() logging conditional on FB_DEVICE Chintan Patel
2025-12-09 7:25 ` Thomas Zimmermann
2025-12-10 4:24 ` Chintan Patel
2025-12-09 4:27 ` [PATCH 2/3] omapfb: Guard sysfs code under CONFIG_FB_DEVICE Chintan Patel
2025-12-09 4:27 ` [PATCH 3/3] sh_mobile_lcdc: Guard overlay sysfs interfaces " Chintan Patel
2025-12-09 7:27 ` [PATCH 0/3] fbdev: Guard " Thomas Zimmermann
2025-12-09 8:22 ` Helge Deller
2025-12-09 8:42 ` Thomas Zimmermann
2025-12-09 14:25 ` Andy Shevchenko
2025-12-10 4:26 ` Chintan Patel [this message]
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=d71e2795-f918-482b-af0e-18376f8ca835@gmail.com \
--to=chintanlike@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=tzimmermann@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox