Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18959

Symbols that could be static as they are not used anywhere outside the file they are in

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.17.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      sparse highlights these symbols as good candidates to become static:

      ldiskfs/mballoc.c:4953 sparse warning: symbol 'ldiskfs_mb_check_ondisk_bitmap' was not declared. Should it be static?
      libcfs/libcfs/tracefile.c:37 sparse warning: symbol 'cfs_trace_data' was not declared. Should it be static?
      libcfs/libcfs/tracefile.c:49 sparse warning: symbol 'tctl_task' was not declared. Should it be static?
      lnet/lnet/lnet_rdma.c:24 sparse warning: symbol 'nvfs_shutdown' was not declared. Should it be static?
      lnet/lnet/lnet_rdma.c:25 sparse warning: symbol 'nvfs_ops' was not declared. Should it be static?
      lnet/lnet/lnet_rdma.c:26 sparse warning: symbol 'nvfs_n_ops' was not declared. Should it be static?
      lustre/ldlm/ldlm_lockd.c:44 sparse warning: symbol 'ldlm_kobj' was not declared. Should it be static?
      lustre/lfsck/lfsck_namespace.c:6916 sparse warning: symbol 'lfsck_namespace_assistant_ops' was not declared. Should it be static?
      lustre/lmv/lproc_lmv.c:409 sparse warning: symbol 'lprocfs_lmv_obd_vars' was not declared. Should it be static?
      lustre/lod/lod_dev.c:160 sparse warning: symbol 'lod_txn_callback_kmem' was not declared. Should it be static?
      lustre/mdc/lproc_mdc.c:572 sparse warning: symbol 'ldebugfs_mdc_obd_vars' was not declared. Should it be static?
      lustre/mdc/mdc_batch.c:189 sparse warning: symbol 'mdc_update_interpreters' was not declared. Should it be static?
      lustre/mdc/mdc_dev.c:1672 sparse warning: symbol 'mdc_lu_ops' was not declared. Should it be static?
      lustre/mdt/mdt_mds.c:63 sparse warning: symbol 'mds_max_io_threads' was not declared. Should it be static?
      lustre/mgc/lproc_mgc.c:39 sparse warning: symbol 'ldebugfs_mgc_obd_vars' was not declared. Should it be static?
      lustre/mgc/mgc_request.c:459 sparse warning: symbol 'llog_process_lock' was not declared. Should it be static?
      lustre/obdclass/hash.c:98 sparse warning: symbol 'cfs_rehash_wq' was not declared. Should it be static?
      lustre/obdclass/jobid.c:33 sparse warning: symbol 'jobid_hash_lock' was not declared. Should it be static?
      lustre/obdclass/kernelcomm.c:273 sparse warning: symbol 'stats_params' was not declared. Should it be static?
      lustre/obdclass/lprocfs_status.c:2610 sparse warning: symbol 'cksum_name' was not declared. Should it be static?
      lustre/obdclass/lprocfs_status_server.c:540 sparse warning: symbol 'ldebugfs_obd_exports_vars' was not declared. Should it be static?
      lustre/obdclass/lu_object.c:1883 sparse warning: symbol 'lu_env_rhash' was not declared. Should it be static?
      lustre/obdclass/scrub.c:464 sparse warning: symbol 'scrub_status_names' was not declared. Should it be static?
      lustre/obdclass/scrub.c:475 sparse warning: symbol 'scrub_flags_names' was not declared. Should it be static?
      lustre/obdclass/scrub.c:483 sparse warning: symbol 'scrub_param_names' was not declared. Should it be static?
      lustre/ofd/lproc_ofd.c:950 sparse warning: symbol 'lprocfs_ofd_obd_vars' was not declared. Should it be static?
      lustre/ofd/lproc_ofd.c:974 sparse warning: symbol 'ldebugfs_ofd_obd_vars' was not declared. Should it be static?
      lustre/ofd/ofd_oss.c:28 sparse warning: symbol 'oss_max_threads' was not declared. Should it be static?
      lustre/osc/lproc_osc.c:664 sparse warning: symbol 'ldebugfs_osc_obd_vars' was not declared. Should it be static?
      lustre/osd-ldiskfs/osd_handler.c:81 sparse warning: symbol 'ldiskfs_flush_descriptors_seconds' was not declared. Should it be static?
      lustre/osd-ldiskfs/osd_handler.c:84 sparse warning: symbol 'ldiskfs_delayed_unlink_blocks' was not declared. Should it be static?
      lustre/osd-ldiskfs/osd_handler.c:90 sparse warning: symbol 'osd_itea_cachep' was not declared. Should it be static?
      lustre/osd-ldiskfs/osd_iam_lfix.c:201 sparse warning: symbol 'lfix_dump' was not declared. Should it be static?
      lustre/osd-ldiskfs/osd_lproc.c:810 sparse warning: symbol 'ldebugfs_osd_obd_vars' was not declared. Should it be static?
      lustre/osd-zfs/osd_lproc.c:384 sparse warning: symbol 'ldebugfs_osd_obd_vars' was not declared. Should it be static?
      lustre/ptlrpc/nodemap_lproc.c:23 sparse warning: symbol 'nodemap_root' was not declared. Should it be static?
      lustre/ptlrpc/nrs_tbf.c:2284 sparse warning: symbol 'nrs_tbf_opcode_ops' was not declared. Should it be static?
      lustre/ptlrpc/nrs_tbf.c:2598 sparse warning: symbol 'nrs_tbf_uid_ops' was not declared. Should it be static?
      lustre/ptlrpc/nrs_tbf.c:2611 sparse warning: symbol 'nrs_tbf_gid_ops' was not declared. Should it be static?
      lustre/quota/lquota_lib.c:23 sparse warning: symbol 'lquota_caches' was not declared. Should it be static?
      lustre/quota/qsd_lib.c:39 sparse warning: symbol 'qsd_caches' was not declared. Should it be static?
      lustre/target/tgt_grant.c:61 sparse warning: symbol 'lbug_on_grant_miscount' was not declared. Should it be static?
      lustre/target/tgt_handler.c:1576 sparse warning: symbol 'tgt_lfsck_in_notify' was not declared. Should it be static?
      lustre/target/tgt_main.c:39 sparse warning: symbol 'sync_lock_cancel_show' was not declared. Should it be static?
      lustre/target/tgt_main.c:72 sparse warning: symbol 'sync_lock_cancel_store' was not declared. Should it be static?

       

      On top of that incoming https://review.whamcloud.com/c/fs/lustre-release/+/58628

      adds another offender (if it's not refreshed which it might not be pre-landing):

       

      lustre/osp/lproc_osp.c:862 sparse warning: symbol 'osp_ping_show' was not declared. Should it be static?

      Attachments

        Activity

          People

            green Oleg Drokin
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: