aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-07-26 11:39:17 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:39:15 -0400
commitce3a7f1202e02324841ef87d7d3f08ff351d07c7 (patch)
tree410b3412a60a94215a3020c0be36b64527132991
parent9649af39e30d8d2668c35d008e8e14ae138e4d40 (diff)
[SCSI] advansys: remove AscCompareString()
AscCompareString() is just another name for strncmp Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/advansys.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 424549d79b13..277002a54601 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -1911,7 +1911,6 @@ static int AscIsrChipHalted(ASC_DVC_VAR *);
1911static uchar _AscCopyLramScsiDoneQ(PortAddr, ushort, 1911static uchar _AscCopyLramScsiDoneQ(PortAddr, ushort,
1912 ASC_QDONE_INFO *, ASC_DCNT); 1912 ASC_QDONE_INFO *, ASC_DCNT);
1913static int AscIsrQDone(ASC_DVC_VAR *); 1913static int AscIsrQDone(ASC_DVC_VAR *);
1914static int AscCompareString(uchar *, uchar *, int);
1915#ifdef CONFIG_ISA 1914#ifdef CONFIG_ISA
1916static ushort AscGetEisaChipCfg(PortAddr); 1915static ushort AscGetEisaChipCfg(PortAddr);
1917#endif /* CONFIG_ISA */ 1916#endif /* CONFIG_ISA */
@@ -10998,8 +10997,7 @@ AscAsyncFix(ASC_DVC_VAR *asc_dvc, uchar tid_no, ASC_SCSI_INQUIRY *inq)
10998 if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_ASYN_USE_SYN) { 10997 if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_ASYN_USE_SYN) {
10999 if (!(asc_dvc->init_sdtr & tid_bits)) { 10998 if (!(asc_dvc->init_sdtr & tid_bits)) {
11000 if ((dvc_type == TYPE_ROM) && 10999 if ((dvc_type == TYPE_ROM) &&
11001 (AscCompareString((uchar *)inq->vendor_id, 11000 (strncmp(inq->vendor_id, "HP ", 3) == 0)) {
11002 (uchar *)"HP ", 3) == 0)) {
11003 asc_dvc->pci_fix_asyn_xfer_always |= tid_bits; 11001 asc_dvc->pci_fix_asyn_xfer_always |= tid_bits;
11004 } 11002 }
11005 asc_dvc->pci_fix_asyn_xfer |= tid_bits; 11003 asc_dvc->pci_fix_asyn_xfer |= tid_bits;
@@ -11022,10 +11020,8 @@ AscAsyncFix(ASC_DVC_VAR *asc_dvc, uchar tid_no, ASC_SCSI_INQUIRY *inq)
11022static int AscTagQueuingSafe(ASC_SCSI_INQUIRY *inq) 11020static int AscTagQueuingSafe(ASC_SCSI_INQUIRY *inq)
11023{ 11021{
11024 if ((inq->add_len >= 32) && 11022 if ((inq->add_len >= 32) &&
11025 (AscCompareString((uchar *)inq->vendor_id, 11023 (strncmp(inq->vendor_id, "QUANTUM XP34301", 15) == 0) &&
11026 (uchar *)"QUANTUM XP34301", 15) == 0) && 11024 (strncmp(inq->product_rev_level, "1071", 4) == 0)) {
11027 (AscCompareString((uchar *)inq->product_rev_level,
11028 (uchar *)"1071", 4) == 0)) {
11029 return 0; 11025 return 0;
11030 } 11026 }
11031 return 1; 11027 return 1;
@@ -11076,19 +11072,6 @@ AscInquiryHandling(ASC_DVC_VAR *asc_dvc, uchar tid_no, ASC_SCSI_INQUIRY *inq)
11076 return; 11072 return;
11077} 11073}
11078 11074
11079static int AscCompareString(uchar *str1, uchar *str2, int len)
11080{
11081 int i;
11082 int diff;
11083
11084 for (i = 0; i < len; i++) {
11085 diff = (int)(str1[i] - str2[i]);
11086 if (diff != 0)
11087 return (diff);
11088 }
11089 return (0);
11090}
11091
11092static uchar AscReadLramByte(PortAddr iop_base, ushort addr) 11075static uchar AscReadLramByte(PortAddr iop_base, ushort addr)
11093{ 11076{
11094 uchar byte_data; 11077 uchar byte_data;