lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 00:26:35 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	David Cohen <david.a.cohen@...ux.intel.com>,
	Stephen Boyd <sboyd@...eaurora.org>,
	Baolu Lu <baolu.lu@...ux.intel.com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 01/12] usb: add bus type for USB ULPI

On Wed, 2015-03-18 at 14:40 +0200, Heikki Krogerus wrote:
> --- a/drivers/usb/common/Makefile
> +++ b/drivers/usb/common/Makefile
> @@ -7,3 +7,4 @@ usb-common-y			  += common.o
>  usb-common-$(CONFIG_USB_LED_TRIG) += led.o
>  
>  obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o
> +obj-$(CONFIG_USB_ULPI_BUS)	+= ulpi.o

USB_ULPI_BUS is added as a bool symbol (see below). So ulpi.o will never
be part of a module.

> --- /dev/null
> +++ b/drivers/usb/common/ulpi.c

> +#include <linux/module.h>

So is this include needed?

> +static int __init ulpi_init(void)
> +{
> +	return bus_register(&ulpi_bus);
> +}
> +module_init(ulpi_init);

This will be equivalent to
    __initcall(ulpi_init)

according to include/linux/init.h.

> +static void __exit ulpi_exit(void)
> +{
> +	bus_unregister(&ulpi_bus);
> +}
> +module_exit(ulpi_exit);

This will never be called.

> +MODULE_AUTHOR("Intel Corporation");
> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("USB ULPI PHY bus");

And these three macros will be, effectively, preprocessed away.

> --- a/drivers/usb/core/Kconfig
> +++ b/drivers/usb/core/Kconfig
 
> +config USB_ULPI_BUS
> +	bool "USB ULPI PHY interface support"
> +	depends on USB || USB_GADGET
> +	help
> +	  Say yes if you have ULPI PHY attached to your USB controller.
> +
> +	  If unsure, say N.
> +


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ