lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea39e5c6ff2b6081acd64cf14a0912e1510378a9.camel@wdc.com>
Date:   Fri, 6 Jul 2018 17:05:19 +0000
From:   Bart Van Assche <Bart.VanAssche@....com>
To:     "jthumshirn@...e.de" <jthumshirn@...e.de>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
Subject: Re: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro

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;

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

Thanks,

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ