lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f6ff11d-0107-4036-bd09-9d87c948e9c5@gmx.de>
Date: Tue, 7 Oct 2025 01:52:59 +0200
From: Helge Deller <deller@....de>
To: Javier Garcia <rampxxxx@...il.com>, u.kleine-koenig@...libre.com,
 tzimmermann@...e.de
Cc: linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, shuah@...nel.org
Subject: Re: [PATCH v2] fbdev: mb862xxfbdrv: Make CONFIG_FB_DEVICE optional

Hi Javier,

thanks for the updated patch!
Some notes:

On 10/6/25 18:41, Javier Garcia wrote:
> This patch wraps the relevant code blocks with `IS_ENABLED(ifdef CONFIG_FB_DEVICE)`,
> allowing the driver to be built and used even if CONFIG_FB_DEVICE is not selected.
> 
> The sysfs only give access to show some controller and cursor registers so
> it's not needed to allow driver works correctly.
> 
> This align with Documentation/drm/todo.rst
> "Remove driver dependencies on FB_DEVICE"

Can you make this commit message more crisp?
E.g. what is the benefit? Something new possible or fixed?
Also, the driver can be built without CONFIG_FB_DEVICE, but it will
then probably not work.
Do you have that card and tested it?
Maybe something like:

Allow the driver to be used for framebuffer text console, even if
support for the /dev/fb device isn't compiled-in (CONFIG_FB_DEVICE=n). 
> Signed-off-by: Javier Garcia <rampxxxx@...il.com>
> ---
> v1 -> v2:
>        * Fix error and improvement , thanks Uwe Kleine-Koenig.
>        * v1 https://lore.kernel.org/lkml/20251005173812.1169436-1-rampxxxx@gmail.com
> 
> 
>   drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> index ade88e7bc760..dc99b8c9ff0f 100644
> --- a/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> +++ b/drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
> @@ -17,6 +17,7 @@
>   #include <linux/module.h>
>   #include <linux/init.h>
>   #include <linux/interrupt.h>
> +#include "linux/kconfig.h"
>   #include <linux/pci.h>
>   #include <linux/of.h>
>   #include <linux/of_address.h>
> @@ -759,7 +760,7 @@ static int of_platform_mb862xx_probe(struct platform_device *ofdev)
>   
>   	dev_set_drvdata(dev, info);
>   
> -	if (device_create_file(dev, &dev_attr_dispregs))
> +	if (IS_ENABLED(CONFIG_FB_DEVICE) && device_create_file(dev, &dev_attr_dispregs))
>   		dev_err(dev, "Can't create sysfs regdump file\n");
>   	return 0;
>   
> @@ -801,7 +802,8 @@ static void of_platform_mb862xx_remove(struct platform_device *ofdev)
>   	free_irq(par->irq, (void *)par);
>   	irq_dispose_mapping(par->irq);
>   
> -	device_remove_file(&ofdev->dev, &dev_attr_dispregs);
> +	if(IS_ENABLED(CONFIG_FB_DEVICE))
> +		device_remove_file(&ofdev->dev, &dev_attr_dispregs);
>   
>   	unregister_framebuffer(fbi);
>   	fb_dealloc_cmap(&fbi->cmap);
> @@ -1101,7 +1103,7 @@ static int mb862xx_pci_probe(struct pci_dev *pdev,
>   
>   	pci_set_drvdata(pdev, info);
>   
> -	if (device_create_file(dev, &dev_attr_dispregs))
> +	if (IS_ENABLED(CONFIG_FB_DEVICE) && device_create_file(dev, &dev_attr_dispregs))
>   		dev_err(dev, "Can't create sysfs regdump file\n");
>   
>   	if (par->type == BT_CARMINE)
> @@ -1151,7 +1153,8 @@ static void mb862xx_pci_remove(struct pci_dev *pdev)
>   
>   	mb862xx_i2c_exit(par);
>   
> -	device_remove_file(&pdev->dev, &dev_attr_dispregs);
> +	if(IS_ENABLED(CONFIG_FB_DEVICE))

a space is missign after "if".

Helge

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ