On Wed, Nov 23, 2011 at 04:50:12AM +0100, J??rn Engel wrote: > Some are never used, some are set but never read, dev_hoq_count is > incremented and decremented, but never initialized or read. Scary. Your dn't remove unused variables, but unused struct fields. dev_hoq_count is zeroed by allocating the structure, which these days is enough even for an atomic_t (sparc32 used to break this, but that's been changed more than 5 years ago). > @@ -797,14 +796,10 @@ struct se_device { > u64 write_bytes; > spinlock_t stats_lock; > /* Active commands on this virtual SE device */ > - atomic_t active_cmds; > atomic_t simple_cmds; > atomic_t depth_left; > atomic_t dev_ordered_id; > - atomic_t dev_tur_active; > atomic_t execute_tasks; > - atomic_t dev_status_thr_count; > - atomic_t dev_hoq_count; > atomic_t dev_ordered_sync; > atomic_t dev_qf_count; > struct se_obj dev_obj; Additional unused fields in se_device (I have a patch for these in my queue, but given that I would have to rebase anyway it might make sense to merge it into yours): - thread_active - dev_status_timer_flags - state_task_lock - dev_alua_lock - dev_state_lock - dev_status_thr_lock - dev_status_timer - process_thread_pid - dev_mgmt_thread - g_se_dev_list -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html