Skip to contentSkip to conversation

lpfc: fix 8.3.1 for do_div warning [Bug 13022]

PATCH New James Smart 1 participant 1 message Apr 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpfc: fix 8.3.1 for do_div warning [Bug 13022]

Correct do_div warning reported by:
[Bug 13022] New: comparison of distinct pointer types lacks a cast
http://marc.info/?l=linux-scsi&m=123900867611315&w=2

To be applied on top of lpfc 8.3.1 patch set.

-- james s

---

 lpfc_scsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_scsi.c +1 -1
diff -upNr a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1393,7 +1393,7 @@ lpfc_parse_bg_err(struct lpfc_hba *phba,
 		 */
 		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;