RE: [RFCv2 1/3] uhci: change dependency for debug parameter

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

 



> From: Oliver Neukum <oneukum@xxxxxxx>
> 
> To allow a full switch to dynamic debugging make the
> debug parameter conditional on defined(DEBUF) || defined(DYNAMIC_DEBUG)

This version still contains ugly (and unnecessary) #if in the code.

...

Both debug and errbuf are 0 so this would be compiled out:
> +#if defined(DEBUG) || defined(DYNAMIC_DEBUG)
>  				if (debug > 1 && errbuf) {
>  					/* Print the schedule for debugging */
>  					uhci_sprint_schedule(uhci, errbuf,
>  						ERRBUF_LEN - EXTRA_SPACE);
>  					lprintk(errbuf);
>  				}
> +#endif

Ditto - and the if is also unnecessary if you call dev_dbg().

> +#if defined(DEBUG) || defined(DYNAMIC_DEBUG)
>  	if (debug)
>  		dev_info(uhci_dev(uhci), "detected %d ports\n", port);
> +#endif

	David



--
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