diff options
author | David Howells <dhowells@redhat.com> | 2009-04-14 17:08:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-14 09:58:17 -0700 |
commit | 2344b5b6851466511663154e517f8b31f70c4bb6 (patch) | |
tree | d603582628b9df9d5ae0d89ba286d44759162831 | |
parent | 78c5b82ee68207a176ad5ca5eabdb2dbe5cfbfd3 (diff) | |
download | linux-2344b5b6851466511663154e517f8b31f70c4bb6.tar.gz linux-2344b5b6851466511663154e517f8b31f70c4bb6.tar.bz2 linux-2344b5b6851466511663154e517f8b31f70c4bb6.zip |
Fix lpfc_parse_bg_err()'s use of do_div()
Fix lpfc_parse_bg_err()'s use of do_div(). It should be passing a 64-bit
variable as the first parameter. However, since it's only using a 32-bit
variable, it doesn't need to use do_div() at all, but can instead use the
division operator.
This deals with the following warnings:
CC drivers/scsi/lpfc/lpfc_scsi.o
drivers/scsi/lpfc/lpfc_scsi.c: In function 'lpfc_parse_bg_err':
drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: comparison of distinct pointer types lacks a cast
drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: right shift count >= width of type
drivers/scsi/lpfc/lpfc_scsi.c:1397: warning: passing argument 1 of '__div64_32' from incompatible pointer type
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b1bd3fc7bae8..36fd2e75da1c 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -1394,7 +1394,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd, */ cmd->sense_buffer[8] = 0; /* Information */ cmd->sense_buffer[9] = 0xa; /* Add. length */ - do_div(bghm, cmd->device->sector_size); + bghm /= cmd->device->sector_size; failing_sector = scsi_get_lba(cmd); failing_sector += bghm; |