Re: [PATCH 1/2] pci_hotplug: add an uevent framework to pci_hotplug

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

 



On Fri, Mar 13, 2009 at 06:15:33PM +0900, Taku Izumi wrote:
> +#define MY_NAME "pci_hotplug_uevent"
> +#define err(format, arg...)                                             \
> +		printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
> +#define info(format, arg...)                                            \
> +		printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
> +#define warn(format, arg...)                                            \
> +		printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)

Please don't create these again.  Use dev_err, dev_info, and dev_warn()
instead.

> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.

Are you sure about "any later version"?

> +#ifndef PCI_HOTPLUG_UEVENT_H
> +#define PCI_HOTPLUG_UEVENT_H
> +
> +enum pcihp_uevent_type {
> +	PHP_UEVT_PRESENCE_ON,
> +	PHP_UEVT_PRESENCE_OFF,
> +	PHP_UEVT_SWITCH_CLOSE,
> +	PHP_UEVT_SWITCH_OPEN,
> +	PHP_UEVT_POWER_FAULT,
> +	PHP_UEVT_POWER_FAULT_CLEAR,
> +	PHP_UEVT_BUTTON_PRESS,
> +};

You should explicitly call these out, as they might need to change in
the future and you don't want to change them, right?

thanks,

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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux