[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c7e6fe1c-ff46-4541-ab6c-6dd776924f95@gmail.com>
Date: Thu, 15 Jan 2026 18:59:16 -0800
From: Chintan Patel <chintanlike@...il.com>
To: Thomas Zimmermann <tzimmermann@...e.de>, linux-fbdev@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-omap@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
andy@...nel.org, deller@....de, gregkh@...uxfoundation.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v6] staging: fbtft: Use fbdev logging helpers when
FB_DEVICE is disabled
On 1/14/26 23:55, Thomas Zimmermann wrote:
> Hi
>
> Am 13.01.26 um 05:59 schrieb Chintan Patel:
>> Replace direct accesses to info->dev with fb_dbg() and fb_info()
>> helpers to avoid build failures when CONFIG_FB_DEVICE=n.
>>
>> Fixes: a06d03f9f238 ("staging: fbtft: Make FB_DEVICE dependency
>> optional")
>> Reported-by: kernel test robot <lkp@...el.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202601110740.Y9XK5HtN-
>> lkp@...el.com
>> Signed-off-by: Chintan Patel <chintanlike@...il.com>
>>
>> Changes in v6:
>> - Switch debug/info logging to fb_dbg() and fb_info()(suggested by
>> Thomas Zimmermann)
>> - Drop dev_of_fbinfo() usage in favor of framebuffer helpers that
>> implicitly
>> handle the debug/info context.
>> - Drop __func__ usage per review feedback(suggested by greg k-h)
>> - Add Fixes tag for a06d03f9f238 ("staging: fbtft: Make FB_DEVICE
>> dependency optional")
>> (suggested by Andy Shevchenko)
>>
>> Changes in v5:
>> - Initial attempt to replace info->dev accesses using
>> dev_of_fbinfo() helper
>> ---
>> drivers/staging/fbtft/fbtft-core.c | 19 +++++++++----------
>> 1 file changed, 9 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/
>> fbtft/fbtft-core.c
>> index 8a5ccc8ae0a1..1b3b62950205 100644
>> --- a/drivers/staging/fbtft/fbtft-core.c
>> +++ b/drivers/staging/fbtft/fbtft-core.c
>> @@ -365,9 +365,9 @@ static int fbtft_fb_setcolreg(unsigned int regno,
>> unsigned int red,
>> unsigned int val;
>> int ret = 1;
>> - dev_dbg(info->dev,
>> - "%s(regno=%u, red=0x%X, green=0x%X, blue=0x%X, trans=0x%X)\n",
>> - __func__, regno, red, green, blue, transp);
>> + fb_dbg(info,
>> + "regno=%u, red=0x%X, green=0x%X, blue=0x%X, trans=0x%X\n",
>> + regno, red, green, blue, transp);
>> switch (info->fix.visual) {
>> case FB_VISUAL_TRUECOLOR:
>> @@ -391,8 +391,7 @@ static int fbtft_fb_blank(int blank, struct
>> fb_info *info)
>> struct fbtft_par *par = info->par;
>> int ret = -EINVAL;
>> - dev_dbg(info->dev, "%s(blank=%d)\n",
>> - __func__, blank);
>> + fb_dbg(info, "blank=%d\n", blank);
>> if (!par->fbtftops.blank)
>> return ret;
>> @@ -793,11 +792,11 @@ int fbtft_register_framebuffer(struct fb_info
>> *fb_info)
>> if (spi)
>> sprintf(text2, ", spi%d.%d at %d MHz", spi->controller-
>> >bus_num,
>> spi_get_chipselect(spi, 0), spi->max_speed_hz / 1000000);
>> - dev_info(fb_info->dev,
>> - "%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n",
>> - fb_info->fix.id, fb_info->var.xres, fb_info->var.yres,
>> - fb_info->fix.smem_len >> 10, text1,
>> - HZ / fb_info->fbdefio->delay, text2);
>> + fb_info(fb_info,
>> + "%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n",
>> + fb_info->fix.id, fb_info->var.xres, fb_info->var.yres,
>> + fb_info->fix.smem_len >> 10, text1,
>> + HZ / fb_info->fbdefio->delay, text2);
>
> As discussed before, this should become fb_dbg(). Drivers should not
> print status reports unless they do not work as expected.
Agree - I will send 2 patches(series) as per feedback 1) a patch focused
purely on fixing the compilation issue by avoiding info->dev
dereferences (using fb_dbg() where logging remains), and
2) a follow-up cleanup that downgrades the framebuffer
registration message to debug level.
> Best regards
> Thomas
>
>> /* Turn on backlight if available */
>> if (fb_info->bl_dev) {
>
Powered by blists - more mailing lists