Re: [VERY EARLY RFC 00/13] Rework SCSI results handling

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

 



On Wed, Apr 18, 2018 at 04:00:43PM +0000, Bart Van Assche wrote:
> Thank you for having come up with this so quickly. Something I do not
> like about this patch series is that several new very short helper functions
> are introduced, e.g. set_scsi_result(), clear_scsi_result(), to_scsi_result()
> and from_scsi_result(). If we would make scsi_result a union of a 32-bit
> integer and a struct with the driver, host, msg and status bytes then we
> would not need any of these new helper functions. Additionally, that approach
> would allow us to eliminate the {set,get}_{driver,host,msg,status}_byte()
> functions.
 
Honestly I don't really like these mini accessor functions as well.
But when using a union we loose all the benefits of the enums as
drivers still can touch the compound result value.

I like Hannes' idea of gettting rid of clear_scsi_result() and use
set_scsi_result() for it. This way we zap one of these
helpers. Actually we could even use it for all and thus could
eliminate all the set_{host,driver,msg}_byte() accessors.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux