From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] pcmraid: fix endianness problems
Date: Tue, 03 Nov 2009 11:15:14 -0600 [thread overview]
Message-ID: <1257268514.9427.4.camel@mulgrave.site> (raw)
There's a compile problem with pcmraid on BE platforms because the flags
machine mailbox register is only 8 bits wide:
drivers/scsi/pmcraid.c: In function 'pmcraid_request_sense':
drivers/scsi/pmcraid.c:2259: warning: large integer implicitly truncated to unsigned type
drivers/scsi/pmcraid.c: In function 'pmcraid_build_ioadl':
drivers/scsi/pmcraid.c:3025: warning: large integer implicitly truncated to unsigned type
drivers/scsi/pmcraid.c: In function 'pmcraid_build_passthrough_ioadls':
drivers/scsi/pmcraid.c:3395: warning: large integer implicitly truncated to unsigned type
drivers/scsi/pmcraid.c: In function 'pmcraid_querycfg':
drivers/scsi/pmcraid.c:5322: warning: large integer implicitly truncated to unsigned type
The fix, I think, is just to remove the spurious cpu_to_le32 wrappers
James
---
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 86d158e..ef4102e 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -2256,7 +2256,7 @@ static void pmcraid_request_sense(struct pmcraid_cmd *cmd)
ioadl->address = cpu_to_le64(cmd->sense_buffer_dma);
ioadl->data_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE);
- ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
+ ioadl->flags = IOADL_FLAGS_LAST_DESC;
/* request sense might be called as part of error response processing
* which runs in tasklets context. It is possible that mid-layer might
@@ -3022,7 +3022,7 @@ static int pmcraid_build_ioadl(
ioadl[i].flags = 0;
}
/* setup last descriptor */
- ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
+ ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC;
return 0;
}
@@ -3392,7 +3392,7 @@ static int pmcraid_build_passthrough_ioadls(
}
/* setup the last descriptor */
- ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
+ ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC;
return 0;
}
@@ -5319,7 +5319,7 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd)
cpu_to_le32(sizeof(struct pmcraid_config_table));
ioadl = &(ioarcb->add_data.u.ioadl[0]);
- ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
+ ioadl->flags = IOADL_FLAGS_LAST_DESC;
ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr);
ioadl->data_len = cpu_to_le32(sizeof(struct pmcraid_config_table));
next reply other threads:[~2009-11-03 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 17:15 James Bottomley [this message]
2009-11-03 19:29 ` [PATCH] pcmraid: fix endianness problems Anil Ravindranath
2009-11-03 21:31 ` James Bottomley
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=1257268514.9427.4.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=anil_ravindranath@pmc-sierra.com \
--cc=linux-scsi@vger.kernel.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