Re: [PATCH v3 1/1] dev-core: fix build break when DEBUG is enabled

From: Greg KH
Date: Wed Aug 28 2013 - 13:53:49 EST


On Wed, Aug 28, 2013 at 10:50:31AM -0700, Sarah Sharp wrote:
> Any objections to queuing this patch through Greg's usb-next tree? I've
> already sent the 2/2 patch, which will cause build breakage without this
> patch.
>
> Changes since v2:
> - Fixed a checkpatch warning caused by a comment in a macro.
>
> Sarah Sharp
>
> >8----------------------------------------------------------------8<
>
> From: Dmitry Kasatkin <d.kasatkin@xxxxxxxxxxx>
>
> When DEBUG is defined, dev_dbg_ratelimited uses dynamic debug data
> structures even when CONFIG_DYNAMIC_DEBUG is not defined.
> It leads to build break.
> For example, when I try to use dev_dbg_ratelimited in USB code and
> CONFIG_USB_DEBUG is enabled, but CONFIG_DYNAMIC_DEBUG is not, I get:
>
> CC [M] drivers/usb/host/xhci-ring.o
> drivers/usb/host/xhci-ring.c: In function âxhci_queue_intr_txâ:
> drivers/usb/host/xhci-ring.c:3059:3: error: implicit declaration of function âDEFINE_DYNAMIC_DEBUG_METADATAâ [-Werror=implicit-function-declaration]
> drivers/usb/host/xhci-ring.c:3059:3: error: âdescriptorâ undeclared (first use in this function)
> drivers/usb/host/xhci-ring.c:3059:3: note: each undeclared identifier is reported only once for each function it appears in
> drivers/usb/host/xhci-ring.c:3059:3: error: implicit declaration of function â__dynamic_pr_debugâ [-Werror=implicit-function-declaration]
> drivers/usb/host/xhci-ring.c: In function âxhci_queue_isoc_tx_prepareâ:
> drivers/usb/host/xhci-ring.c:3847:3: error: âdescriptorâ undeclared (first use in this function)
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/usb/host/xhci-ring.o] Error 1
> make[1]: *** [drivers/usb/host] Error 2
> make: *** [drivers/usb/] Error 2
>
> This patch separates definition for CONFIG_DYNAMIC_DEBUG and DEBUG cases.
>
> [Note, Sarah moved the comment above the macro to avoid checkpatch
> warnings.]
>
> Signed-off-by: Dmitry Kasatkin <d.kasatkin@xxxxxxxxxxx>
> Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/