[SCSI] pm8001: misc code cleanup
authorjack wang <jack_wang@usish.com>
Mon, 7 Dec 2009 09:23:11 +0000 (17:23 +0800)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Dec 2009 16:10:56 +0000 (10:10 -0600)
Add more data to printk's, add some spaces around arithmetic ops and
improve comments.

Signed-off-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm8001_sas.c
drivers/scsi/pm8001/pm8001_sas.h

index 6e1bdd8..9b44c6f 100644 (file)
@@ -2895,7 +2895,8 @@ hw_event_sas_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
        u8 deviceType = pPayload->sas_identify.dev_type;
        port->port_state =  portstate;
        PM8001_MSG_DBG(pm8001_ha,
-               pm8001_printk("HW_EVENT_SAS_PHY_UP \n"));
+               pm8001_printk("HW_EVENT_SAS_PHY_UP port id = %d, phy id = %d\n",
+               port_id, phy_id));
 
        switch (deviceType) {
        case SAS_PHY_UNUSED:
@@ -2969,6 +2970,9 @@ hw_event_sata_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
        struct sas_ha_struct *sas_ha = pm8001_ha->sas;
        struct pm8001_phy *phy = &pm8001_ha->phy[phy_id];
        unsigned long flags;
+       PM8001_MSG_DBG(pm8001_ha,
+               pm8001_printk("HW_EVENT_SATA_PHY_UP port id = %d,"
+               " phy id = %d\n", port_id, phy_id));
        port->port_state =  portstate;
        port->port_attached = 1;
        get_lrate_mode(phy, link_rate);
@@ -4058,7 +4062,7 @@ static int pm8001_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha,
        struct inbound_queue_table *circularQ;
        int ret;
        u32 opc = OPC_INB_LOCAL_PHY_CONTROL;
-       memset((u8 *)&payload, 0, sizeof(payload));
+       memset(&payload, 0, sizeof(payload));
        circularQ = &pm8001_ha->inbnd_q_tbl[0];
        payload.tag = 1;
        payload.phyop_phyid =
index e3d4f38..7f9c83a 100644 (file)
@@ -819,7 +819,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha,
                task->task_done = pm8001_task_done;
                task->timer.data = (unsigned long)task;
                task->timer.function = pm8001_tmf_timedout;
-               task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ;
+               task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ;
                add_timer(&task->timer);
 
                res = pm8001_tag_alloc(pm8001_ha, &ccb_tag);
index 599601e..8e38ca8 100644 (file)
 
 #define DRV_NAME               "pm8001"
 #define DRV_VERSION            "0.1.36"
-#define PM8001_FAIL_LOGGING    0x01 /* libsas EH function logging */
+#define PM8001_FAIL_LOGGING    0x01 /* Error message logging */
 #define PM8001_INIT_LOGGING    0x02 /* driver init logging */
 #define PM8001_DISC_LOGGING    0x04 /* discovery layer logging */
 #define PM8001_IO_LOGGING      0x08 /* I/O path logging */
-#define PM8001_EH_LOGGING      0x10 /* Error message logging */
+#define PM8001_EH_LOGGING      0x10 /* libsas EH function logging*/
 #define PM8001_IOCTL_LOGGING   0x20 /* IOCTL message logging */
 #define PM8001_MSG_LOGGING     0x40 /* misc message logging */
 #define pm8001_printk(format, arg...)  printk(KERN_INFO "%s %d:" format,\