[PATCH] isci: Make warning messages unique

From: Tim Gardner
Date: Mon Sep 12 2011 - 15:39:20 EST


There are a number of warning messages that are identical. Make
them unique by adding a line number to the printed string.

Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
---
drivers/scsi/isci/phy.c | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 79313a7..33365f8 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -546,10 +546,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_dbg(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
return SCI_SUCCESS;
@@ -587,9 +586,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);

return SCI_FAILURE;
break;
@@ -616,9 +615,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
return SCI_SUCCESS;
@@ -630,9 +629,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received unexpected "
+ "%s:%d: PHY starting substate machine received unexpected "
"event_code %x\n",
- __func__,
+ __func__, __LINE__,
event_code);
return SCI_FAILURE;
}
@@ -658,9 +657,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)

default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);

return SCI_FAILURE;
}
@@ -690,10 +689,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);

return SCI_FAILURE;;
}
@@ -732,9 +730,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);

return SCI_FAILURE;
}
@@ -754,10 +752,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)

default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);

return SCI_FAILURE;
}
@@ -777,9 +774,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%sP SCIC PHY 0x%p ready state machine received "
+ "%s:%d: SCIC PHY 0x%p ready state machine received "
"unexpected event_code %x\n",
- __func__, iphy, event_code);
+ __func__, __LINE__, iphy, event_code);
return SCI_FAILURE_INVALID_STATE;
}
return SCI_SUCCESS;
@@ -791,9 +788,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: SCIC PHY 0x%p resetting state machine received "
+ "%s:%d: SCIC PHY 0x%p resetting state machine received "
"unexpected event_code %x\n",
- __func__, iphy, event_code);
+ __func__, __LINE__, iphy, event_code);

return SCI_FAILURE_INVALID_STATE;
break;
--
1.7.0.4


--------------040509060600050303060808--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/