linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the usb-gadget tree
@ 2013-12-16  4:40 Stephen Rothwell
  2013-12-16 19:41 ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-16  4:40 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-next, linux-kernel, WingMan Kwok, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

Hi Felipe,

After merging the usb-gadget tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/usb/phy/phy-keystone.c: In function 'keystone_usbphy_probe':
drivers/usb/phy/phy-keystone.c:96:4: warning: passing argument 3 of 'usb_phy_gen_create_phy' makes pointer from integer without a cast [enabled by default]
    USB_PHY_TYPE_USB2, 0, false);
    ^
In file included from drivers/usb/phy/phy-keystone.c:25:0:
drivers/usb/phy/phy-generic.h:18:5: note: expected 'struct usb_phy_gen_xceiv_platform_data *' but argument is of type 'int'
 int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
     ^
drivers/usb/phy/phy-keystone.c:96:4: error: too many arguments to function 'usb_phy_gen_create_phy'
    USB_PHY_TYPE_USB2, 0, false);
    ^
In file included from drivers/usb/phy/phy-keystone.c:25:0:
drivers/usb/phy/phy-generic.h:18:5: note: declared here
 int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
     ^

Caused by commit 25acdd08fd71 ("usb: phy: add Keystone usb phy driver")
interacting with commit bd27fa44e138 ("usb: phy: add Keystone usb phy
driver") which was merged before v3.13-rc1 and is included in the
usb-gadget tree.

I have used the usb-gadget tree from next-20131206 again for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-16  4:40 linux-next: build failure after merge of the usb-gadget tree Stephen Rothwell
@ 2013-12-16 19:41 ` Felipe Balbi
  2013-12-16 23:10   ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2013-12-16 19:41 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Felipe Balbi, linux-next, linux-kernel, WingMan Kwok, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

Hi,

On Mon, Dec 16, 2013 at 03:40:20PM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> After merging the usb-gadget tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/usb/phy/phy-keystone.c: In function 'keystone_usbphy_probe':
> drivers/usb/phy/phy-keystone.c:96:4: warning: passing argument 3 of 'usb_phy_gen_create_phy' makes pointer from integer without a cast [enabled by default]
>     USB_PHY_TYPE_USB2, 0, false);
>     ^
> In file included from drivers/usb/phy/phy-keystone.c:25:0:
> drivers/usb/phy/phy-generic.h:18:5: note: expected 'struct usb_phy_gen_xceiv_platform_data *' but argument is of type 'int'
>  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
>      ^
> drivers/usb/phy/phy-keystone.c:96:4: error: too many arguments to function 'usb_phy_gen_create_phy'
>     USB_PHY_TYPE_USB2, 0, false);
>     ^
> In file included from drivers/usb/phy/phy-keystone.c:25:0:
> drivers/usb/phy/phy-generic.h:18:5: note: declared here
>  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
>      ^
> 
> Caused by commit 25acdd08fd71 ("usb: phy: add Keystone usb phy driver")
> interacting with commit bd27fa44e138 ("usb: phy: add Keystone usb phy
> driver") which was merged before v3.13-rc1 and is included in the
> usb-gadget tree.

I cannot see how those commits would cause the error above. I have
recompiled my tree with allmodconfig (x86 and ARM) config and
omap2plus_defconfig (adding COMPILE_TEST and enabling KEYSTONE PHY) and
cannot see this error.

Maybe someone applied a drivers/usb/phy/ patch ahead of me ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-16 19:41 ` Felipe Balbi
@ 2013-12-16 23:10   ` Stephen Rothwell
  2013-12-16 23:38     ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-16 23:10 UTC (permalink / raw)
  To: balbi; +Cc: linux-next, linux-kernel, WingMan Kwok, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]

Hi Felipe,

On Mon, 16 Dec 2013 13:41:13 -0600 Felipe Balbi <balbi@ti.com> wrote:
>
> On Mon, Dec 16, 2013 at 03:40:20PM +1100, Stephen Rothwell wrote:
> > 
> > After merging the usb-gadget tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/usb/phy/phy-keystone.c: In function 'keystone_usbphy_probe':
> > drivers/usb/phy/phy-keystone.c:96:4: warning: passing argument 3 of 'usb_phy_gen_create_phy' makes pointer from integer without a cast [enabled by default]
> >     USB_PHY_TYPE_USB2, 0, false);
> >     ^
> > In file included from drivers/usb/phy/phy-keystone.c:25:0:
> > drivers/usb/phy/phy-generic.h:18:5: note: expected 'struct usb_phy_gen_xceiv_platform_data *' but argument is of type 'int'
> >  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
> >      ^
> > drivers/usb/phy/phy-keystone.c:96:4: error: too many arguments to function 'usb_phy_gen_create_phy'
> >     USB_PHY_TYPE_USB2, 0, false);
> >     ^
> > In file included from drivers/usb/phy/phy-keystone.c:25:0:
> > drivers/usb/phy/phy-generic.h:18:5: note: declared here
> >  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
> >      ^
> > 
> > Caused by commit 25acdd08fd71 ("usb: phy: add Keystone usb phy driver")
> > interacting with commit bd27fa44e138 ("usb: phy: add Keystone usb phy
> > driver") which was merged before v3.13-rc1 and is included in the
> > usb-gadget tree.
> 
> I cannot see how those commits would cause the error above. I have
> recompiled my tree with allmodconfig (x86 and ARM) config and
> omap2plus_defconfig (adding COMPILE_TEST and enabling KEYSTONE PHY) and
> cannot see this error.
> 
> Maybe someone applied a drivers/usb/phy/ patch ahead of me ?

That would be your patch (af9f51c5512f "usb: phy: generic: fix how we find
out about our resources") that went into v3.13-rc4 ...

Can you send me a suitable merge fixup, please?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-16 23:10   ` Stephen Rothwell
@ 2013-12-16 23:38     ` Felipe Balbi
  2013-12-17  4:27       ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2013-12-16 23:38 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: balbi, linux-next, linux-kernel, WingMan Kwok, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 8957 bytes --]

On Tue, Dec 17, 2013 at 10:10:32AM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> On Mon, 16 Dec 2013 13:41:13 -0600 Felipe Balbi <balbi@ti.com> wrote:
> >
> > On Mon, Dec 16, 2013 at 03:40:20PM +1100, Stephen Rothwell wrote:
> > > 
> > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > drivers/usb/phy/phy-keystone.c: In function 'keystone_usbphy_probe':
> > > drivers/usb/phy/phy-keystone.c:96:4: warning: passing argument 3 of 'usb_phy_gen_create_phy' makes pointer from integer without a cast [enabled by default]
> > >     USB_PHY_TYPE_USB2, 0, false);
> > >     ^
> > > In file included from drivers/usb/phy/phy-keystone.c:25:0:
> > > drivers/usb/phy/phy-generic.h:18:5: note: expected 'struct usb_phy_gen_xceiv_platform_data *' but argument is of type 'int'
> > >  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
> > >      ^
> > > drivers/usb/phy/phy-keystone.c:96:4: error: too many arguments to function 'usb_phy_gen_create_phy'
> > >     USB_PHY_TYPE_USB2, 0, false);
> > >     ^
> > > In file included from drivers/usb/phy/phy-keystone.c:25:0:
> > > drivers/usb/phy/phy-generic.h:18:5: note: declared here
> > >  int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
> > >      ^
> > > 
> > > Caused by commit 25acdd08fd71 ("usb: phy: add Keystone usb phy driver")
> > > interacting with commit bd27fa44e138 ("usb: phy: add Keystone usb phy
> > > driver") which was merged before v3.13-rc1 and is included in the
> > > usb-gadget tree.
> > 
> > I cannot see how those commits would cause the error above. I have
> > recompiled my tree with allmodconfig (x86 and ARM) config and
> > omap2plus_defconfig (adding COMPILE_TEST and enabling KEYSTONE PHY) and
> > cannot see this error.
> > 
> > Maybe someone applied a drivers/usb/phy/ patch ahead of me ?
> 
> That would be your patch (af9f51c5512f "usb: phy: generic: fix how we find
> out about our resources") that went into v3.13-rc4 ...
> 
> Can you send me a suitable merge fixup, please?

It's long, sorry, basically what I did was this:

-      ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen,
-                      USB_PHY_TYPE_USB2, 0, false);
+      ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen, NULL);

full commit:

commit 7df5cc5f4558955dcba46c328e68df5351f3c958
Merge: 319e2e3 f8800d4
Author: Felipe Balbi <balbi@ti.com>
Date:   Mon Dec 16 17:36:33 2013 -0600

    Merge branch 'next' into tmp-merge
    
    * next: (60 commits)
      usb: gadget: f_fs: fix sparse warning
      usb: gadget: FunctionFS: add configfs support
      usb: gadget: FunctionFS: Remove compatibility layer
      usb: gadget: g_ffs: convert to new interface of f_fs
      usb: gadget: FunctionFS: convert to new function interface with backward compatibility
      usb: gadget: FunctionFS: add devices management code
      usb: gadget: FunctionFS: create utility file
      usb: gadget: FunctionFS: Remove VLAIS usage from gadget code
      usb: gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko
      usb: gadget: f_rndis: remove compatibility layer
      usb: gadget: g_ffs: convert to new interface of f_rndis
      usb: gadget: f_subset: remove compatibility layer
      usb: gadget: g_ffs: convert to new interface of f_subset
      usb: gadget: f_ecm: remove compatibility layer
      usb: gadget: g_ffs: convert to new interface of f_ecm
      usb: gadget: g_ffs: remove a reduntant gfs_ether_setup variable
      usb: gadget: configfs: allow setting function instance's name
      usb: gadget: s3c-hsotg: add flush TX FIFO when kill all requests
      usb: gadget: s3c-hsotg: fix maxpacket size in s3c_hsotg_irq_enumdone
      usb: phy: initialize the notifier when add a new phy
      ...
    
    Signed-off-by: Felipe Balbi <balbi@ti.com>

diff --cc drivers/usb/phy/phy-keystone.c
index 0000000,a04fb94..533db12
mode 000000,100644..100644
--- a/drivers/usb/phy/phy-keystone.c
+++ b/drivers/usb/phy/phy-keystone.c
@@@ -1,0 -1,142 +1,141 @@@
+ /*
+  * phy-keystone - USB PHY, talking to dwc3 controller in Keystone.
+  *
+  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
+  * 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.
+  *
+  * Author: WingMan Kwok <w-kwok2@ti.com>
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  */
+ 
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/usb/usb_phy_gen_xceiv.h>
+ #include <linux/io.h>
+ #include <linux/of.h>
+ 
+ #include "phy-generic.h"
+ 
+ /* USB PHY control register offsets */
+ #define USB_PHY_CTL_UTMI		0x0000
+ #define USB_PHY_CTL_PIPE		0x0004
+ #define USB_PHY_CTL_PARAM_1		0x0008
+ #define USB_PHY_CTL_PARAM_2		0x000c
+ #define USB_PHY_CTL_CLOCK		0x0010
+ #define USB_PHY_CTL_PLL			0x0014
+ 
+ #define PHY_REF_SSP_EN			BIT(29)
+ 
+ struct keystone_usbphy {
+ 	struct usb_phy_gen_xceiv	usb_phy_gen;
+ 	void __iomem			*phy_ctrl;
+ };
+ 
+ static inline u32 keystone_usbphy_readl(void __iomem *base, u32 offset)
+ {
+ 	return readl(base + offset);
+ }
+ 
+ static inline void keystone_usbphy_writel(void __iomem *base,
+ 					  u32 offset, u32 value)
+ {
+ 	writel(value, base + offset);
+ }
+ 
+ static int keystone_usbphy_init(struct usb_phy *phy)
+ {
+ 	struct keystone_usbphy *k_phy = dev_get_drvdata(phy->dev);
+ 	u32 val;
+ 
+ 	val  = keystone_usbphy_readl(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK);
+ 	keystone_usbphy_writel(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK,
+ 				val | PHY_REF_SSP_EN);
+ 	return 0;
+ }
+ 
+ static void keystone_usbphy_shutdown(struct usb_phy *phy)
+ {
+ 	struct keystone_usbphy *k_phy = dev_get_drvdata(phy->dev);
+ 	u32 val;
+ 
+ 	val  = keystone_usbphy_readl(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK);
+ 	keystone_usbphy_writel(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK,
+ 				val &= ~PHY_REF_SSP_EN);
+ }
+ 
+ static int keystone_usbphy_probe(struct platform_device *pdev)
+ {
+ 	struct device		*dev = &pdev->dev;
+ 	struct keystone_usbphy	*k_phy;
+ 	struct resource		*res;
+ 	int ret;
+ 
+ 	k_phy = devm_kzalloc(dev, sizeof(*k_phy), GFP_KERNEL);
+ 	if (!k_phy)
+ 		return -ENOMEM;
+ 
+ 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ 	if (!res) {
+ 		dev_err(dev, "missing usb phy resource\n");
+ 		return -EINVAL;
+ 	}
+ 
+ 	k_phy->phy_ctrl = devm_ioremap_resource(dev, res);
+ 	if (IS_ERR(k_phy->phy_ctrl))
+ 		return PTR_ERR(k_phy->phy_ctrl);
+ 
 -	ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen,
 -			USB_PHY_TYPE_USB2, 0, false);
++	ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen, NULL);
+ 	if (ret)
+ 		return ret;
+ 
+ 	k_phy->usb_phy_gen.phy.init = keystone_usbphy_init;
+ 	k_phy->usb_phy_gen.phy.shutdown = keystone_usbphy_shutdown;
+ 
+ 	platform_set_drvdata(pdev, k_phy);
+ 
+ 	ret = usb_add_phy_dev(&k_phy->usb_phy_gen.phy);
+ 	if (ret)
+ 		return ret;
+ 
+ 	return 0;
+ }
+ 
+ static int keystone_usbphy_remove(struct platform_device *pdev)
+ {
+ 	struct keystone_usbphy *k_phy = platform_get_drvdata(pdev);
+ 
+ 	usb_remove_phy(&k_phy->usb_phy_gen.phy);
+ 
+ 	return 0;
+ }
+ 
+ static const struct of_device_id keystone_usbphy_ids[] = {
+ 	{ .compatible = "ti,keystone-usbphy" },
+ 	{ }
+ };
+ MODULE_DEVICE_TABLE(of, keystone_usbphy_ids);
+ 
+ static struct platform_driver keystone_usbphy_driver = {
+ 	.probe          = keystone_usbphy_probe,
+ 	.remove         = keystone_usbphy_remove,
+ 	.driver         = {
+ 		.name   = "keystone-usbphy",
+ 		.owner  = THIS_MODULE,
+ 		.of_match_table = of_match_ptr(keystone_usbphy_ids),
+ 	},
+ };
+ 
+ module_platform_driver(keystone_usbphy_driver);
+ 
+ MODULE_ALIAS("platform:keystone-usbphy");
+ MODULE_AUTHOR("Texas Instruments Inc.");
+ MODULE_DESCRIPTION("Keystone USB phy driver");
+ MODULE_LICENSE("GPL v2");
diff --cc drivers/usb/phy/phy-mxs-usb.c
index 545844b,fa44c0f..b42897b
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@@ -160,11 -167,9 +167,9 @@@ static int mxs_phy_probe(struct platfor
  	mxs_phy->phy.notify_disconnect	= mxs_phy_on_disconnect;
  	mxs_phy->phy.type		= USB_PHY_TYPE_USB2;
  
- 	ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier);
- 
  	mxs_phy->clk = clk;
  
 -	platform_set_drvdata(pdev, &mxs_phy->phy);
 +	platform_set_drvdata(pdev, mxs_phy);
  
  	ret = usb_add_phy_dev(&mxs_phy->phy);
  	if (ret)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-16 23:38     ` Felipe Balbi
@ 2013-12-17  4:27       ` Stephen Rothwell
  0 siblings, 0 replies; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-17  4:27 UTC (permalink / raw)
  To: balbi; +Cc: linux-next, linux-kernel, WingMan Kwok, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Hi Filipe,

On Mon, 16 Dec 2013 17:38:15 -0600 Felipe Balbi <balbi@ti.com> wrote:
>
> It's long, sorry, basically what I did was this:
> 
> -      ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen,
> -                      USB_PHY_TYPE_USB2, 0, false);
> +      ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen, NULL);

OK, so I added that as a merge fix patch from today.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2020-03-16 18:11   ` John Stultz
@ 2020-03-16 19:46     ` Greg KH
  0 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2020-03-16 19:46 UTC (permalink / raw)
  To: John Stultz
  Cc: Stephen Rothwell, Felipe Balbi, Linux Next Mailing List,
	Linux Kernel Mailing List, Heikki Krogerus, Yu Chen,
	Bryan O'Donoghue

On Mon, Mar 16, 2020 at 11:11:00AM -0700, John Stultz wrote:
> On Mon, Mar 16, 2020 at 10:42 AM John Stultz <john.stultz@linaro.org> wrote:
> >
> > On Sun, Mar 15, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the usb-gadget tree, today's linux-next build (arm
> > > multi_v7_defconfig) failed like this:
> > >
> > > drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
> > > drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
> > >   551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
> > >       |                       ^
> > > drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
> > >   552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
> > >       |                       ^
> > >
> > > Caused by commit
> > >
> > >   8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")
> > >
> > > interacting with commit
> > >
> > >   bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")
> > >
> > > from the usb tree.
> > >
> > > I have added the following merge fix patch (which may need more work):
> > >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Mon, 16 Mar 2020 14:34:31 +1100
> > > Subject: [PATCH] usb: dwc3: fix up for role switch API change
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  drivers/usb/dwc3/drd.c | 10 ++++++----
> > >  1 file changed, 6 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> > > index db68d48c2267..7db1ffc92bbd 100644
> > > --- a/drivers/usb/dwc3/drd.c
> > > +++ b/drivers/usb/dwc3/drd.c
> > > @@ -478,9 +478,10 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
> > >
> > >  #if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
> > >  #define ROLE_SWITCH 1
> > > -static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
> > > +static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
> > > +                                   enum usb_role role)
> > >  {
> > > -       struct dwc3 *dwc = dev_get_drvdata(dev);
> > > +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
> > >         u32 mode;
> > >
> > >         switch (role) {
> > > @@ -502,9 +503,9 @@ static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
> > >         return 0;
> > >  }
> > >
> > > -static enum usb_role dwc3_usb_role_switch_get(struct device *dev)
> > > +static enum usb_role dwc3_usb_role_switch_get(struct usb_role_switch *sw)
> > >  {
> > > -       struct dwc3 *dwc = dev_get_drvdata(dev);
> > > +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
> > >         unsigned long flags;
> > >         enum usb_role role;
> > >
> > > @@ -550,6 +551,7 @@ static int dwc3_setup_role_switch(struct dwc3 *dwc)
> > >         dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
> > >         dwc3_role_switch.set = dwc3_usb_role_switch_set;
> > >         dwc3_role_switch.get = dwc3_usb_role_switch_get;
> > > +       dwc3_role_switch.driver_data = dwc;
> > >         dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch);
> > >         if (IS_ERR(dwc->role_sw))
> > >                 return PTR_ERR(dwc->role_sw);
> >
> > Yes, thanks. Bryan pointed out there was a problem with the internal
> > api change in -next, and I intended to resend the set this week.
> > Your solution looks like what I have in my tree at first glance, but
> > I'll double check to be sure.
> 
> Yes. Just confirmed its the same as what I had in my tree.
> 
> Acked-by: John Stultz <john.stultz@linaro.org>
> 
> Greg: Could you pull Stephen's fix into your tree?

It's been there for many hours now :)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2020-03-16 17:42 ` John Stultz
@ 2020-03-16 18:11   ` John Stultz
  2020-03-16 19:46     ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: John Stultz @ 2020-03-16 18:11 UTC (permalink / raw)
  To: Stephen Rothwell, Greg KH
  Cc: Felipe Balbi, Linux Next Mailing List, Linux Kernel Mailing List,
	Heikki Krogerus, Yu Chen, Bryan O'Donoghue

On Mon, Mar 16, 2020 at 10:42 AM John Stultz <john.stultz@linaro.org> wrote:
>
> On Sun, Mar 15, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the usb-gadget tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> >
> > drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
> > drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
> >   551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
> >       |                       ^
> > drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
> >   552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
> >       |                       ^
> >
> > Caused by commit
> >
> >   8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")
> >
> > interacting with commit
> >
> >   bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")
> >
> > from the usb tree.
> >
> > I have added the following merge fix patch (which may need more work):
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 16 Mar 2020 14:34:31 +1100
> > Subject: [PATCH] usb: dwc3: fix up for role switch API change
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/usb/dwc3/drd.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> > index db68d48c2267..7db1ffc92bbd 100644
> > --- a/drivers/usb/dwc3/drd.c
> > +++ b/drivers/usb/dwc3/drd.c
> > @@ -478,9 +478,10 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
> >
> >  #if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
> >  #define ROLE_SWITCH 1
> > -static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
> > +static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
> > +                                   enum usb_role role)
> >  {
> > -       struct dwc3 *dwc = dev_get_drvdata(dev);
> > +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
> >         u32 mode;
> >
> >         switch (role) {
> > @@ -502,9 +503,9 @@ static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
> >         return 0;
> >  }
> >
> > -static enum usb_role dwc3_usb_role_switch_get(struct device *dev)
> > +static enum usb_role dwc3_usb_role_switch_get(struct usb_role_switch *sw)
> >  {
> > -       struct dwc3 *dwc = dev_get_drvdata(dev);
> > +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
> >         unsigned long flags;
> >         enum usb_role role;
> >
> > @@ -550,6 +551,7 @@ static int dwc3_setup_role_switch(struct dwc3 *dwc)
> >         dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
> >         dwc3_role_switch.set = dwc3_usb_role_switch_set;
> >         dwc3_role_switch.get = dwc3_usb_role_switch_get;
> > +       dwc3_role_switch.driver_data = dwc;
> >         dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch);
> >         if (IS_ERR(dwc->role_sw))
> >                 return PTR_ERR(dwc->role_sw);
>
> Yes, thanks. Bryan pointed out there was a problem with the internal
> api change in -next, and I intended to resend the set this week.
> Your solution looks like what I have in my tree at first glance, but
> I'll double check to be sure.

Yes. Just confirmed its the same as what I had in my tree.

Acked-by: John Stultz <john.stultz@linaro.org>

Greg: Could you pull Stephen's fix into your tree?

thanks
-john

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2020-03-16  3:37 Stephen Rothwell
@ 2020-03-16 17:42 ` John Stultz
  2020-03-16 18:11   ` John Stultz
  0 siblings, 1 reply; 22+ messages in thread
From: John Stultz @ 2020-03-16 17:42 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Felipe Balbi, Greg KH, Linux Next Mailing List,
	Linux Kernel Mailing List, Heikki Krogerus, Yu Chen,
	Bryan O'Donoghue

On Sun, Mar 15, 2020 at 8:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the usb-gadget tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
> drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
>   551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
>       |                       ^
> drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
>   552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
>       |                       ^
>
> Caused by commit
>
>   8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")
>
> interacting with commit
>
>   bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")
>
> from the usb tree.
>
> I have added the following merge fix patch (which may need more work):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 16 Mar 2020 14:34:31 +1100
> Subject: [PATCH] usb: dwc3: fix up for role switch API change
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/usb/dwc3/drd.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
> index db68d48c2267..7db1ffc92bbd 100644
> --- a/drivers/usb/dwc3/drd.c
> +++ b/drivers/usb/dwc3/drd.c
> @@ -478,9 +478,10 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
>
>  #if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
>  #define ROLE_SWITCH 1
> -static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
> +static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
> +                                   enum usb_role role)
>  {
> -       struct dwc3 *dwc = dev_get_drvdata(dev);
> +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
>         u32 mode;
>
>         switch (role) {
> @@ -502,9 +503,9 @@ static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
>         return 0;
>  }
>
> -static enum usb_role dwc3_usb_role_switch_get(struct device *dev)
> +static enum usb_role dwc3_usb_role_switch_get(struct usb_role_switch *sw)
>  {
> -       struct dwc3 *dwc = dev_get_drvdata(dev);
> +       struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
>         unsigned long flags;
>         enum usb_role role;
>
> @@ -550,6 +551,7 @@ static int dwc3_setup_role_switch(struct dwc3 *dwc)
>         dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
>         dwc3_role_switch.set = dwc3_usb_role_switch_set;
>         dwc3_role_switch.get = dwc3_usb_role_switch_get;
> +       dwc3_role_switch.driver_data = dwc;
>         dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch);
>         if (IS_ERR(dwc->role_sw))
>                 return PTR_ERR(dwc->role_sw);

Yes, thanks. Bryan pointed out there was a problem with the internal
api change in -next, and I intended to resend the set this week.
Your solution looks like what I have in my tree at first glance, but
I'll double check to be sure.

Thanks so much!
-john

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build failure after merge of the usb-gadget tree
@ 2020-03-16  3:37 Stephen Rothwell
  2020-03-16 17:42 ` John Stultz
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2020-03-16  3:37 UTC (permalink / raw)
  To: Felipe Balbi, Greg KH
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Heikki Krogerus, Yu Chen, John Stultz

[-- Attachment #1: Type: text/plain, Size: 2951 bytes --]

Hi all,

After merging the usb-gadget tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
  551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
      |                       ^
drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
  552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
      |                       ^

Caused by commit

  8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")

interacting with commit

  bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")

from the usb tree.

I have added the following merge fix patch (which may need more work):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 16 Mar 2020 14:34:31 +1100
Subject: [PATCH] usb: dwc3: fix up for role switch API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/usb/dwc3/drd.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index db68d48c2267..7db1ffc92bbd 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -478,9 +478,10 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
 
 #if IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
 #define ROLE_SWITCH 1
-static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
+static int dwc3_usb_role_switch_set(struct usb_role_switch *sw,
+				    enum usb_role role)
 {
-	struct dwc3 *dwc = dev_get_drvdata(dev);
+	struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
 	u32 mode;
 
 	switch (role) {
@@ -502,9 +503,9 @@ static int dwc3_usb_role_switch_set(struct device *dev, enum usb_role role)
 	return 0;
 }
 
-static enum usb_role dwc3_usb_role_switch_get(struct device *dev)
+static enum usb_role dwc3_usb_role_switch_get(struct usb_role_switch *sw)
 {
-	struct dwc3 *dwc = dev_get_drvdata(dev);
+	struct dwc3 *dwc = usb_role_switch_get_drvdata(sw);
 	unsigned long flags;
 	enum usb_role role;
 
@@ -550,6 +551,7 @@ static int dwc3_setup_role_switch(struct dwc3 *dwc)
 	dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
 	dwc3_role_switch.set = dwc3_usb_role_switch_set;
 	dwc3_role_switch.get = dwc3_usb_role_switch_get;
+	dwc3_role_switch.driver_data = dwc;
 	dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch);
 	if (IS_ERR(dwc->role_sw))
 		return PTR_ERR(dwc->role_sw);
-- 
2.25.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2015-05-29  8:32 Stephen Rothwell
@ 2015-05-29 15:19 ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2015-05-29 15:19 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Felipe Balbi, Pali Rohár, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3438 bytes --]

On Fri, May 29, 2015 at 06:32:13PM +1000, Stephen Rothwell wrote:
> Hi Felipe,
> 
> After merging the usb-gadget tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/module.h:17:0,
>                  from drivers/usb/gadget/legacy/nokia.c:19:
> drivers/usb/gadget/legacy/nokia.c: In function '__check_num_buffers':
> drivers/usb/gadget/function/f_mass_storage.h:51:34: error: 'fsg_num_buffers' undeclared (first use in this function)
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>                                   ^
> include/linux/moduleparam.h:387:68: note: in definition of macro '__param_check'
>   static inline type __always_unused *__check_##name(void) { return(p); }
>                                                                     ^
> include/linux/moduleparam.h:145:2: note: in expansion of macro 'param_check_uint'
>   param_check_##type(name, &(value));       \
>   ^
> drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>   ^
> drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
>  FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
>  ^
> drivers/usb/gadget/function/f_mass_storage.h:51:34: note: each undeclared identifier is reported only once for each function it appears in
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>                                   ^
> include/linux/moduleparam.h:387:68: note: in definition of macro '__param_check'
>   static inline type __always_unused *__check_##name(void) { return(p); }
>                                                                     ^
> include/linux/moduleparam.h:145:2: note: in expansion of macro 'param_check_uint'
>   param_check_##type(name, &(value));       \
>   ^
> drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>   ^
> drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
>  FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
>  ^
> drivers/usb/gadget/legacy/nokia.c: At top level:
> drivers/usb/gadget/function/f_mass_storage.h:51:34: error: 'fsg_num_buffers' undeclared here (not in a function)
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>                                   ^
> include/linux/moduleparam.h:224:22: note: in definition of macro '__module_param_call'
>       level, flags, { arg } }
>                       ^
> include/linux/moduleparam.h:146:2: note: in expansion of macro 'module_param_cb'
>   module_param_cb(name, &param_ops_##type, &value, perm);     \
>   ^
> drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
>   module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
>   ^
> drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
>  FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
>  ^
> 
> Caused by commit e4f8ef7b0770 ("usb: gadget: nokia: Add mass storage
> driver to g_nokia").
> 
> I have used the usb-gadget tree from next-20150528 for today.

I'll drop that patch, thanks

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build failure after merge of the usb-gadget tree
@ 2015-05-29  8:32 Stephen Rothwell
  2015-05-29 15:19 ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2015-05-29  8:32 UTC (permalink / raw)
  To: Felipe Balbi, Pali Rohár; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3279 bytes --]

Hi Felipe,

After merging the usb-gadget tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/module.h:17:0,
                 from drivers/usb/gadget/legacy/nokia.c:19:
drivers/usb/gadget/legacy/nokia.c: In function '__check_num_buffers':
drivers/usb/gadget/function/f_mass_storage.h:51:34: error: 'fsg_num_buffers' undeclared (first use in this function)
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
                                  ^
include/linux/moduleparam.h:387:68: note: in definition of macro '__param_check'
  static inline type __always_unused *__check_##name(void) { return(p); }
                                                                    ^
include/linux/moduleparam.h:145:2: note: in expansion of macro 'param_check_uint'
  param_check_##type(name, &(value));       \
  ^
drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
  ^
drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
 FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
 ^
drivers/usb/gadget/function/f_mass_storage.h:51:34: note: each undeclared identifier is reported only once for each function it appears in
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
                                  ^
include/linux/moduleparam.h:387:68: note: in definition of macro '__param_check'
  static inline type __always_unused *__check_##name(void) { return(p); }
                                                                    ^
include/linux/moduleparam.h:145:2: note: in expansion of macro 'param_check_uint'
  param_check_##type(name, &(value));       \
  ^
drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
  ^
drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
 FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
 ^
drivers/usb/gadget/legacy/nokia.c: At top level:
drivers/usb/gadget/function/f_mass_storage.h:51:34: error: 'fsg_num_buffers' undeclared here (not in a function)
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
                                  ^
include/linux/moduleparam.h:224:22: note: in definition of macro '__module_param_call'
      level, flags, { arg } }
                      ^
include/linux/moduleparam.h:146:2: note: in expansion of macro 'module_param_cb'
  module_param_cb(name, &param_ops_##type, &value, perm);     \
  ^
drivers/usb/gadget/function/f_mass_storage.h:51:2: note: in expansion of macro 'module_param_named'
  module_param_named(num_buffers, fsg_num_buffers, uint, S_IRUGO);\
  ^
drivers/usb/gadget/legacy/nokia.c:45:1: note: in expansion of macro 'FSG_MODULE_PARAMETERS'
 FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
 ^

Caused by commit e4f8ef7b0770 ("usb: gadget: nokia: Add mass storage
driver to g_nokia").

I have used the usb-gadget tree from next-20150528 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-17  5:08     ` Felipe Balbi
@ 2013-12-17  5:13       ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2013-12-17  5:13 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Stephen Rothwell, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

hi,

On Mon, Dec 16, 2013 at 11:08:22PM -0600, Felipe Balbi wrote:
> > > On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > > > 
> > > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > drivers/built-in.o: In function `otg_set_state':
> > > > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > > > 
> > > > CONFIG_USB is 'm' in this build.
> > > > 
> > > > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > > > Add OTG FSM configuration option")?
> > > > 
> > > > I have used the usb-gadget tree from next-20131206 for today.
> > > 
> > > I see what caused it, will fix it up with a patch which should probably
> > > be backported a few kernels back. Thanks for letting me know.
> > 
> > I am still getting this error ...
> 
> Fix is in Greg's queue, not sure if it has reached mainline, yet. Will
> check when I wake up.

just checked, it's not there. Pinged Greg.


-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-17  4:36   ` Stephen Rothwell
@ 2013-12-17  5:08     ` Felipe Balbi
  2013-12-17  5:13       ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2013-12-17  5:08 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: balbi, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On Tue, Dec 17, 2013 at 03:36:25PM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> On Sun, 8 Dec 2013 22:11:52 -0600 Felipe Balbi <balbi@ti.com> wrote:
> >
> > On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > > 
> > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > drivers/built-in.o: In function `otg_set_state':
> > > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > > 
> > > CONFIG_USB is 'm' in this build.
> > > 
> > > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > > Add OTG FSM configuration option")?
> > > 
> > > I have used the usb-gadget tree from next-20131206 for today.
> > 
> > I see what caused it, will fix it up with a patch which should probably
> > be backported a few kernels back. Thanks for letting me know.
> 
> I am still getting this error ...

Fix is in Greg's queue, not sure if it has reached mainline, yet. Will
check when I wake up.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09  4:11 ` Felipe Balbi
  2013-12-09 19:40   ` Felipe Balbi
@ 2013-12-17  4:36   ` Stephen Rothwell
  2013-12-17  5:08     ` Felipe Balbi
  1 sibling, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-17  4:36 UTC (permalink / raw)
  To: balbi; +Cc: linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

Hi Felipe,

On Sun, 8 Dec 2013 22:11:52 -0600 Felipe Balbi <balbi@ti.com> wrote:
>
> On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > 
> > After merging the usb-gadget tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/built-in.o: In function `otg_set_state':
> > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > 
> > CONFIG_USB is 'm' in this build.
> > 
> > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > Add OTG FSM configuration option")?
> > 
> > I have used the usb-gadget tree from next-20131206 for today.
> 
> I see what caused it, will fix it up with a patch which should probably
> be backported a few kernels back. Thanks for letting me know.

I am still getting this error ...
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09 21:01       ` Felipe Balbi
@ 2013-12-09 21:42         ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2013-12-09 21:42 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Stephen Rothwell, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

On Mon, Dec 09, 2013 at 03:01:01PM -0600, Felipe Balbi wrote:
> On Tue, Dec 10, 2013 at 07:43:30AM +1100, Stephen Rothwell wrote:
> > Hi Felipe,
> > 
> > On Mon, 9 Dec 2013 13:40:32 -0600 Felipe Balbi <balbi@ti.com> wrote:
> > >
> > > On Sun, Dec 08, 2013 at 10:11:52PM -0600, Felipe Balbi wrote:
> > > > On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > > > > 
> > > > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > > > allmodconfig) failed like this:
> > > > > 
> > > > > drivers/built-in.o: In function `otg_set_state':
> > > > > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > > > > 
> > > > > CONFIG_USB is 'm' in this build.
> > > > > 
> > > > > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > > > > Add OTG FSM configuration option")?
> > > > > 
> > > > > I have used the usb-gadget tree from next-20131206 for today.
> > > > 
> > > > I see what caused it, will fix it up with a patch which should probably
> > > > be backported a few kernels back. Thanks for letting me know.
> > > 
> > > Do you still have the .config which caused that build error ? I couldn't
> > > reproduce with CONFIG_USB=m && CONFIG_USB_OTG=y.
> > 
> > See above, it was just an x86_64 allmodconfig build.
> 
> cool, building that on my end.

patch sent to linux-usb.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09 20:43     ` Stephen Rothwell
@ 2013-12-09 21:01       ` Felipe Balbi
  2013-12-09 21:42         ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2013-12-09 21:01 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Felipe Balbi, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

On Tue, Dec 10, 2013 at 07:43:30AM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> On Mon, 9 Dec 2013 13:40:32 -0600 Felipe Balbi <balbi@ti.com> wrote:
> >
> > On Sun, Dec 08, 2013 at 10:11:52PM -0600, Felipe Balbi wrote:
> > > On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > > > 
> > > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > drivers/built-in.o: In function `otg_set_state':
> > > > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > > > 
> > > > CONFIG_USB is 'm' in this build.
> > > > 
> > > > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > > > Add OTG FSM configuration option")?
> > > > 
> > > > I have used the usb-gadget tree from next-20131206 for today.
> > > 
> > > I see what caused it, will fix it up with a patch which should probably
> > > be backported a few kernels back. Thanks for letting me know.
> > 
> > Do you still have the .config which caused that build error ? I couldn't
> > reproduce with CONFIG_USB=m && CONFIG_USB_OTG=y.
> 
> See above, it was just an x86_64 allmodconfig build.

cool, building that on my end.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09 19:40   ` Felipe Balbi
@ 2013-12-09 20:43     ` Stephen Rothwell
  2013-12-09 21:01       ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-09 20:43 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

Hi Felipe,

On Mon, 9 Dec 2013 13:40:32 -0600 Felipe Balbi <balbi@ti.com> wrote:
>
> On Sun, Dec 08, 2013 at 10:11:52PM -0600, Felipe Balbi wrote:
> > On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > > 
> > > After merging the usb-gadget tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > drivers/built-in.o: In function `otg_set_state':
> > > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > > 
> > > CONFIG_USB is 'm' in this build.
> > > 
> > > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > > Add OTG FSM configuration option")?
> > > 
> > > I have used the usb-gadget tree from next-20131206 for today.
> > 
> > I see what caused it, will fix it up with a patch which should probably
> > be backported a few kernels back. Thanks for letting me know.
> 
> Do you still have the .config which caused that build error ? I couldn't
> reproduce with CONFIG_USB=m && CONFIG_USB_OTG=y.

See above, it was just an x86_64 allmodconfig build.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09  4:11 ` Felipe Balbi
@ 2013-12-09 19:40   ` Felipe Balbi
  2013-12-09 20:43     ` Stephen Rothwell
  2013-12-17  4:36   ` Stephen Rothwell
  1 sibling, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2013-12-09 19:40 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Stephen Rothwell, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

Hi Stephen,

On Sun, Dec 08, 2013 at 10:11:52PM -0600, Felipe Balbi wrote:
> On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> > Hi Felipe,
> > 
> > After merging the usb-gadget tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/built-in.o: In function `otg_set_state':
> > (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> > 
> > CONFIG_USB is 'm' in this build.
> > 
> > I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> > Add OTG FSM configuration option")?
> > 
> > I have used the usb-gadget tree from next-20131206 for today.
> 
> I see what caused it, will fix it up with a patch which should probably
> be backported a few kernels back. Thanks for letting me know.

Do you still have the .config which caused that build error ? I couldn't
reproduce with CONFIG_USB=m && CONFIG_USB_OTG=y.

In any case, I believe this will help:

diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
index fed7f68..03cc86c 100644
--- a/drivers/usb/core/Kconfig
+++ b/drivers/usb/core/Kconfig
@@ -51,6 +51,7 @@ config USB_DYNAMIC_MINORS
 
 config USB_OTG
 	bool "OTG support"
+	depends on USB && USB_GADGET
 	depends on PM_RUNTIME
 	default n
 	help


It makes no sense to allow OTG without having both host and gadget
support.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-12-09  3:58 Stephen Rothwell
@ 2013-12-09  4:11 ` Felipe Balbi
  2013-12-09 19:40   ` Felipe Balbi
  2013-12-17  4:36   ` Stephen Rothwell
  0 siblings, 2 replies; 22+ messages in thread
From: Felipe Balbi @ 2013-12-09  4:11 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Felipe Balbi, linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

Hi,

On Mon, Dec 09, 2013 at 02:58:03PM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> After merging the usb-gadget tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/built-in.o: In function `otg_set_state':
> (.text+0x14f7de): undefined reference to `usb_bus_start_enum'
> 
> CONFIG_USB is 'm' in this build.
> 
> I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
> Add OTG FSM configuration option")?
> 
> I have used the usb-gadget tree from next-20131206 for today.

I see what caused it, will fix it up with a patch which should probably
be backported a few kernels back. Thanks for letting me know.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build failure after merge of the usb-gadget tree
@ 2013-12-09  3:58 Stephen Rothwell
  2013-12-09  4:11 ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-12-09  3:58 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-next, linux-kernel, Anton Tikhomirov

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

Hi Felipe,

After merging the usb-gadget tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/built-in.o: In function `otg_set_state':
(.text+0x14f7de): undefined reference to `usb_bus_start_enum'

CONFIG_USB is 'm' in this build.

I am not sure what changed to cause this, maybe e1d2e31975e1 ("usb: phy:
Add OTG FSM configuration option")?

I have used the usb-gadget tree from next-20131206 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: linux-next: build failure after merge of the usb-gadget tree
  2013-07-30  4:34 Stephen Rothwell
@ 2013-07-30  5:49 ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2013-07-30  5:49 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Felipe Balbi, linux-next, linux-kernel, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Hi,

On Tue, Jul 30, 2013 at 02:34:27PM +1000, Stephen Rothwell wrote:
> Hi Felipe,
> 
> After merging the usb-gadget tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> drivers/usb/phy/of.c:32:24: error: redefinition of 'of_usb_get_phy_mode'
>  enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
>                         ^
> In file included from drivers/usb/phy/of.c:13:0:
> include/linux/usb/of.h:33:38: note: previous definition of 'of_usb_get_phy_mode' was here
>  static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
>                                       ^
> 
> Caused by commit 052a11d13bde ("usb: phy: make PHY driver selection
> possible by controller drivers").  The static inline declaration in
> include/linux/usb/of.h is exposed if at least one of CONFIG_OF or
> CONFIG_USB_PHY is not set, but drivers/usb/phy/of.c is now built if
> CONFIG_OF and CONFIG_USB_SUPPORT is set (it used to require
> CONFIG_USB_PHY to be set - see drivers/usb/Makefile).  This build has
> CONFIG_OF set but CONFIG_USB_PHY not set.
> 
> I have used the usb-gadget tree from next-20130729 for today.

looks like I didn't get that in my randconfigs, I'll go fix that up

Thanks

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* linux-next: build failure after merge of the usb-gadget tree
@ 2013-07-30  4:34 Stephen Rothwell
  2013-07-30  5:49 ` Felipe Balbi
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2013-07-30  4:34 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-next, linux-kernel, Roger Quadros

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

Hi Felipe,

After merging the usb-gadget tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/usb/phy/of.c:32:24: error: redefinition of 'of_usb_get_phy_mode'
 enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
                        ^
In file included from drivers/usb/phy/of.c:13:0:
include/linux/usb/of.h:33:38: note: previous definition of 'of_usb_get_phy_mode' was here
 static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
                                      ^

Caused by commit 052a11d13bde ("usb: phy: make PHY driver selection
possible by controller drivers").  The static inline declaration in
include/linux/usb/of.h is exposed if at least one of CONFIG_OF or
CONFIG_USB_PHY is not set, but drivers/usb/phy/of.c is now built if
CONFIG_OF and CONFIG_USB_SUPPORT is set (it used to require
CONFIG_USB_PHY to be set - see drivers/usb/Makefile).  This build has
CONFIG_OF set but CONFIG_USB_PHY not set.

I have used the usb-gadget tree from next-20130729 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-03-16 19:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16  4:40 linux-next: build failure after merge of the usb-gadget tree Stephen Rothwell
2013-12-16 19:41 ` Felipe Balbi
2013-12-16 23:10   ` Stephen Rothwell
2013-12-16 23:38     ` Felipe Balbi
2013-12-17  4:27       ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-03-16  3:37 Stephen Rothwell
2020-03-16 17:42 ` John Stultz
2020-03-16 18:11   ` John Stultz
2020-03-16 19:46     ` Greg KH
2015-05-29  8:32 Stephen Rothwell
2015-05-29 15:19 ` Felipe Balbi
2013-12-09  3:58 Stephen Rothwell
2013-12-09  4:11 ` Felipe Balbi
2013-12-09 19:40   ` Felipe Balbi
2013-12-09 20:43     ` Stephen Rothwell
2013-12-09 21:01       ` Felipe Balbi
2013-12-09 21:42         ` Felipe Balbi
2013-12-17  4:36   ` Stephen Rothwell
2013-12-17  5:08     ` Felipe Balbi
2013-12-17  5:13       ` Felipe Balbi
2013-07-30  4:34 Stephen Rothwell
2013-07-30  5:49 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).