mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>, Andy Grover <agrover@redhat.com>,
	Hannes Reinecke <hare@suse.de>,
	Roland Dreier <roland@purestorage.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 01/13] iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi
Date: Sat, 23 Jul 2011 14:23:49 -0700	[thread overview]
Message-ID: <1311456229.31450.292.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1107231531310.3831@swampdragon.chaosbits.net>

On Sat, 2011-07-23 at 15:34 +0200, Jesper Juhl wrote:
> On Sat, 23 Jul 2011, Nicholas A. Bellinger wrote:
> 
> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> > 
> > This patch renames the following iscsi_proto.h structures to avoid
> > namespace issues with drivers/target/iscsi/iscsi_target_core.h:
> > 
> > *) struct iscsi_cmd -> struct iscsi_scsi_req
> > *) struct iscsi_cmd_rsp -> struct iscsi_scsi_rsp
> > *) struct iscsi_login -> struct iscsi_login_req
> > 
> > This patch includes useful ISCSI_FLAG_LOGIN_[CURRENT,NEXT]_STAGE*,
> > and ISCSI_FLAG_SNACK_TYPE_* definitions used by iscsi_target_mod, and
> > fixes the incorrect definition of struct iscsi_snack to following
> > RFC-3720 Section 10.16. SNACK Request.
> > 
> > Also, this patch updates libiscsi, iSER, be2iscsi, and bn2xi to
> > use the updated structure definitions in a handful of locations.
> > 
> > Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
> > Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> > ---
> >  drivers/infiniband/ulp/iser/iser_initiator.c |    2 +-
> >  drivers/scsi/be2iscsi/be_main.h              |    4 +-
> >  drivers/scsi/bnx2i/bnx2i_hwi.c               |    8 +++---
> >  drivers/scsi/libiscsi.c                      |    6 ++--
> >  include/scsi/iscsi_proto.h                   |   30 +++++++++++++++++++-------
> >  5 files changed, 32 insertions(+), 18 deletions(-)
> > 
> > diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
> > index 95a08a8..d73bab3 100644
> > --- a/drivers/infiniband/ulp/iser/iser_initiator.c
> > +++ b/drivers/infiniband/ulp/iser/iser_initiator.c
> > @@ -271,7 +271,7 @@ int iser_send_command(struct iscsi_conn *conn,
> >  	unsigned long edtl;
> >  	int err;
> >  	struct iser_data_buf *data_buf;
> > -	struct iscsi_cmd *hdr =  (struct iscsi_cmd *)task->hdr;
> > +	struct iscsi_scsi_req *hdr =  (struct iscsi_scsi_req *)task->hdr;
> >  	struct scsi_cmnd *sc  =  task->sc;
> 
> How about getting rid of the extra spaces around the '=' while you are at 
> it?
> 

Fixing this up now..

> -     struct iscsi_cmd *hdr =  (struct iscsi_cmd *)task->hdr;
> -     struct scsi_cmnd *sc  =  task->sc;
> +     struct iscsi_scsi_req *hdr = (struct iscsi_scsi_req *)task->hdr;
> +     struct scsi_cmnd *sc = task->sc;
> 
> 
> >  	struct iser_tx_desc *tx_desc = &iser_task->desc;
> >  
> > diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> > index 081c171..5ce5170 100644
> > --- a/drivers/scsi/be2iscsi/be_main.h
> > +++ b/drivers/scsi/be2iscsi/be_main.h
> > @@ -397,7 +397,7 @@ struct amap_pdu_data_out {
> >  };
> >  
> >  struct be_cmd_bhs {
> > -	struct iscsi_cmd iscsi_hdr;
> > +	struct iscsi_scsi_req iscsi_hdr;
> >  	unsigned char pad1[16];
> >  	struct pdu_data_out iscsi_data_pdu;
> >  	unsigned char pad2[BE_SENSE_INFO_SIZE -
> > @@ -428,7 +428,7 @@ struct be_nonio_bhs {
> >  };
> >  
> >  struct be_status_bhs {
> > -	struct iscsi_cmd iscsi_hdr;
> > +	struct iscsi_scsi_req iscsi_hdr;
> >  	unsigned char pad1[16];
> >  	/**
> >  	 * The plus 2 below is to hold the sense info length that gets
> > diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
> > index 372d30c..1b160e1 100644
> > --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> > +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> > @@ -328,11 +328,11 @@ int bnx2i_send_iscsi_login(struct bnx2i_conn *bnx2i_conn,
> >  {
> >  	struct bnx2i_cmd *bnx2i_cmd;
> >  	struct bnx2i_login_request *login_wqe;
> > -	struct iscsi_login *login_hdr;
> > +	struct iscsi_login_req *login_hdr;
> >  	u32 dword;
> >  
> >  	bnx2i_cmd = (struct bnx2i_cmd *)task->dd_data;
> > -	login_hdr = (struct iscsi_login *)task->hdr;
> > +	login_hdr = (struct iscsi_login_req *)task->hdr;
> >  	login_wqe = (struct bnx2i_login_request *)
> >  						bnx2i_conn->ep->qp.sq_prod_qe;
> >  
> > @@ -1344,7 +1344,7 @@ static int bnx2i_process_scsi_cmd_resp(struct iscsi_session *session,
> >  	struct bnx2i_cmd_response *resp_cqe;
> >  	struct bnx2i_cmd *bnx2i_cmd;
> >  	struct iscsi_task *task;
> > -	struct iscsi_cmd_rsp *hdr;
> > +	struct iscsi_scsi_rsp *hdr;
> >  	u32 datalen = 0;
> >  
> >  	resp_cqe = (struct bnx2i_cmd_response *)cqe;
> > @@ -1371,7 +1371,7 @@ static int bnx2i_process_scsi_cmd_resp(struct iscsi_session *session,
> >  	}
> >  	bnx2i_iscsi_unmap_sg_list(bnx2i_cmd);
> >  
> > -	hdr = (struct iscsi_cmd_rsp *)task->hdr;
> > +	hdr = (struct iscsi_scsi_rsp *)task->hdr;
> >  	resp_cqe = (struct bnx2i_cmd_response *)cqe;
> >  	hdr->opcode = resp_cqe->op_code;
> >  	hdr->max_cmdsn = cpu_to_be32(resp_cqe->max_cmd_sn);
> > diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> > index 0c550d5..9c3cb4e 100644
> > --- a/drivers/scsi/libiscsi.c
> > +++ b/drivers/scsi/libiscsi.c
> > @@ -360,7 +360,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)
> >  	struct iscsi_conn *conn = task->conn;
> >  	struct iscsi_session *session = conn->session;
> >  	struct scsi_cmnd *sc = task->sc;
> > -	struct iscsi_cmd *hdr;
> > +	struct iscsi_scsi_req *hdr;
> >  	unsigned hdrlength, cmd_len;
> >  	itt_t itt;
> >  	int rc;
> > @@ -374,7 +374,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)
> >  		if (rc)
> >  			return rc;
> >  	}
> > -	hdr = (struct iscsi_cmd *) task->hdr;
> > +	hdr = (struct iscsi_scsi_req *) task->hdr;
> 
> Kill the space after the cast
> 
> +     hdr = (struct iscsi_scsi_req *)task->hdr;
> 
> 

Ditto.

Thanks for your review Jesper!

--nab



  reply	other threads:[~2011-07-23 21:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23  8:45 [PATCH 00/13] iscsi-target: Merge candidate for v3.1-rc1 Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 01/13] iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi Nicholas A. Bellinger
2011-07-23 13:34   ` Jesper Juhl
2011-07-23 21:23     ` Nicholas A. Bellinger [this message]
2011-07-23  8:45 ` [PATCH 02/13] iscsi: Add Serial Number Arithmetic LT and GT into iscsi_proto.h Nicholas A. Bellinger
2011-07-23 14:25   ` Jesper Juhl
2011-07-23 21:29     ` Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 03/13] iscsi-target: Add iSCSI fabric support for target v4.1 Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 04/13] iscsi-target: Add target core v4.1 compatible ConfigFS control plane Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 05/13] iscsi-target: Add ConfigFS fabric dependent statistics Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 06/13] iscsi-target: Add TPG and device backend logic Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 07/13] iscsi-target: Add iSCSI Login Negotiation + Parameter logic Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 08/13] iscsi-target: Add CHAP Authentication support using libcrypto Nicholas A. Bellinger
2011-07-23 16:39   ` James Bottomley
2011-07-23 17:51     ` Linus Torvalds
2011-07-23 18:17       ` James Bottomley
2011-07-23 21:17         ` Nicholas A. Bellinger
2011-07-24  3:08           ` Mike Christie
2011-07-24  4:59             ` Nicholas A. Bellinger
     [not found]             ` <CAJAFBLCXQLvyLKR5ZD_foaPqU5X6VJfLQX_VAKeaWpDLLfPWnA@mail.gmail.com>
2011-07-24 16:32               ` Alex Couvrard
2011-07-24  3:52           ` James Bottomley
2011-07-24  4:41             ` Nicholas A. Bellinger
2011-07-24  5:50               ` James Bottomley
2011-07-24  7:52                 ` Nicholas A. Bellinger
2011-07-25 19:31               ` Andy Grover
2011-07-25 20:42                 ` Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 09/13] iscsi-target: Add Sequence/PDU list + DataIN response logic Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 10/13] iscsi-target: Add iSCSI Error Recovery Hierarchy support Nicholas A. Bellinger
2011-07-28 11:42   ` Fubo Chen
2011-07-28 20:30     ` Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 11/13] iscsi-target: Add support for task management operations Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 12/13] iscsi-target: Add misc utility logic Nicholas A. Bellinger
2011-07-28 11:30   ` Fubo Chen
2011-07-28 20:19     ` Nicholas A. Bellinger
2011-07-23  8:45 ` [PATCH 13/13] iscsi-target: Add Makefile/Kconfig and update TCM top level Nicholas A. Bellinger

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=1311456229.31450.292.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=agrover@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roland@purestorage.com \
    --cc=target-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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®