Skip to contentSkip to conversation

cdrom/gdrom: Fix build error

PATCH Applied Guenter Roeck 2 participants 2 messages Jun 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cdrom/gdrom: Fix build error

Commit 7ae24fcee992 ("cdrom: remove the unused mode argument to cdrom_release") was supposed to remove an unused argument from cdrom_release(). but instead removed a used argument from cdrom_open(). This results in the following build error.

drivers/cdrom/gdrom.c: In function 'gdrom_bdops_open':
drivers/cdrom/gdrom.c:484:15: error: too few arguments to function 'cdrom_open'

drivers/cdrom/gdrom.c: In function 'gdrom_bdops_release':
drivers/cdrom/gdrom.c:492:35: error: 'mode' undeclared

Fix it up.

Fixes 7ae24fcee992 ("cdrom: remove the unused mode argument to cdrom_release")
Cc Christoph Hellwig <[email protected]>
Cc Phillip Potter <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christian Brauner <[email protected]>
Cc Jens Axboe <[email protected]>

---
My apologies for the noise if this has already been submitted. If so I didn't find it. Also apologies for the wide distribution, but the file doesn't seem to have a maintainer and I have no idea who would/should apply the patch.

 drivers/cdrom/gdrom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cdrom/gdrom.c +2 -2
index 3a46e27479ff..d668b174ace9 100644
@@ -481,7 +481,7 @@ static int gdrom_bdops_open(struct gendisk *disk, blk_mode_t mode)
 	disk_check_media_change(disk);
 
 	mutex_lock(&gdrom_mutex);
-	ret = cdrom_open(gd.cd_info);
+	ret = cdrom_open(gd.cd_info, mode);
 	mutex_unlock(&gdrom_mutex);
 	return ret;
 }
@@ -489,7 +489,7 @@ static int gdrom_bdops_open(struct gendisk *disk, blk_mode_t mode)
 static void gdrom_bdops_release(struct gendisk *disk)
 {
 	mutex_lock(&gdrom_mutex);
-	cdrom_release(gd.cd_info, mode);
+	cdrom_release(gd.cd_info);
 	mutex_unlock(&gdrom_mutex);
 }
 
Signature · 1 line
2.39.2
Applied
#1 lore raw
Quoted 9 lines · Guenter Roeck

Commit 7ae24fcee992 ("cdrom: remove the unused mode argument to cdrom_release") was supposed to remove an unused argument from cdrom_release(). but instead removed a used argument from cdrom_open(). This results in the following build error.

drivers/cdrom/gdrom.c: In function 'gdrom_bdops_open':
drivers/cdrom/gdrom.c:484:15: error: too few arguments to function 'cdrom_open'

[...]

Applied, thanks!

[1/1] cdrom/gdrom: Fix build error

      commit: a587b046ce921cc1805de6f0f000209b3644cadd

Best regards,

Signature · 1 line
Jens Axboe