From: <vl...@us...> - 2008-05-27 14:31:38
|
Revision: 400 http://scst.svn.sourceforge.net/scst/?rev=400&view=rev Author: vlnb Date: 2008-05-27 07:31:31 -0700 (Tue, 27 May 2008) Log Message: ----------- Patch from Bart Van Assche <bar...@gm...>: The patch below fixes the following checkpatch warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable This patch has been tested as follows: - Verified that the output of the following command did not change due to the patch below: find -name '*.[ch]'|xargs grep -h -w EXPORT_SYMBOL | sort - Checked that make -s clean && make -s iscsi scst && make -s -C srpt still works. - Checked that the patch generated by generate-kernel-patch still applies cleanly to the 2.6.25.4 kernel, and that the patched kernel tree still compiles, installs and boots fine, and that the iscsi-scst, ib_srpt, scst_disk and scst_vdisk modules still load. Signed-off-by: Bart Van Assche <bar...@gm...> Modified Paths: -------------- trunk/scst/src/scst_debug.c trunk/scst/src/scst_lib.c trunk/scst/src/scst_main.c trunk/scst/src/scst_mem.c trunk/scst/src/scst_proc.c trunk/scst/src/scst_targ.c Modified: trunk/scst/src/scst_debug.c =================================================================== --- trunk/scst/src/scst_debug.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_debug.c 2008-05-27 14:31:31 UTC (rev 400) @@ -63,6 +63,7 @@ return i; } +EXPORT_SYMBOL(debug_print_prefix); void debug_print_buffer(const char *log_level, const void *data, int len) { @@ -117,7 +118,6 @@ spin_unlock_irqrestore(&trace_buf_lock, flags); return; } +EXPORT_SYMBOL(debug_print_buffer); -EXPORT_SYMBOL(debug_print_prefix); -EXPORT_SYMBOL(debug_print_buffer); #endif /* DEBUG || TRACING */ Modified: trunk/scst/src/scst_lib.c =================================================================== --- trunk/scst/src/scst_lib.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_lib.c 2008-05-27 14:31:31 UTC (rev 400) @@ -64,6 +64,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_alloc_sense); int scst_alloc_set_sense(struct scst_cmd *cmd, int atomic, const uint8_t *sense, unsigned int len) @@ -85,6 +86,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_alloc_set_sense); void scst_set_cmd_error_status(struct scst_cmd *cmd, int status) { @@ -102,6 +104,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_set_cmd_error_status); void scst_set_cmd_error(struct scst_cmd *cmd, int key, int asc, int ascq) { @@ -125,6 +128,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_set_cmd_error); void scst_set_sense(uint8_t *buffer, int len, int key, int asc, int ascq) @@ -138,6 +142,7 @@ TRACE_BUFFER("Sense set", buffer, len); return; } +EXPORT_SYMBOL(scst_set_sense); void scst_set_cmd_error_sense(struct scst_cmd *cmd, uint8_t *sense, unsigned int len) @@ -150,6 +155,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_set_cmd_error_sense); void scst_set_busy(struct scst_cmd *cmd) { @@ -174,6 +180,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_set_busy); void scst_set_resp_data_len(struct scst_cmd *cmd, int resp_data_len) { @@ -214,6 +221,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_set_resp_data_len); /* Called under scst_mutex and suspended activity */ int scst_alloc_device(int gfp_mask, struct scst_device **out_dev) @@ -1275,11 +1283,13 @@ { __scst_cmd_get(cmd); } +EXPORT_SYMBOL(scst_cmd_get); void scst_cmd_put(struct scst_cmd *cmd) { __scst_cmd_put(cmd); } +EXPORT_SYMBOL(scst_cmd_put); struct scst_cmd *scst_alloc_cmd(int gfp_mask) { @@ -1837,6 +1847,7 @@ TRACE_EXIT(); return res; } +EXPORT_SYMBOL(scst_get_cdb_info); /* * Routine to extract a lun number from an 8-byte LUN structure @@ -1954,6 +1965,7 @@ TRACE_EXIT_RES(block_shift); return block_shift; } +EXPORT_SYMBOL(scst_calc_block_shift); int scst_sbc_generic_parse(struct scst_cmd *cmd, int (*get_block_shift)(struct scst_cmd *cmd)) @@ -2008,6 +2020,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_sbc_generic_parse); int scst_cdrom_generic_parse(struct scst_cmd *cmd, int (*get_block_shift)(struct scst_cmd *cmd)) @@ -2052,6 +2065,7 @@ TRACE_EXIT(); return res; } +EXPORT_SYMBOL(scst_cdrom_generic_parse); int scst_modisk_generic_parse(struct scst_cmd *cmd, int (*get_block_shift)(struct scst_cmd *cmd)) @@ -2096,6 +2110,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_modisk_generic_parse); int scst_tape_generic_parse(struct scst_cmd *cmd, int (*get_block_size)(struct scst_cmd *cmd)) @@ -2133,6 +2148,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_tape_generic_parse); static int scst_null_parse(struct scst_cmd *cmd) { @@ -2166,18 +2182,21 @@ { return scst_null_parse(cmd); } +EXPORT_SYMBOL(scst_changer_generic_parse); int scst_processor_generic_parse(struct scst_cmd *cmd, int (*nothing)(struct scst_cmd *cmd)) { return scst_null_parse(cmd); } +EXPORT_SYMBOL(scst_processor_generic_parse); int scst_raid_generic_parse(struct scst_cmd *cmd, int (*nothing)(struct scst_cmd *cmd)) { return scst_null_parse(cmd); } +EXPORT_SYMBOL(scst_raid_generic_parse); int scst_block_generic_dev_done(struct scst_cmd *cmd, void (*set_block_shift)(struct scst_cmd *cmd, int block_shift)) @@ -2234,6 +2253,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_block_generic_dev_done); int scst_tape_generic_dev_done(struct scst_cmd *cmd, void (*set_block_size)(struct scst_cmd *cmd, int block_shift)) @@ -2298,6 +2318,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_tape_generic_dev_done); static void scst_check_internal_sense(struct scst_device *dev, int result, uint8_t *sense, int sense_len) @@ -2427,6 +2448,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_obtain_device_parameters); /* Called under dev_lock and BH off */ void scst_process_reset(struct scst_device *dev, @@ -2766,6 +2788,7 @@ list_add_tail(&data->thr_data_list_entry, &tgt_dev->thr_data_list); spin_unlock(&tgt_dev->thr_data_lock); } +EXPORT_SYMBOL(scst_add_thr_data); void scst_del_all_thr_data(struct scst_tgt_dev *tgt_dev) { @@ -2782,6 +2805,7 @@ spin_unlock(&tgt_dev->thr_data_lock); return; } +EXPORT_SYMBOL(scst_del_all_thr_data); void scst_dev_del_all_thr_data(struct scst_device *dev) { @@ -2801,6 +2825,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_dev_del_all_thr_data); struct scst_thr_data_hdr *scst_find_thr_data(struct scst_tgt_dev *tgt_dev) { @@ -2817,6 +2842,7 @@ spin_unlock(&tgt_dev->thr_data_lock); return res; } +EXPORT_SYMBOL(scst_find_thr_data); /* dev_lock supposed to be held and BH disabled */ void __scst_block_dev(struct scst_device *dev) @@ -3181,6 +3207,7 @@ spin_unlock_irqrestore(&lock, flags); return rv; } +EXPORT_SYMBOL(scst_random); #endif #ifdef DEBUG_TM Modified: trunk/scst/src/scst_main.c =================================================================== --- trunk/scst/src/scst_main.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_main.c 2008-05-27 14:31:31 UTC (rev 400) @@ -251,6 +251,7 @@ PRINT_ERROR("Failed to register target template %s", vtt->name); goto out; } +EXPORT_SYMBOL(__scst_register_target_template); void scst_unregister_target_template(struct scst_tgt_template *vtt) { @@ -292,6 +293,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_unregister_target_template); struct scst_tgt *scst_register(struct scst_tgt_template *vtt, const char *target_name) @@ -365,6 +367,7 @@ target_name, vtt->name); goto out; } +EXPORT_SYMBOL(scst_register); static inline int test_sess_list(struct scst_tgt *tgt) { @@ -419,6 +422,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_unregister); void scst_suspend_activity(void) { @@ -454,6 +458,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_suspend_activity); void scst_resume_activity(void) { @@ -494,6 +499,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_resume_activity); static int scst_register_device(struct scsi_device *scsidp) { @@ -707,6 +713,7 @@ scst_free_device(dev); goto out_up; } +EXPORT_SYMBOL(scst_register_virtual_device); void scst_unregister_virtual_device(int id) { @@ -752,6 +759,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_unregister_virtual_device); int __scst_register_dev_driver(struct scst_dev_type *dev_type, const char *version) @@ -839,6 +847,7 @@ dev_type->name, dev_type->type); goto out; } +EXPORT_SYMBOL(__scst_register_dev_driver); void scst_unregister_dev_driver(struct scst_dev_type *dev_type) { @@ -889,6 +898,7 @@ scst_resume_activity(); goto out; } +EXPORT_SYMBOL(scst_unregister_dev_driver); int __scst_register_virtual_dev_driver(struct scst_dev_type *dev_type, const char *version) @@ -932,6 +942,7 @@ dev_type->name); goto out; } +EXPORT_SYMBOL(__scst_register_virtual_dev_driver); void scst_unregister_virtual_dev_driver(struct scst_dev_type *dev_type) { @@ -945,6 +956,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_unregister_virtual_dev_driver); /* Called under scst_mutex */ int scst_add_dev_threads(struct scst_device *dev, int num) @@ -1268,6 +1280,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_add_cmd_threads); void scst_del_cmd_threads(int num) { @@ -1280,6 +1293,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_del_cmd_threads); static void scst_stop_all_threads(void) { @@ -1347,11 +1361,13 @@ { __scst_get(0); } +EXPORT_SYMBOL(scst_get); void scst_put(void) { __scst_put(); } +EXPORT_SYMBOL(scst_put); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15) static int scst_add(struct class_device *cdev) @@ -1746,117 +1762,7 @@ return; } -/* - * Device Handler Side (i.e. scst_vdisk) - */ -EXPORT_SYMBOL(__scst_register_dev_driver); -EXPORT_SYMBOL(scst_unregister_dev_driver); -EXPORT_SYMBOL(scst_register); -EXPORT_SYMBOL(scst_unregister); -EXPORT_SYMBOL(scst_register_virtual_device); -EXPORT_SYMBOL(scst_unregister_virtual_device); -EXPORT_SYMBOL(__scst_register_virtual_dev_driver); -EXPORT_SYMBOL(scst_unregister_virtual_dev_driver); - -EXPORT_SYMBOL(scst_set_busy); -EXPORT_SYMBOL(scst_set_cmd_error_status); -EXPORT_SYMBOL(scst_set_cmd_error); -EXPORT_SYMBOL(scst_set_resp_data_len); -EXPORT_SYMBOL(scst_alloc_sense); -EXPORT_SYMBOL(scst_alloc_set_sense); -EXPORT_SYMBOL(scst_set_sense); -EXPORT_SYMBOL(scst_set_cmd_error_sense); - -EXPORT_SYMBOL(scst_process_active_cmd); - -/* - * Target Driver Side (i.e. HBA) - */ -EXPORT_SYMBOL(scst_register_session); -EXPORT_SYMBOL(scst_unregister_session_ex); - -EXPORT_SYMBOL(__scst_register_target_template); -EXPORT_SYMBOL(scst_unregister_target_template); - -EXPORT_SYMBOL(scst_cmd_init_done); -EXPORT_SYMBOL(scst_tgt_cmd_done); -EXPORT_SYMBOL(scst_restart_cmd); -EXPORT_SYMBOL(scst_rx_cmd); -EXPORT_SYMBOL(scst_rx_data); -EXPORT_SYMBOL(scst_rx_mgmt_fn); - -EXPORT_SYMBOL(scst_find_cmd); -EXPORT_SYMBOL(scst_find_cmd_by_tag); - -/* - * Global Commands - */ -EXPORT_SYMBOL(scst_suspend_activity); -EXPORT_SYMBOL(scst_resume_activity); - -EXPORT_SYMBOL(scst_add_cmd_threads); -EXPORT_SYMBOL(scst_del_cmd_threads); - -#if defined(DEBUG) || defined(TRACING) -EXPORT_SYMBOL(scst_proc_log_entry_read); -EXPORT_SYMBOL(scst_proc_log_entry_write); -#endif - -EXPORT_SYMBOL(scst_create_proc_entry); -EXPORT_SYMBOL(scst_single_seq_open); - -EXPORT_SYMBOL(scst_get); -EXPORT_SYMBOL(scst_put); - -EXPORT_SYMBOL(scst_cmd_get); -EXPORT_SYMBOL(scst_cmd_put); - -EXPORT_SYMBOL(scst_alloc); -EXPORT_SYMBOL(scst_free); - -EXPORT_SYMBOL(scst_check_local_events); - -/* Tgt_dev's threads local storage */ -EXPORT_SYMBOL(scst_add_thr_data); -EXPORT_SYMBOL(scst_del_all_thr_data); -EXPORT_SYMBOL(scst_dev_del_all_thr_data); -EXPORT_SYMBOL(scst_find_thr_data); - -/* SGV pool routines */ -EXPORT_SYMBOL(sgv_pool_create); -EXPORT_SYMBOL(sgv_pool_destroy); -EXPORT_SYMBOL(sgv_pool_set_allocator); -EXPORT_SYMBOL(sgv_pool_alloc); -EXPORT_SYMBOL(sgv_pool_free); -EXPORT_SYMBOL(sgv_get_priv); - -/* Generic parse() routines */ -EXPORT_SYMBOL(scst_calc_block_shift); -EXPORT_SYMBOL(scst_sbc_generic_parse); -EXPORT_SYMBOL(scst_cdrom_generic_parse); -EXPORT_SYMBOL(scst_modisk_generic_parse); -EXPORT_SYMBOL(scst_tape_generic_parse); -EXPORT_SYMBOL(scst_changer_generic_parse); -EXPORT_SYMBOL(scst_processor_generic_parse); -EXPORT_SYMBOL(scst_raid_generic_parse); - -/* Generic dev_done() routines */ -EXPORT_SYMBOL(scst_block_generic_dev_done); -EXPORT_SYMBOL(scst_tape_generic_dev_done); - -/* - * Other Commands - */ -EXPORT_SYMBOL(scst_get_cdb_info); -EXPORT_SYMBOL(scst_cmd_get_tgt_priv_lock); -EXPORT_SYMBOL(scst_cmd_set_tgt_priv_lock); -EXPORT_SYMBOL(scst_obtain_device_parameters); - -#ifdef DEBUG -EXPORT_SYMBOL(scst_random); -#endif - module_init(init_scst); module_exit(exit_scst); Modified: trunk/scst/src/scst_mem.c =================================================================== --- trunk/scst/src/scst_mem.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_mem.c 2008-05-27 14:31:31 UTC (rev 400) @@ -718,11 +718,13 @@ TRACE_MEM("%s", "Allocation failed"); goto out; } +EXPORT_SYMBOL(sgv_pool_alloc); void *sgv_get_priv(struct sgv_pool_obj *sgv) { return sgv->allocator_priv; } +EXPORT_SYMBOL(sgv_get_priv); void sgv_pool_free(struct sgv_pool_obj *sgv) { @@ -747,6 +749,7 @@ atomic_sub(pages, &sgv_pools_mgr.mgr.thr.active_pages_total); return; } +EXPORT_SYMBOL(sgv_pool_free); struct scatterlist *scst_alloc(int size, unsigned long gfp_mask, int *count) { @@ -794,6 +797,7 @@ res = NULL; goto out; } +EXPORT_SYMBOL(scst_alloc); void scst_free(struct scatterlist *sg, int count) { @@ -805,6 +809,7 @@ kfree(sg); return; } +EXPORT_SYMBOL(scst_free); static void sgv_pool_cached_init(struct sgv_pool *pool) { @@ -977,6 +982,7 @@ pool->alloc_fns.free_pages_fn = free_pages_fn; return; } +EXPORT_SYMBOL(sgv_pool_set_allocator); struct sgv_pool *sgv_pool_create(const char *name, int clustered) { @@ -1004,6 +1010,7 @@ pool = NULL; goto out; } +EXPORT_SYMBOL(sgv_pool_create); void sgv_pool_destroy(struct sgv_pool *pool) { @@ -1014,6 +1021,7 @@ TRACE_EXIT(); } +EXPORT_SYMBOL(sgv_pool_destroy); static int sgv_pool_cached_shrinker(int nr, gfp_t gfpm) { Modified: trunk/scst/src/scst_proc.c =================================================================== --- trunk/scst/src/scst_proc.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_proc.c 2008-05-27 14:31:31 UTC (rev 400) @@ -351,6 +351,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_proc_log_entry_write); static ssize_t scst_proc_scsi_tgt_gen_write_log(struct file *file, const char __user *buf, size_t length, loff_t *off) @@ -1964,6 +1965,7 @@ TRACE_EXIT_RES(res); return res; } +EXPORT_SYMBOL(scst_proc_log_entry_read); static int log_info_show(struct seq_file *seq, void *v) { @@ -2125,6 +2127,7 @@ TRACE_EXIT(); return p; } +EXPORT_SYMBOL(scst_create_proc_entry); int scst_single_seq_open(struct inode *inode, struct file *file) { @@ -2137,3 +2140,4 @@ #endif return single_open(file, pdata->show, PDE(inode)->data); } +EXPORT_SYMBOL(scst_single_seq_open); Modified: trunk/scst/src/scst_targ.c =================================================================== --- trunk/scst/src/scst_targ.c 2008-05-27 14:28:37 UTC (rev 399) +++ trunk/scst/src/scst_targ.c 2008-05-27 14:31:31 UTC (rev 400) @@ -97,6 +97,7 @@ TRACE_EXIT(); return cmd; } +EXPORT_SYMBOL(scst_rx_cmd); static int scst_init_cmd(struct scst_cmd *cmd, int context) { @@ -312,6 +313,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_cmd_init_done); static int scst_pre_parse(struct scst_cmd *cmd) { @@ -786,6 +788,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_restart_cmd); /* No locks */ static int scst_queue_retry_cmd(struct scst_cmd *cmd, int finished_cmds) @@ -1012,6 +1015,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_rx_data); static int scst_tgt_pre_exec(struct scst_cmd *cmd) { @@ -1592,6 +1596,7 @@ res = -1; goto out; } +EXPORT_SYMBOL(scst_check_local_events); /* * The result of cmd execution, if any, should be reported @@ -2653,6 +2658,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_tgt_cmd_done); static int scst_finish_cmd(struct scst_cmd *cmd) { @@ -3209,6 +3215,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_process_active_cmd); /* Called under cmd_list_lock and IRQs disabled */ static void scst_do_job_active(struct list_head *cmd_list, @@ -4756,6 +4763,7 @@ mcmd = NULL; goto out; } +EXPORT_SYMBOL(scst_rx_mgmt_fn); /* scst_mutex supposed to be held */ static struct scst_acg *scst_find_acg(const char *initiator_name) @@ -4937,6 +4945,7 @@ sess = NULL; goto out; } +EXPORT_SYMBOL(scst_register_session); /* * Must not be called in parallel with scst_rx_cmd() or @@ -5005,6 +5014,7 @@ TRACE_EXIT(); return; } +EXPORT_SYMBOL(scst_unregister_session_ex); static void scst_pre_unreg_sess(struct scst_session *sess) { @@ -5196,6 +5206,7 @@ TRACE_EXIT(); return cmd; } +EXPORT_SYMBOL(scst_find_cmd); struct scst_cmd *scst_find_cmd_by_tag(struct scst_session *sess, uint64_t tag) @@ -5207,6 +5218,7 @@ spin_unlock_irqrestore(&sess->sess_list_lock, flags); return cmd; } +EXPORT_SYMBOL(scst_find_cmd_by_tag); void *scst_cmd_get_tgt_priv_lock(struct scst_cmd *cmd) { @@ -5217,6 +5229,7 @@ spin_unlock_irqrestore(&scst_main_lock, flags); return res; } +EXPORT_SYMBOL(scst_cmd_get_tgt_priv_lock); void scst_cmd_set_tgt_priv_lock(struct scst_cmd *cmd, void *val) { @@ -5225,3 +5238,4 @@ cmd->tgt_priv = val; spin_unlock_irqrestore(&scst_main_lock, flags); } +EXPORT_SYMBOL(scst_cmd_set_tgt_priv_lock); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |