Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1096600pxb; Wed, 6 Apr 2022 08:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM3eWOcuy8/SZsKfBem6NpVBBbce9/wDMngPJqE5Aa9LhCWFkCPJVAtsUcnPWEjU3hN/Rq X-Received: by 2002:a17:90a:4604:b0:1bc:8bdd:4a63 with SMTP id w4-20020a17090a460400b001bc8bdd4a63mr10577533pjg.147.1649259476005; Wed, 06 Apr 2022 08:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649259475; cv=none; d=google.com; s=arc-20160816; b=w7Ek6aw6UQHdG6nTzsMP4hxYAcb6eIL03xy64SUr5t9+COTck3yFwGCkar8Cd3npHS MwaroU48kyNCJ7b+4YHnHnbVuGZkqlZwa6JpaTOa32vTyyGmiGm1Kwm8FN3vHRlIOaVG G26xlun0TOPJ8fRpg7fxJh+zx14hxIdyou8IJXKtAcD4r9ToZ7Tuc6MFAAJwr/V/OJZA 0JbxkrntlQPHqk6YN4gst7YZ13lTC5Y/INRHyjEdqMTN1t45YBDc3GWfS/N61+IXMx/7 DObbIEI1JjbceynuUK/Xv7/iqmsTmjdH3UfY0vf+mVL+n0/+JkrklZpCJ//dQbYQyEqT gySw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=P23XkPLakS178rhyUPOoCz6HethKEURrVgi3bEyTOBs=; b=QU7BsKy+BpwCHxwk+SStOLwZ3Ts5MXIGqRw3TpCbW1521ZXIn7d2s9M9M4vuC5t0JR r0yWE5EJ2k7khNPRxamgDJNFsvcJrOu8vx35lBx2IawgRb71wuhLD+xmJvp+WOc37lhF UeNjV5THnUmLa2dwL6JNiOxFg0lxinjpOClBFFtjglqmEuWBXVr+MbL1NoxcY4vgwqKM exNS0CEZgNSJJdOUa5RBXz2hLyp4ODBf+bL9kwsd1uJFR7XlieisGVkbllD6RgqhtE09 W1QYMzRsp1WgC8QCHjs0AAPg4z7MQgukv6rec159NuEB1M7lEfrJGoZfVwrNEdKDfweK qlHA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n4-20020a170902e54400b00153b2d164e4si6675032plf.236.2022.04.06.08.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:37:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DAAEB236934; Wed, 6 Apr 2022 06:51:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234051AbiDFNxq (ORCPT + 99 others); Wed, 6 Apr 2022 09:53:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233555AbiDFNxZ (ORCPT ); Wed, 6 Apr 2022 09:53:25 -0400 Received: from nksmu.kylinos.cn (mailgw.kylinos.cn [123.150.8.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 478CF48B850 for ; Wed, 6 Apr 2022 02:04:24 -0700 (PDT) X-UUID: 2a68b10bd70c4878b239404787f1c2ac-20220406 X-UUID: 2a68b10bd70c4878b239404787f1c2ac-20220406 Received: from cs2c.com.cn [(172.17.111.24)] by nksmu.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 745961270; Wed, 06 Apr 2022 17:03:06 +0800 X-ns-mid: postfix-624D5787-6421288226 Received: from localhost.localdomain (unknown [172.30.60.63]) by cs2c.com.cn (NSMail) with ESMTPSA id 99FDF383C642; Wed, 6 Apr 2022 09:04:07 +0000 (UTC) From: Enze Li To: phil@philpotter.co.uk Cc: linux-kernel@vger.kernel.org Subject: [PATCH] cdrom: make EXPORT_SYMBOL follow exported function Date: Wed, 6 Apr 2022 17:03:37 +0800 Message-Id: <20220406090337.1116708-1-lienze@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/cdrom/cdrom.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 7bd10d63ddbe..2d9dce967c90 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -648,6 +648,7 @@ int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi) mutex_unlock(&cdrom_mutex); return 0; } +EXPORT_SYMBOL(register_cdrom); #undef ENSURE void unregister_cdrom(struct cdrom_device_info *cdi) @@ -663,6 +664,7 @@ void unregister_cdrom(struct cdrom_device_info *cdi) cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); } +EXPORT_SYMBOL(unregister_cdrom); int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med) @@ -690,6 +692,7 @@ int cdrom_get_media_event(struct cdrom_device_info *cdi, memcpy(med, &buffer[sizeof(*eh)], sizeof(*med)); return 0; } +EXPORT_SYMBOL(cdrom_get_media_event); static int cdrom_get_random_writable(struct cdrom_device_info *cdi, struct rwrt_feature_desc *rfd) @@ -1206,6 +1209,7 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, cdi->use_count--; return ret; } +EXPORT_SYMBOL(cdrom_open); /* This code is similar to that in open_for_data. The routine is called whenever an audio play operation is requested. @@ -1301,6 +1305,7 @@ void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode) cdo->tray_move(cdi, 1); } } +EXPORT_SYMBOL(cdrom_release); static int cdrom_read_mech_status(struct cdrom_device_info *cdi, struct cdrom_changer_info *buf) @@ -1383,6 +1388,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi) kfree(info); return nslots; } +EXPORT_SYMBOL(cdrom_number_of_slots); /* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */ @@ -1582,6 +1588,7 @@ void init_cdrom_command(struct packet_command *cgc, void *buf, int len, cgc->data_direction = type; cgc->timeout = CDROM_DEF_TIMEOUT; } +EXPORT_SYMBOL(init_cdrom_command); /* DVD handling */ @@ -2000,6 +2007,7 @@ int cdrom_mode_sense(struct cdrom_device_info *cdi, cgc->data_direction = CGC_DATA_READ; return cdo->generic_packet(cdi, cgc); } +EXPORT_SYMBOL(cdrom_mode_sense); int cdrom_mode_select(struct cdrom_device_info *cdi, struct packet_command *cgc) @@ -2015,6 +2023,7 @@ int cdrom_mode_select(struct cdrom_device_info *cdi, cgc->data_direction = CGC_DATA_WRITE; return cdo->generic_packet(cdi, cgc); } +EXPORT_SYMBOL(cdrom_mode_select); static int cdrom_read_subchannel(struct cdrom_device_info *cdi, struct cdrom_subchnl *subchnl, int mcn) @@ -2893,6 +2902,7 @@ int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written) *last_written = toc.cdte_addr.lba; return 0; } +EXPORT_SYMBOL(cdrom_get_last_written); /* return the next writable block. also for udf file system. */ static int cdrom_get_next_writable(struct cdrom_device_info *cdi, @@ -3430,18 +3440,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev, return -ENOSYS; } - -EXPORT_SYMBOL(cdrom_get_last_written); -EXPORT_SYMBOL(register_cdrom); -EXPORT_SYMBOL(unregister_cdrom); -EXPORT_SYMBOL(cdrom_open); -EXPORT_SYMBOL(cdrom_release); EXPORT_SYMBOL(cdrom_ioctl); -EXPORT_SYMBOL(cdrom_number_of_slots); -EXPORT_SYMBOL(cdrom_mode_select); -EXPORT_SYMBOL(cdrom_mode_sense); -EXPORT_SYMBOL(init_cdrom_command); -EXPORT_SYMBOL(cdrom_get_media_event); #ifdef CONFIG_SYSCTL -- 2.25.1