All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next v2] usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set
@ 2021-05-21  2:10 Wei Yongjun
  2021-05-21  7:12 ` Loic Poulain
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-05-21  2:10 UTC (permalink / raw)
  To: weiyongjun1, Greg Kroah-Hartman, Tetsuo Handa, Oliver Neukum,
	Lee Jones, Loic Poulain
  Cc: linux-usb, kernel-janitors, Hulk Robot

Gcc report build error as following when CONFIG_WWAN_CORE is not set:

x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_disconnect':
cdc-wdm.c:(.text+0xb2a): undefined reference to `wwan_remove_port'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_in_callback':
cdc-wdm.c:(.text+0xf23): undefined reference to `wwan_port_rx'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_stop':
cdc-wdm.c:(.text+0x127d): undefined reference to `wwan_port_get_drvdata'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx':
cdc-wdm.c:(.text+0x12d9): undefined reference to `wwan_port_get_drvdata'
x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x13c1): undefined reference to `wwan_port_txoff'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_start':
cdc-wdm.c:(.text+0x13e0): undefined reference to `wwan_port_get_drvdata'
x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x1431): undefined reference to `wwan_port_txon'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx_complete':
cdc-wdm.c:(.text+0x14a4): undefined reference to `wwan_port_txon'
x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_create.cold':
cdc-wdm.c:(.text.unlikely+0x209): undefined reference to `wwan_create_port'

Using CONFIG_WWAN_CORE instead of CONFIG_WWAN to avoid build error.

Fixes: cac6fb015f71 ("usb: class: cdc-wdm: WWAN framework integration")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/usb/class/cdc-wdm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 8e5490ac13a2..db135a7fd857 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -824,7 +824,7 @@ static struct usb_class_driver wdm_class = {
 };
 
 /* --- WWAN framework integration --- */
-#ifdef CONFIG_WWAN
+#ifdef CONFIG_WWAN_CORE
 static int wdm_wwan_port_start(struct wwan_port *port)
 {
 	struct wdm_device *desc = wwan_port_get_drvdata(port);
@@ -963,11 +963,11 @@ static void wdm_wwan_rx(struct wdm_device *desc, int length)
 	/* inbuf has been copied, it is safe to check for outstanding data */
 	schedule_work(&desc->service_outs_intr);
 }
-#else /* CONFIG_WWAN */
+#else /* CONFIG_WWAN_CORE */
 static void wdm_wwan_init(struct wdm_device *desc) {}
 static void wdm_wwan_deinit(struct wdm_device *desc) {}
 static void wdm_wwan_rx(struct wdm_device *desc, int length) {}
-#endif /* CONFIG_WWAN */
+#endif /* CONFIG_WWAN_CORE */
 
 /* --- error handling --- */
 static void wdm_rxwork(struct work_struct *work)


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

* Re: [PATCH -next v2] usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set
  2021-05-21  2:10 [PATCH -next v2] usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set Wei Yongjun
@ 2021-05-21  7:12 ` Loic Poulain
  0 siblings, 0 replies; 2+ messages in thread
From: Loic Poulain @ 2021-05-21  7:12 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Greg Kroah-Hartman, Tetsuo Handa, Oliver Neukum, Lee Jones, USB,
	kernel-janitors, Hulk Robot

On Fri, 21 May 2021 at 04:01, Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> Gcc report build error as following when CONFIG_WWAN_CORE is not set:
>
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_disconnect':
> cdc-wdm.c:(.text+0xb2a): undefined reference to `wwan_remove_port'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_in_callback':
> cdc-wdm.c:(.text+0xf23): undefined reference to `wwan_port_rx'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_stop':
> cdc-wdm.c:(.text+0x127d): undefined reference to `wwan_port_get_drvdata'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx':
> cdc-wdm.c:(.text+0x12d9): undefined reference to `wwan_port_get_drvdata'
> x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x13c1): undefined reference to `wwan_port_txoff'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_start':
> cdc-wdm.c:(.text+0x13e0): undefined reference to `wwan_port_get_drvdata'
> x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x1431): undefined reference to `wwan_port_txon'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx_complete':
> cdc-wdm.c:(.text+0x14a4): undefined reference to `wwan_port_txon'
> x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_create.cold':
> cdc-wdm.c:(.text.unlikely+0x209): undefined reference to `wwan_create_port'
>
> Using CONFIG_WWAN_CORE instead of CONFIG_WWAN to avoid build error.
>
> Fixes: cac6fb015f71 ("usb: class: cdc-wdm: WWAN framework integration")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>

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

end of thread, other threads:[~2021-05-21  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  2:10 [PATCH -next v2] usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set Wei Yongjun
2021-05-21  7:12 ` Loic Poulain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.