mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ken Witherow <ken@krwtech.com>
To: James.Bottomley@SteelEye.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Andrew Morton <akpm@osdl.org>
Subject: [PATCH 2.6.16] scsi: clean up warnings in Advansys driver
Date: Thu, 20 Apr 2006 18:19:53 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604201735100.2044@death> (raw)
In-Reply-To: <20060420004915.45cd34be.akpm@osdl.org>

Fix typecast warnings and switch from check_region to request_region

Signed-off-by: Ken Witherow <ken@krwtech.com>

---
  drivers/scsi/advansys.c |   17 ++++++++++-------
  1 file changed, 10 insertions(+), 7 deletions(-)



--- linux-2.6.16/drivers/scsi/advansys.c	2006-03-20 00:53:29.000000000 -0500
+++ linux/drivers/scsi/advansys.c	2006-04-20 17:27:43.000000000 -0400
@@ -2056,11 +2056,11 @@ STATIC ASC_DCNT  AscGetMaxDmaCount(ushor
  /*
   * Define Adv Library required memory access macros.
   */
-#define ADV_MEM_READB(addr) readb(addr)
-#define ADV_MEM_READW(addr) readw(addr)
-#define ADV_MEM_WRITEB(addr, byte) writeb(byte, addr)
-#define ADV_MEM_WRITEW(addr, word) writew(word, addr)
-#define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr)
+#define ADV_MEM_READB(addr) readb((void *) addr)
+#define ADV_MEM_READW(addr) readw((void *) addr)
+#define ADV_MEM_WRITEB(addr, byte) writeb(byte, (void *) addr)
+#define ADV_MEM_WRITEW(addr, word) writew(word, (void *) addr)
+#define ADV_MEM_WRITEDW(addr, dword) writel(dword,(void *) addr)

  #define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)

@@ -4415,7 +4415,7 @@ advansys_detect(struct scsi_host_templat
                          ASC_DBG1(1,
                                  "advansys_detect: probing I/O port 0x%x...\n",
                              iop);
-                        if (check_region(iop, ASC_IOADR_GAP) != 0) {
+			if (!request_region(iop, ASC_IOADR_GAP, "advansys")){
                              printk(
  "AdvanSys SCSI: specified I/O Port 0x%X is busy\n", iop);
                              /* Don't try this I/O port twice. */
@@ -4425,6 +4425,7 @@ advansys_detect(struct scsi_host_templat
                              printk(
  "AdvanSys SCSI: specified I/O Port 0x%X has no adapter\n", iop);
                              /* Don't try this I/O port twice. */
+			    release_region(iop, ASC_IOADR_GAP);
                              asc_ioport[ioport] = 0;
                              goto ioport_try_again;
                          } else {
@@ -4445,6 +4446,7 @@ advansys_detect(struct scsi_host_templat
                                   ioport++;
                                   goto ioport_try_again;
                              }
+			    release_region(iop, ASC_IOADR_GAP);
                          }
                          /*
                           * This board appears good, don't try the I/O port
@@ -9752,13 +9754,14 @@ AscSearchIOPortAddr11(
      }
      for (; i < ASC_IOADR_TABLE_MAX_IX; i++) {
          iop_base = _asc_def_iop_base[i];
-        if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
+	if (!request_region(iop_base, ASC_IOADR_GAP, "advansys")){
              ASC_DBG1(1,
                 "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
                       iop_base);
              continue;
          }
          ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base);
+	release_region(iop_base, ASC_IOADR_GAP);
          if (AscFindSignature(iop_base)) {
              return (iop_base);
          }


  reply	other threads:[~2006-04-20 22:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19 18:49 Advansys SCSI driver and 2.6.16 Ken Witherow
2006-04-19 23:32 ` Andrew Morton
2006-04-20  5:42   ` Andrew Morton
2006-04-20  6:50     ` Ken Witherow
2006-04-20  7:49       ` Andrew Morton
2006-04-20 22:19         ` Ken Witherow [this message]
2006-04-20 22:29           ` [PATCH 2.6.16] scsi: clean up warnings in Advansys driver Andrew Morton
2006-04-20 17:23     ` Advansys SCSI driver and 2.6.16 Dave Jones

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=Pine.LNX.4.64.0604201735100.2044@death \
    --to=ken@krwtech.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®