From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "jthumshirn@suse.de" <jthumshirn@suse.de>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH 4/4] scsi: ncr53c8xx: remove ScsiResult macro
Date: Fri, 6 Jul 2018 17:05:19 +0000 [thread overview]
Message-ID: <ea39e5c6ff2b6081acd64cf14a0912e1510378a9.camel@wdc.com> (raw)
In-Reply-To: <20180706080939.iotmgb24f6iaawkp@linux-x5ow.site>
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.
next prev parent reply other threads:[~2018-07-06 17:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 11:01 [PATCH 0/4] SCSI results rework preparation part 2 Johannes Thumshirn
2018-07-05 11:01 ` [PATCH 1/4] scsi: aacraid: remove AAC_STAT_GOOD define Johannes Thumshirn
2018-07-05 17:24 ` Bart Van Assche
2018-07-06 8:04 ` Johannes Thumshirn
2018-07-06 17:01 ` Bart Van Assche
2018-07-05 17:42 ` Dave Carroll
2018-07-05 17:49 ` Bart Van Assche
2018-07-06 8:03 ` Johannes Thumshirn
2018-07-06 16:55 ` Dave Carroll
2018-07-05 11:01 ` [PATCH 2/4] scsi: bfa: remove ScsiResult macro Johannes Thumshirn
2018-07-05 17:00 ` Bart Van Assche
2018-07-06 8:08 ` Johannes Thumshirn
2018-07-05 11:01 ` [PATCH 3/4] scsi: lpfc: " Johannes Thumshirn
2018-07-05 17:02 ` Bart Van Assche
2018-07-05 11:01 ` [PATCH 4/4] scsi: ncr53c8xx: " Johannes Thumshirn
2018-07-05 17:04 ` Bart Van Assche
2018-07-06 8:09 ` Johannes Thumshirn
2018-07-06 17:05 ` Bart Van Assche [this message]
2018-07-09 7:15 ` Johannes Thumshirn
2018-07-11 2:53 ` [PATCH 0/4] SCSI results rework preparation part 2 Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea39e5c6ff2b6081acd64cf14a0912e1510378a9.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®