Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1171178 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2015-06-24 10:40 +0200 |
| Last post | 2015-06-24 10:40 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/2] advansys: Do not byteswap sense_len on big endian Geert Uytterhoeven <geert@linux-m68k.org> - 2015-06-24 10:40 +0200
[PATCH 2/2] advansys: Make sure ret and share_irq are initialized Geert Uytterhoeven <geert@linux-m68k.org> - 2015-06-24 10:40 +0200
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-06-24 10:40 +0200 |
| Subject | [PATCH 1/2] advansys: Do not byteswap sense_len on big endian |
| Message-ID | <pEOnT-4zK-9@gated-at.bofh.it> |
On big endian (e.g. m68k):
drivers/scsi/advansys.c: In function ‘adv_build_req’:
drivers/scsi/advansys.c:7806: warning: large integer implicitly truncated to unsigned type
Indeed, adv_scsi_req_q.sense_len is uchar, not __le32, and must never be
byteswapped.
Fixes: 811ddc057aac7228 ("advansys: use DMA-API for mapping sense buffer")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/scsi/advansys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 4305178e4e0147ba..1c1cd657c380c2e0 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -7803,7 +7803,7 @@ adv_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
return ASC_BUSY;
}
scsiqp->sense_addr = cpu_to_le32(sense_addr);
- scsiqp->sense_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE);
+ scsiqp->sense_len = SCSI_SENSE_BUFFERSIZE;
/* Build ADV_SCSI_REQ_Q */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-06-24 10:40 +0200 |
| Subject | [PATCH 2/2] advansys: Make sure ret and share_irq are initialized |
| Message-ID | <pEOnU-4zK-25@gated-at.bofh.it> |
| In reply to | #1171178 |
If CONFIG_PCI=n:
drivers/scsi/advansys.c: In function ‘advansys_board_found’:
drivers/scsi/advansys.c:11037: warning: ‘ret’ is used uninitialized in this function
drivers/scsi/advansys.c:10929: warning: ‘share_irq’ may be used uninitialized in this function
If CONFIG_PCI=n, ret and share_irq are indeed not initialized.
Pre-initialize them to zero, and drop the now superfluous setting of
share_irq to zero.
Note that this is sort-of a false positive, as apparently
ASC_NARROW_BOARD(boardp) can only be false for PCI boards, e.g. if
CONFIG_PCI=y.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/scsi/advansys.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 1c1cd657c380c2e0..a056226d3f35e863 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -10926,7 +10926,7 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
struct asc_board *boardp = shost_priv(shost);
ASC_DVC_VAR *asc_dvc_varp = NULL;
ADV_DVC_VAR *adv_dvc_varp = NULL;
- int share_irq, warn_code, ret;
+ int share_irq = 0, warn_code, ret = 0;
pdev = (bus_type == ASC_IS_PCI) ? to_pci_dev(boardp->dev) : NULL;
@@ -10987,11 +10987,9 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
#ifdef CONFIG_ISA
case ASC_IS_ISA:
shost->unchecked_isa_dma = true;
- share_irq = 0;
break;
case ASC_IS_VL:
shost->unchecked_isa_dma = false;
- share_irq = 0;
break;
case ASC_IS_EISA:
shost->unchecked_isa_dma = false;
@@ -11008,7 +11006,6 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
shost_printk(KERN_ERR, shost, "unknown adapter type: "
"%d\n", asc_dvc_varp->bus_type);
shost->unchecked_isa_dma = false;
- share_irq = 0;
break;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web