Re: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro

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

 



On Fri, Jul 06, 2018 at 05:05:19PM +0000, Bart Van Assche wrote:
> On Fri, 2018-07-06 at 10:09 +0200, Johannes Thumshirn wrote:
> > On Thu, Jul 05, 2018 at 05:04:05PM +0000, Bart Van Assche wrote:
> > > On Thu, 2018-07-05 at 13:01 +0200, Johannes Thumshirn wrote:
> > > > -		cmd->result = ScsiResult(DID_OK, S_CHECK_COND);
> > > > +		cmd->result = DID_OK << 16 | S_CHECK_COND;
> > > 
> > > Since DID_OK == 0, do we really need "DID_OK << 16 |" here?
> > 
> > Please see my answers to the other patches on this.
> 
> No matter what the next step is, you will have to deal with code that looks
> very similar to what I proposed. An example from libata:
> 
> 	else if (qc->flags & ATA_QCFLAG_SENSE_VALID)
> 		cmd->result = SAM_STAT_CHECK_CONDITION;

OK, I'll take remove the "| 0" parts.

> 
> BTW, in drivers/scsi/sym53c8xx_2/sym_defs.h there are definitions for synonyms
> of standard SCSI constants. I wouldn't mind if these synonyms would be removed:
> 
> #define	S_GOOD		SAM_STAT_GOOD
> #define	S_CHECK_COND	SAM_STAT_CHECK_CONDITION
> #define	S_COND_MET	SAM_STAT_CONDITION_MET
> #define	S_BUSY		SAM_STAT_BUSY
> #define	S_INT		SAM_STAT_INTERMEDIATE
> #define	S_INT_COND_MET	SAM_STAT_INTERMEDIATE_CONDITION_MET
> #define	S_CONFLICT	SAM_STAT_RESERVATION_CONFLICT
> #define	S_TERMINATED	SAM_STAT_COMMAND_TERMINATED
> #define	S_QUEUE_FULL	SAM_STAT_TASK_SET_FULL

Yup, saw those as well and already removed them in the next
version. Ditto for the bfa ones.

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