Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cdrom: make EXPORT_SYMBOL follow exported function

Currently, some EXPORT_SYMBOL declarations do not follow the exported
function, which affects the readability of the code. To maintain
consistency, move these EXPORT_SYMBOL declarations to the correct
position to improve the readability of the code.

Signed-off-by: Enze Li <lienze@kylinos.cn>
Link: https://lore.kernel.org/all/20220406090337.1116708-1-lienze@kylinos.cn
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220515205833.944139-2-phil@philpotter.co.uk
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Enze Li and committed by
Jens Axboe
eeef7565 c5eb0a61

+10 -11
+10 -11
drivers/cdrom/cdrom.c
··· 648 648 mutex_unlock(&cdrom_mutex); 649 649 return 0; 650 650 } 651 + EXPORT_SYMBOL(register_cdrom); 651 652 #undef ENSURE 652 653 653 654 void unregister_cdrom(struct cdrom_device_info *cdi) ··· 664 663 665 664 cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); 666 665 } 666 + EXPORT_SYMBOL(unregister_cdrom); 667 667 668 668 int cdrom_get_media_event(struct cdrom_device_info *cdi, 669 669 struct media_event_desc *med) ··· 692 690 memcpy(med, &buffer[sizeof(*eh)], sizeof(*med)); 693 691 return 0; 694 692 } 693 + EXPORT_SYMBOL(cdrom_get_media_event); 695 694 696 695 static int cdrom_get_random_writable(struct cdrom_device_info *cdi, 697 696 struct rwrt_feature_desc *rfd) ··· 1209 1206 cdi->use_count--; 1210 1207 return ret; 1211 1208 } 1209 + EXPORT_SYMBOL(cdrom_open); 1212 1210 1213 1211 /* This code is similar to that in open_for_data. The routine is called 1214 1212 whenever an audio play operation is requested. ··· 1305 1301 cdo->tray_move(cdi, 1); 1306 1302 } 1307 1303 } 1304 + EXPORT_SYMBOL(cdrom_release); 1308 1305 1309 1306 static int cdrom_read_mech_status(struct cdrom_device_info *cdi, 1310 1307 struct cdrom_changer_info *buf) ··· 1387 1382 kfree(info); 1388 1383 return nslots; 1389 1384 } 1385 + EXPORT_SYMBOL(cdrom_number_of_slots); 1390 1386 1391 1387 1392 1388 /* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */ ··· 1587 1581 cgc->data_direction = type; 1588 1582 cgc->timeout = CDROM_DEF_TIMEOUT; 1589 1583 } 1584 + EXPORT_SYMBOL(init_cdrom_command); 1590 1585 1591 1586 /* DVD handling */ 1592 1587 ··· 2006 1999 cgc->data_direction = CGC_DATA_READ; 2007 2000 return cdo->generic_packet(cdi, cgc); 2008 2001 } 2002 + EXPORT_SYMBOL(cdrom_mode_sense); 2009 2003 2010 2004 int cdrom_mode_select(struct cdrom_device_info *cdi, 2011 2005 struct packet_command *cgc) ··· 2022 2014 cgc->data_direction = CGC_DATA_WRITE; 2023 2015 return cdo->generic_packet(cdi, cgc); 2024 2016 } 2017 + EXPORT_SYMBOL(cdrom_mode_select); 2025 2018 2026 2019 static int cdrom_read_subchannel(struct cdrom_device_info *cdi, 2027 2020 struct cdrom_subchnl *subchnl, int mcn) ··· 2901 2892 *last_written = toc.cdte_addr.lba; 2902 2893 return 0; 2903 2894 } 2895 + EXPORT_SYMBOL(cdrom_get_last_written); 2904 2896 2905 2897 /* return the next writable block. also for udf file system. */ 2906 2898 static int cdrom_get_next_writable(struct cdrom_device_info *cdi, ··· 3439 3429 3440 3430 return -ENOSYS; 3441 3431 } 3442 - 3443 - EXPORT_SYMBOL(cdrom_get_last_written); 3444 - EXPORT_SYMBOL(register_cdrom); 3445 - EXPORT_SYMBOL(unregister_cdrom); 3446 - EXPORT_SYMBOL(cdrom_open); 3447 - EXPORT_SYMBOL(cdrom_release); 3448 3432 EXPORT_SYMBOL(cdrom_ioctl); 3449 - EXPORT_SYMBOL(cdrom_number_of_slots); 3450 - EXPORT_SYMBOL(cdrom_mode_select); 3451 - EXPORT_SYMBOL(cdrom_mode_sense); 3452 - EXPORT_SYMBOL(init_cdrom_command); 3453 - EXPORT_SYMBOL(cdrom_get_media_event); 3454 3433 3455 3434 #ifdef CONFIG_SYSCTL 3456 3435