RE: [PATCH 22/24] scsi: fixup logging messages in scsi_error.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@xxxxxxx]
...
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 554f885..7e1e190 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -1156,9 +1156,10 @@ int scsi_eh_get_sense(struct list_head *work_q,
>  		shost = scmd->device->host;
>  		if (scsi_host_eh_past_deadline(shost)) {
>  			SCSI_LOG_ERROR_RECOVERY(3,
> -				shost_printk(KERN_INFO, shost,
> -					    "skip %s, past eh deadline\n",
> -					     __func__));
> +				scmd_printk(KERN_INFO, scmd,
> +					    "%s: skip request sense, "
> +					     "past eh deadline\n",

checkpatch lets you keep strings on one line.

> +					     current->comm));
>  			break;
>  		}
>  		if (status_byte(scmd->result) != CHECK_CONDITION)
> @@ -1265,9 +1266,10 @@ static int scsi_eh_test_devices(struct list_head
> *cmd_list,
>  				/* Push items back onto work_q */
>  				list_splice_init(cmd_list, work_q);
>  				SCSI_LOG_ERROR_RECOVERY(3,
> -					shost_printk(KERN_INFO, sdev->host,
> -						     "skip %s, past eh deadline",
> -						     __func__));
> +					sdev_printk(KERN_INFO, sdev,
> +						    "%s: skip test device, "
> +						    "past eh deadline",

checkpatch lets you keep strings on one line.

> +						    current->comm));
>  				break;
>  			}
>  		}
> @@ -1318,21 +1320,22 @@ static int scsi_eh_abort_cmds(struct list_head
> *work_q,
>  		if (scsi_host_eh_past_deadline(shost)) {
>  			list_splice_init(&check_list, work_q);
>  			SCSI_LOG_ERROR_RECOVERY(3,
> -				shost_printk(KERN_INFO, shost,
> -					    "skip %s, past eh deadline\n",
> -					     __func__));
> +				scmd_printk(KERN_INFO, scmd,
> +					    "%s: skip aborting cmd, "
> +					    "past eh deadline\n",

checkpatch lets you keep strings on one line.

> +					    current->comm));
>  			return list_empty(work_q);
>  		}
>  		SCSI_LOG_ERROR_RECOVERY(3,
> -			shost_printk(KERN_INFO, shost,
> -				     "%s: aborting cmd: 0x%p\n",
> +			scmd_printk(KERN_INFO, scmd,
> +				     "%s: aborting cmd\n",
>  				     current->comm, scmd));

As noted by Ewan, the extra scmd argument causes compiler
warnings.

...
> @@ -1390,9 +1393,10 @@ static int scsi_eh_stu(struct Scsi_Host *shost,
>  	shost_for_each_device(sdev, shost) {
>  		if (scsi_host_eh_past_deadline(shost)) {
>  			SCSI_LOG_ERROR_RECOVERY(3,
> -				shost_printk(KERN_INFO, shost,
> -					    "skip %s, past eh deadline\n",
> -					     __func__));
> +				sdev_printk(KERN_INFO, sdev,
> +					    "%s: skip START_UNIT, "
> +					    "past eh deadline\n",

checkpatch lets you keep strings on one line.

> +					    current->comm));
>  			break;
>  		}
>  		stu_scmd = NULL;
...
> @@ -1528,8 +1530,9 @@ static int scsi_eh_target_reset(struct Scsi_Host
> *shost,
>  			list_splice_init(&tmp_list, work_q);
>  			SCSI_LOG_ERROR_RECOVERY(3,
>  				shost_printk(KERN_INFO, shost,
> -					    "skip %s, past eh deadline\n",
> -					     __func__));
> +					    "%s: Skip target reset, "
> +					     "past eh deadline\n",

checkpatch lets you keep strings on one line.

...
> @@ -2191,9 +2194,10 @@ int scsi_error_handler(void *data)
>  		 */
>  		if (!shost->eh_noresume && scsi_autopm_get_host(shost) != 0) {
>  			SCSI_LOG_ERROR_RECOVERY(1,
> -				printk(KERN_ERR "Error handler scsi_eh_%d "
> -						"unable to autoresume\n",
> -						shost->host_no));
> +				shost_printk(KERN_ERR, shost,
> +					     "scsi_eh_%d: "
> +					     "unable to autoresume\n",

checkpatch lets you keep strings on one line.


---
Rob Elliott    HP Server Storage



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux