public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] lpfc: fix 8.3.1 for do_div warning [Bug 13022]
Date: Tue, 7 Apr 2009 14:03:54 -0400	[thread overview]
Message-ID: <1239127434.27087.4.camel@ogier> (raw)

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 

 Signed-off-by: James Smart <james.smart@emulex.com>

 ---

 lpfc_scsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff -upNr a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
--- a/drivers/scsi/lpfc/lpfc_scsi.c	2009-04-06 18:34:51.000000000 -0400
+++ b/drivers/scsi/lpfc/lpfc_scsi.c	2009-04-07 13:56:27.000000000 -0400
@@ -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;



                 reply	other threads:[~2009-04-07 18:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1239127434.27087.4.camel@ogier \
    --to=james.smart@emulex.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