Skip to contentSkip to conversation

drivers/video/aty/radeon_base.c: compilation warning fix

PATCH Superseded Leonardo Potenza 2 participants 2 messages Jan 6, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/video/aty/radeon_base.c: compilation warning fix

From: Leonardo Potenza <[email protected]>

Added a check for the sysfs_create_bin_file() return value.
In case of error the framebuffer creation is not aborted, but a warning message is generated instead.

---

The aim of this patch is to remove the following warning messages:
drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register':
drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result

drivers/video/aty/radeon_base.c +2 -2
@@ -2331,9 +2331,9 @@ static int __devinit radeonfb_pci_regist
 
 	/* Register some sysfs stuff (should be done better) */
 	if (rinfo->mon1_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
+		WARN_ON(sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr));
 	if (rinfo->mon2_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+		WARN_ON(sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr));
 
 	/* save current mode regs before we switch into the new one
 	 * so we can restore this upon __exit
#1 lore raw

Re: [PATCH resubmit] drivers/video/aty/radeon_base.c: compilation

Quoted 6 lines · Leonardo Potenza

From: Leonardo Potenza <[email protected]>

Added a check for the sysfs_create_bin_file() return value.
In case of error the framebuffer creation is not aborted, but a warning message is generated instead.

Ack.

Quoted 20 lines

The aim of this patch is to remove the following warning messages:
drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register':
drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result

drivers/video/aty/radeon_base.c +2 -2
@@ -2331,9 +2331,9 @@ static int __devinit radeonfb_pci_regist
 
 	/* Register some sysfs stuff (should be done better) */
 	if (rinfo->mon1_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr);
+		WARN_ON(sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid1_attr));
 	if (rinfo->mon2_EDID)
-		sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr);
+		WARN_ON(sysfs_create_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr));
 
 	/* save current mode regs before we switch into the new one
 	 * so we can restore this upon __exit