From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: fbdev: Wrap fbcon updates from vga-switcheroo in helper
Date: Mon, 25 May 2026 21:30:31 +1000 [thread overview]
Message-ID: <review-patch3-20260520160744.130841-4-tzimmermann@suse.de> (raw)
In-Reply-To: <20260520160744.130841-4-tzimmermann@suse.de>
Patch Review
**Bug — `#if CONFIG_FB`**: The patch adds:
```c
+#if CONFIG_FB
if (new_client->fb_info)
- fbcon_remap_all(new_client->fb_info);
+ fb_switch_outputs(new_client->fb_info);
+#endif
```
This should be `#ifdef CONFIG_FB`. While `#if CONFIG_FB` happens to work for bool Kconfig symbols (undefined macros evaluate to 0 in `#if` expressions), it's not standard kernel preprocessor style. The kernel overwhelmingly uses `#ifdef CONFIG_*` for presence checks. `#if CONFIG_FB` could also trigger compiler warnings with `-Wundef` if enabled.
Moreover, looking at the Kconfig:
```
config VGA_SWITCHEROO
depends on (FRAMEBUFFER_CONSOLE=n || FB=y)
```
When `VGA_SWITCHEROO` is enabled, either `FB=y` (so CONFIG_FB is always defined) or `FRAMEBUFFER_CONSOLE=n` (FB may or may not be set). The guard is functionally needed for the `FRAMEBUFFER_CONSOLE=n && FB=n` case (though that seems unlikely given the dependency implies you need *some* display path).
**Design**: The `fb_switch_outputs()` function is a thin wrapper around `fbcon_remap_all()`. The commit message explains this is a stepping stone toward moving the call into DRM's fbdev emulation, which justifies the indirection. The function is exported with `EXPORT_SYMBOL` since `vga_switcheroo` is outside the fbdev core.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 11:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 16:00 [PATCH 0/4] fbdev: Internalize fbcon Thomas Zimmermann
2026-05-20 16:00 ` [PATCH 1/4] fbdev: Wrap user-invoked calls to fb_set_var() in helper Thomas Zimmermann
2026-05-20 18:51 ` Helge Deller
2026-05-20 21:53 ` Christophe Leroy (CS GROUP)
2026-05-22 12:14 ` Thomas Zimmermann
2026-05-25 11:30 ` Claude review: " Claude Code Review Bot
2026-05-20 16:00 ` [PATCH 2/4] fbdev: Wrap user-invoked calls to fb_blank() " Thomas Zimmermann
2026-05-25 11:30 ` Claude review: " Claude Code Review Bot
2026-05-20 16:00 ` [PATCH 3/4] fbdev: Wrap fbcon updates from vga-switcheroo " Thomas Zimmermann
2026-05-20 18:49 ` Helge Deller
2026-05-25 11:30 ` Claude Code Review Bot [this message]
2026-05-20 16:00 ` [PATCH 4/4] fbdev: Do not export fbcon from fbdev Thomas Zimmermann
2026-05-25 11:30 ` Claude review: " Claude Code Review Bot
2026-05-25 11:30 ` Claude review: fbdev: Internalize fbcon Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-22 12:28 [PATCH v2 0/4] " Thomas Zimmermann
2026-05-22 12:28 ` [PATCH v2 3/4] fbdev: Wrap fbcon updates from vga-switcheroo in helper Thomas Zimmermann
2026-05-25 8:52 ` Claude review: " Claude Code Review Bot
2026-05-27 15:14 [PATCH v3 0/4] fbdev: Internalize fbcon Thomas Zimmermann
2026-05-27 15:14 ` [PATCH v3 3/4] fbdev: Wrap fbcon updates from vga-switcheroo in helper Thomas Zimmermann
2026-05-28 2:12 ` Claude review: " Claude Code Review Bot
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=review-patch3-20260520160744.130841-4-tzimmermann@suse.de \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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