aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index f55b9f7d9396..d3f86646cb08 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -173,18 +173,6 @@ static void qla4xxx_conn_stop(struct iscsi_cls_conn *conn, int flag)
173 printk(KERN_ERR "iscsi: invalid stop flag %d\n", flag); 173 printk(KERN_ERR "iscsi: invalid stop flag %d\n", flag);
174} 174}
175 175
176static ssize_t format_addr(char *buf, const unsigned char *addr, int len)
177{
178 int i;
179 char *cp = buf;
180
181 for (i = 0; i < len; i++)
182 cp += sprintf(cp, "%02x%c", addr[i],
183 i == (len - 1) ? '\n' : ':');
184 return cp - buf;
185}
186
187
188static int qla4xxx_host_get_param(struct Scsi_Host *shost, 176static int qla4xxx_host_get_param(struct Scsi_Host *shost,
189 enum iscsi_host_param param, char *buf) 177 enum iscsi_host_param param, char *buf)
190{ 178{
@@ -193,7 +181,7 @@ static int qla4xxx_host_get_param(struct Scsi_Host *shost,
193 181
194 switch (param) { 182 switch (param) {
195 case ISCSI_HOST_PARAM_HWADDRESS: 183 case ISCSI_HOST_PARAM_HWADDRESS:
196 len = format_addr(buf, ha->my_mac, MAC_ADDR_LEN); 184 len = sysfs_format_mac(buf, ha->my_mac, MAC_ADDR_LEN);
197 break; 185 break;
198 case ISCSI_HOST_PARAM_IPADDRESS: 186 case ISCSI_HOST_PARAM_IPADDRESS:
199 len = sprintf(buf, "%d.%d.%d.%d\n", ha->ip_address[0], 187 len = sprintf(buf, "%d.%d.%d.%d\n", ha->ip_address[0],