Re: [PATCH scsi-misc-2.6 04/13] scsi: remove meaningless volatile qualifiers from structure definitions

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

 



 Hello, Chritoph.

On Thu, Mar 31, 2005 at 11:11:45AM +0100, Christoph Hellwig wrote:
> On Thu, Mar 31, 2005 at 06:08:10PM +0900, Tejun Heo wrote:
> >  	struct list_head    siblings;   /* list of all devices on this host */
> >  	struct list_head    same_target_siblings; /* just the devices sharing same target id */
> >  
> > -	volatile unsigned short device_busy;	/* commands actually active on low-level */
> > +	unsigned short device_busy;	/* commands actually active on
> > +					 * low-level. protected by sdev_lock. */
> 
> You should probably switch it to just unsigned.  The other 16bit are wasted
> due to alignment anyway, and some architectures produce better code for 32bit
> accesses.
> 
> > -	volatile unsigned short host_busy;   /* commands actually active on low-level */
> > -	volatile unsigned short host_failed; /* commands that failed. */
> > +
> > +	/*
> > +	 * The following two fields are protected with host_lock;
> > +	 * however, eh routines can safely access during eh processing
> > +	 * without acquiring the lock.
> > +	 */
> > +	unsigned short host_busy;	   /* commands actually active on low-level */
> > +	unsigned short host_failed;	   /* commands that failed. */
> 
> Here it would actually increase the struct size but might make sense anyway.

 Sure, I'll make them unsigned.

 Thanks.

-- 
tejun

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux