Declare functions and structures as static.
cover Declare functions and structures as static.
These patches declare the functions and structures which are not used anywhere else as static.
Shraddha Barke (2):
Staging: lustre: ptlrpc: Make functions static
Staging: lustre: obdclass: Declare structure as static.
drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/2 Staging: lustre: ptlrpc: Make functions static
Since these functions are not called anywhere apart from this particular file, declare them as static.
--- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +2 -2
@@ -1929,7 +1929,7 @@ void lustre_swab_fid2path(struct getinfo_fid2path *gf) }EXPORT_SYMBOL (lustre_swab_fid2path); -void lustre_swab_fiemap_extent (struct ll_fiemap_extent *fm_extent) +static void lustre_swab_fiemap_extent (struct ll_fiemap_extent *fm_extent) {__swab64s (&fm_extent->fe_logical);__swab64s (&fm_extent->fe_physical);
@@ -2405,7 +2405,7 @@ void lustre_swab_hsm_state_set(struct hsm_state_set *hss) }EXPORT_SYMBOL (lustre_swab_hsm_state_set); -void lustre_swab_hsm_extent (struct hsm_extent *extent) +static void lustre_swab_hsm_extent (struct hsm_extent *extent) {__swab64s (&extent->offset);__swab64s (&extent->length);
Signature · 1 line
2.1.4
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>
Note that there are hundreds more symbols in lustre that should be made static. Most of them are harder to find because they have a declaration in a header file despite being only used in one place.
Coincidentally I've recently checked this for a subset of lustre while removing completely unused functions. Have a look at the list below to see if you can do more of those.
Arnd
find build/tmp/drivers/staging/lustre/lustre/{ptlrpc,obdclass}/ -name \*.o | \
grep -v built-in | xargs nm | grep -w [A-TV-Z] | grep -v __ksymtab | grep -v __crc | cut -f 3 -d \ | sort -u > defs
find build/tmp/drivers/staging/lustre/ -name \*.o | grep -v built-in | \
xargs nm | grep -w U | cut -f 11- -d\ | sort -u > refs
diff -u defs refs | grep ^- | cut -f 2 -d-
__ptlrpc_free_bulkcache_stats_initcache_stats_printcapa_addcapa_cpycapa_decrypt_idcapa_encrypt_idcapa_hmaccapa_lookupcl_env_peekcl_io_cancelcl_io_rw_advancecl_lock_enclosurecl_lock_extransitcl_lock_intransitcl_lock_mutex_trycl_lock_state_waitcl_page_list_assumecl_page_list_delcl_page_list_discardcl_page_list_finicl_sync_io_initcl_sync_io_waitclass_add_connclass_add_profileclass_attachclass_cleanupclass_config_dump_handlerclass_config_parse_recclass_del_connclass_detachclass_get_typeclass_match_paramclass_resolve_dev_nameclass_search_typeclass_setupcleanup_capa_hash
deuuidifydo_lcfgdt_acct_featuresdt_declare_version_setdt_device_finidt_device_initdt_directory_featuresdt_find_or_createdt_global_finidt_global_initdt_index_readdt_index_walkdt_keydt_lfsck_featuresdt_locate_atdt_lookup_dirdt_mode_to_dftdt_object_finidt_object_initdt_otable_featuresdt_path_parserdt_quota_glb_featuresdt_quota_slv_featuresdt_readdt_record_readdt_record_writedt_store_opendt_store_resolvedt_try_as_dirdt_txn_callback_adddt_txn_callback_deldt_txn_hook_commitdt_txn_hook_startdt_txn_hook_stopdt_version_getdt_version_setdump_exportsdump_obdoiattr_from_obdoinit_capa_hashinterval_expandinterval_findinterval_is_overlappedinterval_iterateinterval_iterate_reverseinterval_searchldlm_add_bl_work_itemldlm_add_cp_work_itemldlm_blocking_astldlm_blocking_ast_nocheckldlm_cancel_locks_for_exportldlm_cancel_locks_for_export_cbldlm_cancel_lru_localldlm_cli_cancel_reqldlm_cli_convertldlm_cli_enqueue_localldlm_cli_inactive_namespace_listldlm_convert_policy_to_wireldlm_destroy_exportldlm_dump_granted_maxldlm_enqueue_packldlm_errno2errorldlm_expired_completion_waitldlm_flock_blocking_astldlm_get_enq_timeoutldlm_glimpse_astldlm_init_exportldlm_kobjldlm_lock_add_to_lruldlm_lock_add_to_lru_nolockldlm_lock_destroy_internalldlm_lock_downgradeldlm_lock_fail_matchldlm_lock_touch_in_lruldlm_namespace_foreachldlm_namespace_freeldlm_namespace_get_returnldlm_namespace_registerldlm_namespace_sysfs_registerldlm_namespace_sysfs_unregisterldlm_namespace_unregisterldlm_ns_fid_hash_opsldlm_ns_hash_defsldlm_ns_hash_opsldlm_pool_get_clvldlm_pool_get_limitldlm_pool_recalcldlm_pool_set_limitldlm_pool_set_slvldlm_pool_setupldlm_pool_shrinkldlm_pools_recalcldlm_process_flock_lockldlm_refresh_waiting_lockldlm_register_intentldlm_reprocess_all_nsldlm_resource_foreachldlm_resource_insert_lock_afterldlm_resource_putref_lockedldlm_svc_ksetldlm_typenameldlm_work_gl_ast_lockllog_cat_id2handlellog_cat_process_or_forkllog_thread_keylock_handle_opslprocfs_dt_rd_blksizelprocfs_dt_rd_filesfreelprocfs_dt_rd_filestotallprocfs_dt_rd_kbytesavaillprocfs_dt_rd_kbytesfreelprocfs_dt_rd_kbytestotallprocfs_stats_seq_fopslprocfs_write_frac_u64_helperlu_context_key_quiescelu_context_key_revivelu_context_refilllu_dev_add_linkagelu_device_putlu_global_keylu_object_findlu_site_hash_opslustre_attr_showlustre_attr_storelustre_fill_superlustre_fs_typelustre_init_lsilustre_mountlustre_pack_reply_v2lustre_profile_listlustre_put_lsilustre_start_mgclustre_start_simplelustre_swab_ldlm_lock_desclustre_swab_ldlm_policy_datalustre_swab_ldlm_res_idlustre_swab_ldlm_resource_desclustre_swab_ll_fidlustre_swab_llog_idlustre_swab_obdomgc_start_locknrs_policy_get_info_lockedobd_export_nid2strobd_init_checksobd_zombie_impexp_cullptl_get_pidptlrpc_interrupted_setptlrpc_new_bulkptlrpc_next_xidptlrpc_nrs_policy_registerptlrpc_pinger_remove_timeoutsptlrpc_register_bulkptlrpc_retain_replayable_requestptlrpc_server_drop_requestptlrpc_start_threadptlrpc_start_threadsptlrpc_stop_all_threadsptlrpc_unregister_replyptlrpcd_freeptlrpcd_startptlrpcd_stopreq_capsule_field_presentreq_capsule_init_areaserver_name2fsnameserver_name2indexsptlrpc_cli_wrap_bulksptlrpc_parse_rulesptlrpc_req_replace_dead_ctxsptlrpc_rule_set_choosesptlrpc_rule_set_expandsptlrpc_rule_set_freesptlrpc_rule_set_mergesptlrpc_sec_getsptlrpc_secflags2strsptlrpc_svc_install_rvs_ctx
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>Reviewed-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Note that there are hundreds more symbols in lustre that should be made static. Most of them are harder to find because they have a declaration in a header file despite being only used in one place.
Coincidentally I've recently checked this for a subset of lustre while removing completely unused functions. Have a look at the list below to see if you can do more of those.
Yes I'll work on these.
Thanks :)
Quoted 224 lines
Arnd
find build/tmp/drivers/staging/lustre/lustre/{ptlrpc,obdclass}/ -name \*.o | \
grep -v built-in | xargs nm | grep -w [A-TV-Z] | grep -v__ksymtab| grep -v__crc| cut -f 3 -d \ | sort -u > defs
find build/tmp/drivers/staging/lustre/ -name \*.o | grep -v built-in | \
xargs nm | grep -w U | cut -f 11- -d\ | sort -u > refs
diff -u defs refs | grep ^- | cut -f 2 -d-
__ptlrpc_free_bulkcache_stats_initcache_stats_printcapa_addcapa_cpycapa_decrypt_idcapa_encrypt_idcapa_hmaccapa_lookupcl_env_peekcl_io_cancelcl_io_rw_advancecl_lock_enclosurecl_lock_extransitcl_lock_intransitcl_lock_mutex_trycl_lock_state_waitcl_page_list_assumecl_page_list_delcl_page_list_discardcl_page_list_finicl_sync_io_initcl_sync_io_waitclass_add_connclass_add_profileclass_attachclass_cleanupclass_config_dump_handlerclass_config_parse_recclass_del_connclass_detachclass_get_typeclass_match_paramclass_resolve_dev_nameclass_search_typeclass_setupcleanup_capa_hash
deuuidifydo_lcfgdt_acct_featuresdt_declare_version_setdt_device_finidt_device_initdt_directory_featuresdt_find_or_createdt_global_finidt_global_initdt_index_readdt_index_walkdt_keydt_lfsck_featuresdt_locate_atdt_lookup_dirdt_mode_to_dftdt_object_finidt_object_initdt_otable_featuresdt_path_parserdt_quota_glb_featuresdt_quota_slv_featuresdt_readdt_record_readdt_record_writedt_store_opendt_store_resolvedt_try_as_dirdt_txn_callback_adddt_txn_callback_deldt_txn_hook_commitdt_txn_hook_startdt_txn_hook_stopdt_version_getdt_version_setdump_exportsdump_obdoiattr_from_obdoinit_capa_hashinterval_expandinterval_findinterval_is_overlappedinterval_iterateinterval_iterate_reverseinterval_searchldlm_add_bl_work_itemldlm_add_cp_work_itemldlm_blocking_astldlm_blocking_ast_nocheckldlm_cancel_locks_for_exportldlm_cancel_locks_for_export_cbldlm_cancel_lru_localldlm_cli_cancel_reqldlm_cli_convertldlm_cli_enqueue_localldlm_cli_inactive_namespace_listldlm_convert_policy_to_wireldlm_destroy_exportldlm_dump_granted_maxldlm_enqueue_packldlm_errno2errorldlm_expired_completion_waitldlm_flock_blocking_astldlm_get_enq_timeoutldlm_glimpse_astldlm_init_exportldlm_kobjldlm_lock_add_to_lruldlm_lock_add_to_lru_nolockldlm_lock_destroy_internalldlm_lock_downgradeldlm_lock_fail_matchldlm_lock_touch_in_lruldlm_namespace_foreachldlm_namespace_freeldlm_namespace_get_returnldlm_namespace_registerldlm_namespace_sysfs_registerldlm_namespace_sysfs_unregisterldlm_namespace_unregisterldlm_ns_fid_hash_opsldlm_ns_hash_defsldlm_ns_hash_opsldlm_pool_get_clvldlm_pool_get_limitldlm_pool_recalcldlm_pool_set_limitldlm_pool_set_slvldlm_pool_setupldlm_pool_shrinkldlm_pools_recalcldlm_process_flock_lockldlm_refresh_waiting_lockldlm_register_intentldlm_reprocess_all_nsldlm_resource_foreachldlm_resource_insert_lock_afterldlm_resource_putref_lockedldlm_svc_ksetldlm_typenameldlm_work_gl_ast_lockllog_cat_id2handlellog_cat_process_or_forkllog_thread_keylock_handle_opslprocfs_dt_rd_blksizelprocfs_dt_rd_filesfreelprocfs_dt_rd_filestotallprocfs_dt_rd_kbytesavaillprocfs_dt_rd_kbytesfreelprocfs_dt_rd_kbytestotallprocfs_stats_seq_fopslprocfs_write_frac_u64_helperlu_context_key_quiescelu_context_key_revivelu_context_refilllu_dev_add_linkagelu_device_putlu_global_keylu_object_findlu_site_hash_opslustre_attr_showlustre_attr_storelustre_fill_superlustre_fs_typelustre_init_lsilustre_mountlustre_pack_reply_v2lustre_profile_listlustre_put_lsilustre_start_mgclustre_start_simplelustre_swab_ldlm_lock_desclustre_swab_ldlm_policy_datalustre_swab_ldlm_res_idlustre_swab_ldlm_resource_desclustre_swab_ll_fidlustre_swab_llog_idlustre_swab_obdomgc_start_locknrs_policy_get_info_lockedobd_export_nid2strobd_init_checksobd_zombie_impexp_cullptl_get_pidptlrpc_interrupted_setptlrpc_new_bulkptlrpc_next_xidptlrpc_nrs_policy_registerptlrpc_pinger_remove_timeoutsptlrpc_register_bulkptlrpc_retain_replayable_requestptlrpc_server_drop_requestptlrpc_start_threadptlrpc_start_threadsptlrpc_stop_all_threadsptlrpc_unregister_replyptlrpcd_freeptlrpcd_startptlrpcd_stopreq_capsule_field_presentreq_capsule_init_areaserver_name2fsnameserver_name2indexsptlrpc_cli_wrap_bulksptlrpc_parse_rulesptlrpc_req_replace_dead_ctxsptlrpc_rule_set_choosesptlrpc_rule_set_expandsptlrpc_rule_set_freesptlrpc_rule_set_mergesptlrpc_sec_getsptlrpc_secflags2strsptlrpc_svc_install_rvs_ctx
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 11 lines · Shraddha Barke
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>
Quoted 7 lines
Quoted 7 lines
Reviewed-by Arnd Bergmann <[email protected]>Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.
Why does it make it hard to find? One can make a spearate check in .c files.
I would think though that the clean up could be a little bit tedious. I guess that when the function is static, it shouldn't be declared in the header file any more? At least not if the header file is shared between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.
The question then is how to divide up the patches. Should one just address all of the functions that have this property in a single file? Or should one only work on a couple of functions at a time that seem related to each other?
Another issue in Lustre is that there are a some EXPORT_SYMBOLs on functyions that are only used in one file. Should they all be removed, or is it like the case of android where there is code not yet in the kernel that may rely on them?
julia
Quoted 234 lines
Quoted 4 lines
Coincidentally I've recently checked this for a subset of lustre while removing
completely unused functions. Have a look at the list below to see if you can do more of those.Yes I'll work on these.
Thanks :)
Quoted 225 lines
Arnd
find build/tmp/drivers/staging/lustre/lustre/{ptlrpc,obdclass}/ -name \*.o | \
grep -v built-in | xargs nm | grep -w [A-TV-Z] | grep -v__ksymtab| grep -v__crc| cut -f 3 -d \ | sort -u > defs
find build/tmp/drivers/staging/lustre/ -name \*.o | grep -v built-in | \
xargs nm | grep -w U | cut -f 11- -d\ | sort -u > refs
diff -u defs refs | grep ^- | cut -f 2 -d-
__ptlrpc_free_bulkcache_stats_initcache_stats_printcapa_addcapa_cpycapa_decrypt_idcapa_encrypt_idcapa_hmaccapa_lookupcl_env_peekcl_io_cancelcl_io_rw_advancecl_lock_enclosurecl_lock_extransitcl_lock_intransitcl_lock_mutex_trycl_lock_state_waitcl_page_list_assumecl_page_list_delcl_page_list_discardcl_page_list_finicl_sync_io_initcl_sync_io_waitclass_add_connclass_add_profileclass_attachclass_cleanupclass_config_dump_handlerclass_config_parse_recclass_del_connclass_detachclass_get_typeclass_match_paramclass_resolve_dev_nameclass_search_typeclass_setupcleanup_capa_hash
deuuidifydo_lcfgdt_acct_featuresdt_declare_version_setdt_device_finidt_device_initdt_directory_featuresdt_find_or_createdt_global_finidt_global_initdt_index_readdt_index_walkdt_keydt_lfsck_featuresdt_locate_atdt_lookup_dirdt_mode_to_dftdt_object_finidt_object_initdt_otable_featuresdt_path_parserdt_quota_glb_featuresdt_quota_slv_featuresdt_readdt_record_readdt_record_writedt_store_opendt_store_resolvedt_try_as_dirdt_txn_callback_adddt_txn_callback_deldt_txn_hook_commitdt_txn_hook_startdt_txn_hook_stopdt_version_getdt_version_setdump_exportsdump_obdoiattr_from_obdoinit_capa_hashinterval_expandinterval_findinterval_is_overlappedinterval_iterateinterval_iterate_reverseinterval_searchldlm_add_bl_work_itemldlm_add_cp_work_itemldlm_blocking_astldlm_blocking_ast_nocheckldlm_cancel_locks_for_exportldlm_cancel_locks_for_export_cbldlm_cancel_lru_localldlm_cli_cancel_reqldlm_cli_convertldlm_cli_enqueue_localldlm_cli_inactive_namespace_listldlm_convert_policy_to_wireldlm_destroy_exportldlm_dump_granted_maxldlm_enqueue_packldlm_errno2errorldlm_expired_completion_waitldlm_flock_blocking_astldlm_get_enq_timeoutldlm_glimpse_astldlm_init_exportldlm_kobjldlm_lock_add_to_lruldlm_lock_add_to_lru_nolockldlm_lock_destroy_internalldlm_lock_downgradeldlm_lock_fail_matchldlm_lock_touch_in_lruldlm_namespace_foreachldlm_namespace_freeldlm_namespace_get_returnldlm_namespace_registerldlm_namespace_sysfs_registerldlm_namespace_sysfs_unregisterldlm_namespace_unregisterldlm_ns_fid_hash_opsldlm_ns_hash_defsldlm_ns_hash_opsldlm_pool_get_clvldlm_pool_get_limitldlm_pool_recalcldlm_pool_set_limitldlm_pool_set_slvldlm_pool_setupldlm_pool_shrinkldlm_pools_recalcldlm_process_flock_lockldlm_refresh_waiting_lockldlm_register_intentldlm_reprocess_all_nsldlm_resource_foreachldlm_resource_insert_lock_afterldlm_resource_putref_lockedldlm_svc_ksetldlm_typenameldlm_work_gl_ast_lockllog_cat_id2handlellog_cat_process_or_forkllog_thread_keylock_handle_opslprocfs_dt_rd_blksizelprocfs_dt_rd_filesfreelprocfs_dt_rd_filestotallprocfs_dt_rd_kbytesavaillprocfs_dt_rd_kbytesfreelprocfs_dt_rd_kbytestotallprocfs_stats_seq_fopslprocfs_write_frac_u64_helperlu_context_key_quiescelu_context_key_revivelu_context_refilllu_dev_add_linkagelu_device_putlu_global_keylu_object_findlu_site_hash_opslustre_attr_showlustre_attr_storelustre_fill_superlustre_fs_typelustre_init_lsilustre_mountlustre_pack_reply_v2lustre_profile_listlustre_put_lsilustre_start_mgclustre_start_simplelustre_swab_ldlm_lock_desclustre_swab_ldlm_policy_datalustre_swab_ldlm_res_idlustre_swab_ldlm_resource_desclustre_swab_ll_fidlustre_swab_llog_idlustre_swab_obdomgc_start_locknrs_policy_get_info_lockedobd_export_nid2strobd_init_checksobd_zombie_impexp_cullptl_get_pidptlrpc_interrupted_setptlrpc_new_bulkptlrpc_next_xidptlrpc_nrs_policy_registerptlrpc_pinger_remove_timeoutsptlrpc_register_bulkptlrpc_retain_replayable_requestptlrpc_server_drop_requestptlrpc_start_threadptlrpc_start_threadsptlrpc_stop_all_threadsptlrpc_unregister_replyptlrpcd_freeptlrpcd_startptlrpcd_stopreq_capsule_field_presentreq_capsule_init_areaserver_name2fsnameserver_name2indexsptlrpc_cli_wrap_bulksptlrpc_parse_rulesptlrpc_req_replace_dead_ctxsptlrpc_rule_set_choosesptlrpc_rule_set_expandsptlrpc_rule_set_freesptlrpc_rule_set_mergesptlrpc_sec_getsptlrpc_secflags2strsptlrpc_svc_install_rvs_ctx
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 35 lines · Julia Lawall
Quoted 11 lines · Shraddha Barke
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>Quoted 7 lines
Quoted 7 lines
Reviewed-by Arnd Bergmann <[email protected]>Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
I would think though that the clean up could be a little bit tedious. I guess that when the function is static, it shouldn't be declared in the header file any more? At least not if the header file is shared between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.
The question then is how to divide up the patches. Should one just address all of the functions that have this property in a single file? Or should one only work on a couple of functions at a time that seem related to each other?
Quoted 12 lines
Another issue in Lustre is that there are a some
EXPORT_SYMBOLson functyions that are only used in one file. Should they all be removed, or is it like the case of android where there is code not yet in the kernel that may rely on them?julia
Quoted 5 lines
Quoted 4 lines
Coincidentally I've recently checked this for a subset of lustre while removing
completely unused functions. Have a look at the list below to see if you can do more of those.
Hello,
I've sent a sample patch. Would you please review it so that I can send more of them? And yes, how am I supposed to split the patches?
Thanks,
Shraddha
Quoted 230 lines
Quoted 229 lines
Yes I'll work on these.
Thanks :)
Quoted 225 lines
Arnd
find build/tmp/drivers/staging/lustre/lustre/{ptlrpc,obdclass}/ -name \*.o | \
grep -v built-in | xargs nm | grep -w [A-TV-Z] | grep -v__ksymtab| grep -v__crc| cut -f 3 -d \ | sort -u > defs
find build/tmp/drivers/staging/lustre/ -name \*.o | grep -v built-in | \
xargs nm | grep -w U | cut -f 11- -d\ | sort -u > refs
diff -u defs refs | grep ^- | cut -f 2 -d-
__ptlrpc_free_bulkcache_stats_initcache_stats_printcapa_addcapa_cpycapa_decrypt_idcapa_encrypt_idcapa_hmaccapa_lookupcl_env_peekcl_io_cancelcl_io_rw_advancecl_lock_enclosurecl_lock_extransitcl_lock_intransitcl_lock_mutex_trycl_lock_state_waitcl_page_list_assumecl_page_list_delcl_page_list_discardcl_page_list_finicl_sync_io_initcl_sync_io_waitclass_add_connclass_add_profileclass_attachclass_cleanupclass_config_dump_handlerclass_config_parse_recclass_del_connclass_detachclass_get_typeclass_match_paramclass_resolve_dev_nameclass_search_typeclass_setupcleanup_capa_hash
deuuidifydo_lcfgdt_acct_featuresdt_declare_version_setdt_device_finidt_device_initdt_directory_featuresdt_find_or_createdt_global_finidt_global_initdt_index_readdt_index_walkdt_keydt_lfsck_featuresdt_locate_atdt_lookup_dirdt_mode_to_dftdt_object_finidt_object_initdt_otable_featuresdt_path_parserdt_quota_glb_featuresdt_quota_slv_featuresdt_readdt_record_readdt_record_writedt_store_opendt_store_resolvedt_try_as_dirdt_txn_callback_adddt_txn_callback_deldt_txn_hook_commitdt_txn_hook_startdt_txn_hook_stopdt_version_getdt_version_setdump_exportsdump_obdoiattr_from_obdoinit_capa_hashinterval_expandinterval_findinterval_is_overlappedinterval_iterateinterval_iterate_reverseinterval_searchldlm_add_bl_work_itemldlm_add_cp_work_itemldlm_blocking_astldlm_blocking_ast_nocheckldlm_cancel_locks_for_exportldlm_cancel_locks_for_export_cbldlm_cancel_lru_localldlm_cli_cancel_reqldlm_cli_convertldlm_cli_enqueue_localldlm_cli_inactive_namespace_listldlm_convert_policy_to_wireldlm_destroy_exportldlm_dump_granted_maxldlm_enqueue_packldlm_errno2errorldlm_expired_completion_waitldlm_flock_blocking_astldlm_get_enq_timeoutldlm_glimpse_astldlm_init_exportldlm_kobjldlm_lock_add_to_lruldlm_lock_add_to_lru_nolockldlm_lock_destroy_internalldlm_lock_downgradeldlm_lock_fail_matchldlm_lock_touch_in_lruldlm_namespace_foreachldlm_namespace_freeldlm_namespace_get_returnldlm_namespace_registerldlm_namespace_sysfs_registerldlm_namespace_sysfs_unregisterldlm_namespace_unregisterldlm_ns_fid_hash_opsldlm_ns_hash_defsldlm_ns_hash_opsldlm_pool_get_clvldlm_pool_get_limitldlm_pool_recalcldlm_pool_set_limitldlm_pool_set_slvldlm_pool_setupldlm_pool_shrinkldlm_pools_recalcldlm_process_flock_lockldlm_refresh_waiting_lockldlm_register_intentldlm_reprocess_all_nsldlm_resource_foreachldlm_resource_insert_lock_afterldlm_resource_putref_lockedldlm_svc_ksetldlm_typenameldlm_work_gl_ast_lockllog_cat_id2handlellog_cat_process_or_forkllog_thread_keylock_handle_opslprocfs_dt_rd_blksizelprocfs_dt_rd_filesfreelprocfs_dt_rd_filestotallprocfs_dt_rd_kbytesavaillprocfs_dt_rd_kbytesfreelprocfs_dt_rd_kbytestotallprocfs_stats_seq_fopslprocfs_write_frac_u64_helperlu_context_key_quiescelu_context_key_revivelu_context_refilllu_dev_add_linkagelu_device_putlu_global_keylu_object_findlu_site_hash_opslustre_attr_showlustre_attr_storelustre_fill_superlustre_fs_typelustre_init_lsilustre_mountlustre_pack_reply_v2lustre_profile_listlustre_put_lsilustre_start_mgclustre_start_simplelustre_swab_ldlm_lock_desclustre_swab_ldlm_policy_datalustre_swab_ldlm_res_idlustre_swab_ldlm_resource_desclustre_swab_ll_fidlustre_swab_llog_idlustre_swab_obdomgc_start_locknrs_policy_get_info_lockedobd_export_nid2strobd_init_checksobd_zombie_impexp_cullptl_get_pidptlrpc_interrupted_setptlrpc_new_bulkptlrpc_next_xidptlrpc_nrs_policy_registerptlrpc_pinger_remove_timeoutsptlrpc_register_bulkptlrpc_retain_replayable_requestptlrpc_server_drop_requestptlrpc_start_threadptlrpc_start_threadsptlrpc_stop_all_threadsptlrpc_unregister_replyptlrpcd_freeptlrpcd_startptlrpcd_stopreq_capsule_field_presentreq_capsule_init_areaserver_name2fsnameserver_name2indexsptlrpc_cli_wrap_bulksptlrpc_parse_rulesptlrpc_req_replace_dead_ctxsptlrpc_rule_set_choosesptlrpc_rule_set_expandsptlrpc_rule_set_freesptlrpc_rule_set_mergesptlrpc_sec_getsptlrpc_secflags2strsptlrpc_svc_install_rvs_ctx
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
In reply to Julia LawallQuoted 15 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 13 lines · Shraddha Barke
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>Reviewed-by Arnd Bergmann <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
In case of lustre, a lot of functions were originally global because they were used in the server-side code. However, the code we have in staging today only includes the client-side implementation and we want to remove all traces of the server side from it for simplicity.
Quoted 3 lines
I would think though that the clean up could be a little bit tedious. I guess that when the function is static, it shouldn't be declared in the header file any more?
Correct. The first step could be to remove declarations for the symbols, followed by actually removing the ones that we then get sparse warnings for.
Quoted 3 lines
At least not if the header file is shared
between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.
I would also consider that a bug we should warn about: basically any 'extern' variable declaration and any forward declaration for a global function (with or without the redundant extern specifier) should be considered a bug. We want the same declaration to be visible by both the file that defines it and the file that uses it so we get warned about type mismatches.
Quoted 4 lines
The question then is how to divide up the patches. Should one just address all of the functions that have this property in a single file? Or should one only work on a couple of functions at a time that seem related to each other?
I think either way would be fine.
There is one more thing to look out for: if a symbol is only used in the file in which it gets defined, but the use comes before the definition, we still need a 'static' forward declaration. Ideally the functions should be reordered in a way that avoids those declarations, but we don't want patches that mix a large scale move of code around a file with a simpler change to make the symbols static.
The two parts can be done in either order: we could mark the functions static and add the forward declarations in one patch, and move them to their proper place in a follow-up, or do the reverse without the forward declaration.
Quoted 4 lines
Another issue in Lustre is that there are a some
EXPORT_SYMBOLson functyions that are only used in one file. Should they all be removed, or is it like the case of android where there is code not yet in the kernel that may rely on them?
They should all be removed as far as I can tell. It's a bug to export a static symbol. I don't think that happens a lot, but this is something we could easily check for using coccinelle.
Arnd
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 22 lines · Arnd Bergmann
Quoted 21 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 18 lines · Shraddha Barke
Quoted 14 lines · Arnd Bergmann
Quoted 5 lines · On Thursday 01 October 2015 15:07:57 Shraddha Barke wrote:
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>Reviewed-by Arnd Bergmann <[email protected]>Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.
Quoted 8 lines
Quoted 2 lines
Why does it make it hard to find? One can make a spearate check in .c files.
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
OK, but from Coccinlle you can just call grep, and check the extensions on the returned file names, so it is not a big problem.
Quoted 4 lines
In case of lustre, a lot of functions were originally global because they were used in the server-side code. However, the code we have in staging today only includes the client-side implementation and we want to remove all traces of the server side from it for simplicity.
OK.
Quoted 12 lines
Quoted 3 lines
I would think though that the clean up could be a little bit tedious. I guess that when the function is static, it shouldn't be declared in the header file any more?
Correct. The first step could be to remove declarations for the symbols, followed by actually removing the ones that we then get sparse warnings for.
Quoted 3 lines
At least not if the header file is shared
between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.
Quoted 6 lines
I would also consider that a bug we should warn about: basically any 'extern' variable declaration and any forward declaration for a global function (with or without the redundant extern specifier) should be considered a bug. We want the same declaration to be visible by both the file that defines it and the file that uses it so we get warned about type mismatches.
I think there would be warning about type mismatches anyway, if the prototype doesn't match with the definition?
Quoted 6 lines
Quoted 4 lines
The question then is how to divide up the patches. Should one just address all of the functions that have this property in a single file? Or should one only work on a couple of functions at a time that seem related to each other?
I think either way would be fine.
OK. Then from my experience, I think that doing a few related functions at once would be easier.
Quoted 12 lines
There is one more thing to look out for: if a symbol is only used in the file in which it gets defined, but the use comes before the definition, we still need a 'static' forward declaration. Ideally the functions should be reordered in a way that avoids those declarations, but we don't want patches that mix a large scale move of code around a file with a simpler change to make the symbols static.
The two parts can be done in either order: we could mark the functions static and add the forward declarations in one patch, and move them to their proper place in a follow-up, or do the reverse without the forward declaration.
Quoted 8 lines
Quoted 4 lines
Another issue in Lustre is that there are a some
EXPORT_SYMBOLson functyions that are only used in one file. Should they all be removed, or is it like the case of android where there is code not yet in the kernel that may rely on them?They should all be removed as far as I can tell. It's a bug to export a static symbol. I don't think that happens a lot, but this is something we could easily check for using coccinelle.
I cleaned up a bunch of them at one point. I don't seem to have integrated the semantic patch into the kernel though...
julia
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 12 lines · On Thursday 01 October 2015 15:49:21 Julia Lawall wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 5 lines · Shraddha Barke
Quoted 5 lines
Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
Quoted 8 lines
Quoted 5 lines
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
OK, but from Coccinlle you can just call grep, and check the extensions on the returned file names, so it is not a big problem.
I'm not following here. How exactly would you find symbols like this with coccinelle?
subsystem.h:
extern int subsystem_state;
subsystem.c:
#include "subsystem.h"
long subsystem_state;
static void function(void)
{
...
subsystem_state++;
...
}with no users of this variable outside of this file.
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines
At least not if the header file is shared
between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.I would also consider that a bug we should warn about: basically any 'extern' variable declaration and any forward declaration for a global function (with or without the redundant extern specifier) should be considered a bug. We want the same declaration to be visible by both the file that defines it and the file that uses it so we get warned about type mismatches.
Quoted 2 lines
I think there would be warning about type mismatches anyway, if the prototype doesn't match with the definition?
The point is that this only works if all files include the same header.
e.g.
subsystem.h:
extern int subsystem_state;
subsystem.c:
#include "subsystem.h"
long subsystem_state;
driver.c:
/* no #include subsystem.h */
extern long subsystem_state;
Arnd
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 33 lines · Arnd Bergmann
Quoted 12 lines · On Thursday 01 October 2015 15:49:21 Julia Lawall wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 5 lines · Shraddha Barke
Quoted 5 lines
Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
Quoted 8 lines
Quoted 5 lines
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
OK, but from Coccinlle you can just call grep, and check the extensions on the returned file names, so it is not a big problem.
I'm not following here. How exactly would you find symbols like this with coccinelle?
subsystem.h:extern int
subsystem_state;
subsystem.c:#include "
subsystem.h"
longsubsystem_state;
Quoted 8 lines
static void function(void)
{ ... subsystem_state++; ... }with no users of this variable outside of this file.
The following uses ocaml, because I'm not very good at python...
@r disable optional_storage@
identifier f;
position p;
@@
f@p(...) { ... }
@script:ocaml@
p << r.p;
f << r.f;
@@
let l = Common,cmd_to_list
(Printf.sprintf "cd /my/linux/path; git grep %s" f) in
let other_files =
List.map (function x -> List.hd(Str.split (Str.regexp ":") x)) l in
let file = (List.hd p).file in
match List.filter (function x -> not(x = file)) other_files with
[] -> Printf.printf "function %s is only used in file %s\n" f file
| _ -> ()
That is, find the definition of a function with the pattern matching rule, then obtain the name and position of the function definition, then in the ocaml/python rule, grep for the name of the function, and extract the names of the files from grep. Drop all the names that are the same as that of the file containing the definition, and print an error message if the result is an empty list.
The disable optional_storage at the beginning of the first rule prevents the function definition from matching a static function, since static isn't mentioned in the pattern.
This takes care of the case of function definitions. Something similar could probably be done for other kinds fo variables. That could be a bit more awkward, though because variable declarations both inside and outside function definitions look alike.
Quoted 22 lines
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines
At least not if the header file is shared
between multipe files. But it still may need to be declared somewhere, if it is referenced before it is declared in the one file where it is used.I would also consider that a bug we should warn about: basically any 'extern' variable declaration and any forward declaration for a global function (with or without the redundant extern specifier) should be considered a bug. We want the same declaration to be visible by both the file that defines it and the file that uses it so we get warned about type mismatches.
Quoted 2 lines
I think there would be warning about type mismatches anyway, if the prototype doesn't match with the definition?
The point is that this only works if all files include the same header.
e.g.
subsystem.h:extern int
subsystem_state;
Quoted 8 lines
subsystem.c:#include "
subsystem.h"
longsubsystem_state;
driver.c:
/* no #includesubsystem.h*/
extern longsubsystem_state;
OK, indeed getting the definition from different places is quite error prone.
julia
Quoted 9 lines
Arnd
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4003012.PLAPRmBvBo%40wuerfel.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 73 lines · On Thursday 01 October 2015 16:12:53 Julia Lawall wrote:
Quoted 33 lines · Arnd Bergmann
Quoted 12 lines · On Thursday 01 October 2015 15:49:21 Julia Lawall wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 5 lines · Shraddha Barke
Quoted 5 lines
Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
Quoted 8 lines
Quoted 5 lines
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
OK, but from Coccinlle you can just call grep, and check the extensions on the returned file names, so it is not a big problem.
I'm not following here. How exactly would you find symbols like this with coccinelle?
subsystem.h:extern int
subsystem_state;
subsystem.c:#include "
subsystem.h"
longsubsystem_state;Quoted 8 lines
static void function(void)
{ ... subsystem_state++; ... }with no users of this variable outside of this file.
The following uses ocaml, because I'm not very good at python...
@r disable optional_storage@
identifier f;
position p;
@@f@p(...) { ... }
@script:ocaml@
p << r.p;
f << r.f;
@@let l = Common,cmd_to_list
(Printf.sprintf "cd /my/linux/path; git grep %s" f) in
letother_files=
List.map (function x ->List.hd(Str.split (Str.regexp ":") x)) l in
let file = (List.hd p).file in
match List.filter (function x -> not(x = file))other_fileswith
[] -> Printf.printf "function %s is only used in file %s\n" f file
| _ -> ()That is, find the definition of a function with the pattern matching rule, then obtain the name and position of the function definition, then in the ocaml/python rule, grep for the name of the function, and extract the names of the files from grep. Drop all the names that are the same as that of the file containing the definition, and print an error message if the result is an empty list.
Quoted 8 lines
The disable
optional_storageat the beginning of the first rule prevents the function definition from matching a static function, since static isn't mentioned in the pattern.This takes care of the case of function definitions. Something similar could probably be done for other kinds fo variables. That could be a bit more awkward, though because variable declarations both inside and outside function definitions look alike.
Ok, I see. Yes, this looks nice, though there might still be a small number of false positives (e.g. identifier used in inline function in the header that declares it, inline function used elsewhere) and false negatives (function name mentioned in a .c file comment elsewhere but not actually called).
I don't actually understand half the code you write, but conceptually it makes sense and is similar to what I did manually. If you plan to actually make use of this method, there are a couple of improvements that I can think of:
- "git grep -w" to match only whole words
- "git grep -l" to list the file names only, rather than manually parsing the default grep output
- filter out declarations from header files as you mentioned (I don't see this in your code).
Arnd
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
Quoted 83 lines · Arnd Bergmann
Quoted 73 lines · On Thursday 01 October 2015 16:12:53 Julia Lawall wrote:
Quoted 33 lines · Arnd Bergmann
Quoted 12 lines · On Thursday 01 October 2015 15:49:21 Julia Lawall wrote:
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Thursday 01 October 2015 15:20:39 Julia Lawall wrote:
Quoted 5 lines · Shraddha Barke
Quoted 5 lines
Note that there are hundreds more symbols in lustre that should be made static.
Most of them are harder to find because they have a declaration in a header file
despite being only used in one place.Why does it make it hard to find? One can make a spearate check in .c files.
Quoted 8 lines
Quoted 5 lines
We currently get a sparse warning for each global identifier definition that is not preceded by a declaration, but since most of our tools (gcc, sparse, coccinelle, ...) work on a single file at a time, they do not know whether a global symbol that is defined in a C file and (incorrectly) declared in a header is used in another C file or not.
OK, but from Coccinlle you can just call grep, and check the extensions on the returned file names, so it is not a big problem.
I'm not following here. How exactly would you find symbols like this with coccinelle?
subsystem.h:extern int
subsystem_state;
subsystem.c:#include "
subsystem.h"
longsubsystem_state;Quoted 8 lines
static void function(void)
{ ... subsystem_state++; ... }with no users of this variable outside of this file.
The following uses ocaml, because I'm not very good at python...
@r disable optional_storage@
identifier f;
position p;
@@f@p(...) { ... }
@script:ocaml@
p << r.p;
f << r.f;
@@let l = Common,cmd_to_list
(Printf.sprintf "cd /my/linux/path; git grep %s" f) in
letother_files=
List.map (function x ->List.hd(Str.split (Str.regexp ":") x)) l in
let file = (List.hd p).file in
match List.filter (function x -> not(x = file))other_fileswith
[] -> Printf.printf "function %s is only used in file %s\n" f file
| _ -> ()That is, find the definition of a function with the pattern matching rule, then obtain the name and position of the function definition, then in the ocaml/python rule, grep for the name of the function, and extract the names of the files from grep. Drop all the names that are the same as that of the file containing the definition, and print an error message if the result is an empty list.
Quoted 8 lines
The disable
optional_storageat the beginning of the first rule prevents the function definition from matching a static function, since static isn't mentioned in the pattern.This takes care of the case of function definitions. Something similar could probably be done for other kinds fo variables. That could be a bit more awkward, though because variable declarations both inside and outside function definitions look alike.
Quoted 5 lines
Ok, I see. Yes, this looks nice, though there might still be a small number of false positives (e.g. identifier used in inline function in the header that declares it, inline function used elsewhere) and false negatives (function name mentioned in a .c file comment elsewhere but not actually called).
Yes.
Quoted 8 lines
I don't actually understand half the code you write, but conceptually it makes sense and is similar to what I did manually. If you plan to actually make use of this method, there are a couple of improvements that I can think of:
- "git grep -w" to match only whole words
- "git grep -l" to list the file names only, rather than manually parsing the default grep output
Yes, thanks.
Quoted 2 lines
- filter out declarations from header files as you mentioned (I don't see this in your code).
Indeed. The definitions are all in .c files, because that is what Coccinelle looks at by default, but indeed, the final match should only be on .c files.
thanks,
julia
Quoted 9 lines
Arnd
Signature · 5 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/18050482.hzx1IbEyMT%40wuerfel. For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ptlrpc: Make functions static
In reply to Shraddha BarkeQuoted 5 lines · Shraddha Barke
Since these functions are not called anywhere apart from this particular file, declare them as static.
Signed-off-by Shraddha Barke <[email protected]>---
This has already been done by:2adf5e877537 ("staging: lustre: make non-exported functions static")
regards
sudip
PATCH 2/2 Staging: lustre: obdclass: Declare structure as static.
In reply to Shraddha BarkeDeclare structure as static since it is not accessed anywhere apart from this particular file.
--- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/lu_object.c +1 -1
@@ -440,7 +440,7 @@ LU_KEY_INIT_FINI(lu_global, struct lu_cdebug_data);* Key, holding temporary buffer. This key is registered very early by * lu_global_init(). */ -struct lu_context_key lu_global_key = { +static struct lu_context_key lu_global_key = { .lct_tags =LCT_MD_THREAD |LCT_DT_THREAD |LCT_MG_THREAD |LCT_CL_THREAD |LCT_LOCAL , .lct_init = lu_global_key_init,
Signature · 1 line
2.1.4
Re: [Outreachy kernel] [PATCH 2/2] Staging: lustre: obdclass: Declare structure as static.
Quoted 5 lines · On Thursday 01 October 2015 15:07:58 Shraddha Barke wrote:
Declare structure as static since it is not accessed anywhere apart from this particular file.
Signed-off-by Shraddha Barke <[email protected]>