Commit 38ffdd62 authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman

[PATCH] ub: suppress gcc warnings for pointer casts

When building on a 64-bit platform, gcc produces a warning
"cast of a pointer to an integer of a different size".
The scatterlist.offset on the LHS is unsigned int, so I used
that originally.
Signed-off-by: default avatarPete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>

 drivers/block/ub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
parent e639dd3f
...@@ -1512,7 +1512,7 @@ static void ub_state_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd) ...@@ -1512,7 +1512,7 @@ static void ub_state_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
scmd->nsg = 1; scmd->nsg = 1;
sg = &scmd->sgv[0]; sg = &scmd->sgv[0];
sg->page = virt_to_page(sc->top_sense); sg->page = virt_to_page(sc->top_sense);
sg->offset = (unsigned int)sc->top_sense & (PAGE_SIZE-1); sg->offset = (unsigned long)sc->top_sense & (PAGE_SIZE-1);
sg->length = UB_SENSE_SIZE; sg->length = UB_SENSE_SIZE;
scmd->len = UB_SENSE_SIZE; scmd->len = UB_SENSE_SIZE;
scmd->lun = cmd->lun; scmd->lun = cmd->lun;
...@@ -1891,7 +1891,7 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun, ...@@ -1891,7 +1891,7 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun,
cmd->nsg = 1; cmd->nsg = 1;
sg = &cmd->sgv[0]; sg = &cmd->sgv[0];
sg->page = virt_to_page(p); sg->page = virt_to_page(p);
sg->offset = (unsigned int)p & (PAGE_SIZE-1); sg->offset = (unsigned long)p & (PAGE_SIZE-1);
sg->length = 8; sg->length = 8;
cmd->len = 8; cmd->len = 8;
cmd->lun = lun; cmd->lun = lun;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment