public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] scsi tgt: fix build when dprintk is defined
@ 2007-11-15  0:52 Randy Dunlap
  2007-11-15  5:36 ` Mike Christie
       [not found] ` <473C0CC7.6090306@panasas.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Randy Dunlap @ 2007-11-15  0:52 UTC (permalink / raw)
  To: michaelc, jejb; +Cc: scsi

From: Randy Dunlap <rdunlap@xenotime.net>

Fix scsi_tgt_lib build when dprintk is defined:

drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_cmd_destroy':
drivers/scsi/scsi_tgt_lib.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int'
drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_cmd_done':
drivers/scsi/scsi_tgt_lib.c:330: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int'
drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_transfer_response':
drivers/scsi/scsi_tgt_lib.c:345: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int'
drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_init_cmd':
drivers/scsi/scsi_tgt_lib.c:368: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int'
drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_kspace_exec':
drivers/scsi/scsi_tgt_lib.c:499: warning: format '%lu' expects type 'long unsigned int', but argument 9 has type 'unsigned int'
drivers/scsi/scsi_tgt_lib.c: In function 'scsi_tgt_kspace_it_nexus_rsp':
drivers/scsi/scsi_tgt_lib.c:620: error: 'mid' undeclared (first use in this function)
drivers/scsi/scsi_tgt_lib.c:620: error: (Each undeclared identifier is reported only once
drivers/scsi/scsi_tgt_lib.c:620: error: for each function it appears in.)
make[2]: *** [drivers/scsi/scsi_tgt_lib.o] Error 1

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 drivers/scsi/scsi_tgt_lib.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.24-rc2-git4.orig/drivers/scsi/scsi_tgt_lib.c
+++ linux-2.6.24-rc2-git4/drivers/scsi/scsi_tgt_lib.c
@@ -180,7 +180,7 @@ static void scsi_tgt_cmd_destroy(struct 
 		container_of(work, struct scsi_tgt_cmd, work);
 	struct scsi_cmnd *cmd = tcmd->rq->special;
 
-	dprintk("cmd %p %d %lu\n", cmd, cmd->sc_data_direction,
+	dprintk("cmd %p %d %u\n", cmd, cmd->sc_data_direction,
 		rq_data_dir(cmd->request));
 	scsi_unmap_user_pages(tcmd);
 	scsi_host_put_command(scsi_tgt_cmd_to_host(cmd), cmd);
@@ -327,7 +327,7 @@ static void scsi_tgt_cmd_done(struct scs
 {
 	struct scsi_tgt_cmd *tcmd = cmd->request->end_io_data;
 
-	dprintk("cmd %p %lu\n", cmd, rq_data_dir(cmd->request));
+	dprintk("cmd %p %u\n", cmd, rq_data_dir(cmd->request));
 
 	scsi_tgt_uspace_send_status(cmd, tcmd->itn_id, tcmd->tag);
 
@@ -342,7 +342,7 @@ static int scsi_tgt_transfer_response(st
 	struct Scsi_Host *shost = scsi_tgt_cmd_to_host(cmd);
 	int err;
 
-	dprintk("cmd %p %lu\n", cmd, rq_data_dir(cmd->request));
+	dprintk("cmd %p %u\n", cmd, rq_data_dir(cmd->request));
 
 	err = shost->hostt->transfer_response(cmd, scsi_tgt_cmd_done);
 	switch (err) {
@@ -365,7 +365,7 @@ static int scsi_tgt_init_cmd(struct scsi
 
 	cmd->request_bufflen = rq->data_len;
 
-	dprintk("cmd %p cnt %d %lu\n", cmd, cmd->use_sg, rq_data_dir(rq));
+	dprintk("cmd %p cnt %d %u\n", cmd, cmd->use_sg, rq_data_dir(rq));
 	count = blk_rq_map_sg(rq->q, rq, cmd->request_buffer);
 	if (likely(count <= cmd->use_sg)) {
 		cmd->use_sg = count;
@@ -496,7 +496,7 @@ int scsi_tgt_kspace_exec(int host_no, u6
 	}
 	cmd = rq->special;
 
-	dprintk("cmd %p scb %x result %d len %d bufflen %u %lu %x\n",
+	dprintk("cmd %p scb %x result %d len %d bufflen %u %u %x\n",
 		cmd, cmd->cmnd[0], result, len, cmd->request_bufflen,
 		rq_data_dir(rq), cmd->cmnd[0]);
 
@@ -617,7 +617,7 @@ int scsi_tgt_kspace_it_nexus_rsp(int hos
 	struct Scsi_Host *shost;
 	int err = -EINVAL;
 
-	dprintk("%d %d %llx\n", host_no, result, (unsigned long long) mid);
+	dprintk("%d %d\n", host_no, result);
 
 	shost = scsi_host_lookup(host_no);
 	if (IS_ERR(shost)) {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-16  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15  0:52 [PATCH resend] scsi tgt: fix build when dprintk is defined Randy Dunlap
2007-11-15  5:36 ` Mike Christie
2007-11-15  6:15   ` Randy Dunlap
     [not found] ` <473C0CC7.6090306@panasas.com>
2007-11-15  9:37   ` [PATCH rebased] " Boaz Harrosh
2007-11-15  9:53     ` [PATCH rebased ver2] " Boaz Harrosh
2007-11-16  9:45       ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox