Re: [RFCv4 06/24] ehci: convert dbg_status() to dynamic debugging

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

 



On Thu, 14 Nov 2013 oliver@xxxxxxxxxx wrote:

> From: Oliver Neukum <oneukum@xxxxxxx>
> 
> Rewrite it so that the status is evaluated only if the
> printk is actually executed.
> 
> Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>

How come you don't make the same change to dbg_intr_buf and
dbg_command_buf?

> @@ -867,7 +864,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
>  	next += temp;
>  
>  	/* Operational Registers */
> -	temp = dbg_status_buf (scratch, sizeof scratch, label,
> +	dbg_status_buf(scratch, sizeof scratch, label,
>  			ehci_readl(ehci, &ehci->regs->status));
>  	temp = scnprintf (next, size, fmt, temp, scratch);
>  	size -= temp;

This is wrong (look at how temp is used).  You need to replace fmt with 
"%s\n" and eliminate temp.

Alan Stern

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux