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>] [day] [month] [year] [list]
Message-ID: <20241015071029.25639-1-tzimmermann@suse.de>
Date: Tue, 15 Oct 2024 09:09:20 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: deller@....de,
	gonzalo.silvalde@...il.com,
	sfr@...b.auug.org.au
Cc: linux-fbdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Thomas Zimmermann <tzimmermann@...e.de>
Subject: [PATCH] fbdev: sstfb: Fix build after CONFIG_FB_DEVICE changes

Commit 7c0510bb3452 ("fbdev: sstfb: Make CONFIG_FB_DEVICE optional")
made sstfb's dependency on CONFIG_FB_DEVICE optional. Fix the build
error

drivers/video/fbdev/sstfb.c: In function 'sstfb_probe':
drivers/video/fbdev/sstfb.c:1439:2: error: invalid preprocessing directive #fdef; did you mean #ifdef?
 1439 | #fdef CONFIG_FB_DEVICE
      |  ^~~~
      |  ifdef
drivers/video/fbdev/sstfb.c:1442:2: error: #endif without #if
 1442 | #endif
      |  ^~~~~

plus some formatting changes.

Also remove the dependency in the Kconfig rule, so that the driver
can be selected without FB_DEVICE enabled.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Closes: https://lore.kernel.org/lkml/20241015120119.533e65e8@canb.auug.org.au/raw
Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
Fixes: 7c0510bb3452 ("fbdev: sstfb: Make CONFIG_FB_DEVICE optional")
Cc: Gonzalo Silvalde Blanco <gonzalo.silvalde@...il.com>
Cc: Thomas Zimmermann <tzimmermann@...e.de>
Cc: Helge Deller <deller@....de>
---
 drivers/video/fbdev/Kconfig | 1 -
 drivers/video/fbdev/sstfb.c | 6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index ea36c6956bf3..44a8fdbab6df 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1236,7 +1236,6 @@ config FB_3DFX_I2C
 config FB_VOODOO1
 	tristate "3Dfx Voodoo Graphics (sst1) support"
 	depends on FB && PCI
-	depends on FB_DEVICE
 	select FB_IOMEM_HELPERS
 	help
 	  Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or
diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c
index 8d2e9d1f8d80..50e9d2e64d4a 100644
--- a/drivers/video/fbdev/sstfb.c
+++ b/drivers/video/fbdev/sstfb.c
@@ -739,7 +739,7 @@ static ssize_t show_vgapass(struct device *device, struct device_attribute *attr
 }
 static struct device_attribute device_attrs[] = {
 	__ATTR(vgapass, S_IRUGO|S_IWUSR, show_vgapass, store_vgapass)
-	};
+};
 #endif
 
 static int sstfb_ioctl(struct fb_info *info, unsigned int cmd,
@@ -1436,7 +1436,8 @@ static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	sstfb_clear_screen(info);
-#fdef CONFIG_FB_DEVICE
+
+#ifdef CONFIG_FB_DEVICE
 	if (device_create_file(info->dev, &device_attrs[0]))
 		printk(KERN_WARNING "sstfb: can't create sysfs entry.\n");
 #endif
@@ -1468,6 +1469,7 @@ static void sstfb_remove(struct pci_dev *pdev)
 
 	info = pci_get_drvdata(pdev);
 	par = info->par;
+
 #ifdef CONFIG_FB_DEVICE
 	device_remove_file(info->dev, &device_attrs[0]);
 #endif
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ