Re: [PATCH 2/13] ATA ACPI: debugging infrastructure

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

 



> --- linux-2616-rc4-ata.orig/include/linux/libata.h
> +++ linux-2616-rc4-ata/include/linux/libata.h
> @@ -36,7 +36,8 @@
>  #include <acpi/acpi.h>
>  
>  /*
> - * compile-time options
> + * compile-time options: to be removed as soon as all the drivers are
> + * converted to the new debugging mechanism
>   */
>  #undef ATA_DEBUG		/* debugging output */
>  #undef ATA_VERBOSE_DEBUG	/* yet more debugging output */
> @@ -72,6 +73,38 @@
>          }
>  #endif
>  
> +/* NEW: debug levels */
> +#define HAVE_LIBATA_MSG 1

What is new with them?

> +enum {
> +	ATA_MSG_DRV	= 0x0001,
> +	ATA_MSG_INFO	= 0x0002,
> +	ATA_MSG_PROBE	= 0x0004,
> +	ATA_MSG_WARN	= 0x0008,
> +	ATA_MSG_MALLOC	= 0x0010,
> +	ATA_MSG_CTL	= 0x0020,
> +	ATA_MSG_INTR	= 0x0040,
> +	ATA_MSG_ERR	= 0x0080,
> +};
> +
> +#define ata_msg_drv(p)    ((p)->msg_enable & ATA_MSG_DRV)
> +#define ata_msg_info(p)   ((p)->msg_enable & ATA_MSG_INFO)
> +#define ata_msg_probe(p)  ((p)->msg_enable & ATA_MSG_PROBE)
> +#define ata_msg_warn(p)   ((p)->msg_enable & ATA_MSG_WARN)
> +#define ata_msg_malloc(p) ((p)->msg_enable & ATA_MSG_MALLOC)
> +#define ata_msg_ctl(p)    ((p)->msg_enable & ATA_MSG_CTL)
> +#define ata_msg_intr(p)   ((p)->msg_enable & ATA_MSG_INTR)
> +#define ata_msg_err(p)    ((p)->msg_enable & ATA_MSG_ERR)

I hate to see debugging infrastructure like this. We already have it
in ACPI and it is nasty/useless. It hides serious errors during normal
run, while if you turn on the debugging, it floods logs so that
it is unusable, too. I end up having to replace dprintks with
printks... nasty.
								Pavel
-- 
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux