Re: [PATCH 2/4] target: remove unused variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 November 2011 06:17:06 -0500, Christoph Hellwig wrote:
> 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).

Ack on both.

> > @@ -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

Or we can drop this patch for now and let me take the pain, if you prefer.

Jörn

-- 
Audacity augments courage; hesitation, fear.
-- Publilius Syrus
--
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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux