Re: linux-next: build warnings after merge of the uuid tree

From: Andy Shevchenko
Date: Mon Jun 05 2017 - 10:40:30 EST


On Mon, 2017-06-05 at 16:09 +1000, Stephen Rothwell wrote:
> Hi Christoph,
>
> After merging the uuid tree, today's linux-next build (arm
> multi_v7_defconfig and x86_64 allmodconfig) produced these warnings:
>

Briefly looking to the conflict it looks like we first need to rename
register description(s) in dwc2 in the way how it's done in dwc3.

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 1b6612c2cdda..82f92443f26f 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -636,7 +636,7 @@ void dwc2_dump_global_registers(struct dwc2_hsotg
*hsotg)
 addr = hsotg->regs + GGPIO;
 dev_dbg(hsotg->dev, "GGPIO Â@0x%08lX : 0x%08X\n",
 (unsigned long)addr, dwc2_readl(addr));
- addr = hsotg->regs + GUID;
+ addr = hsotg->regs + DWC2_GUID;
 dev_dbg(hsotg->dev, "GUID Â@0x%08lX : 0x%08X\n",
 (unsigned long)addr, dwc2_readl(addr));
 addr = hsotg->regs + GSNPSID;
diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c
index 794b959a7c8c..c51ee70904e6 100644
--- a/drivers/usb/dwc2/debugfs.c
+++ b/drivers/usb/dwc2/debugfs.c
@@ -419,7 +419,7 @@ static const struct debugfs_reg32 dwc2_regs[] = {
 dump_register(GI2CCTL),
 dump_register(GPVNDCTL),
 dump_register(GGPIO),
- dump_register(GUID),
+ dump_register(DWC2_GUID),
 dump_register(GSNPSID),
 dump_register(GHWCFG1),
 dump_register(GHWCFG2),
diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h
index 4592012c4743..ccfb6a55616b 100644
--- a/drivers/usb/dwc2/hw.h
+++ b/drivers/usb/dwc2/hw.h
@@ -227,7 +227,7 @@
Â#define GGPIO HSOTG_REG(0x0038)
Â#define GGPIO_STM32_OTG_GCCFG_PWRDWN BIT(16)
Â
-#define GUID HSOTG_REG(0x003c)
+#define DWC2_GUID HSOTG_REG(0x003c)
Â#define GSNPSID HSOTG_REG(0x0040)
Â#define GHWCFG1 HSOTG_REG(0x0044)
Â

> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/core_intr.c:53:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/dma-mapping.h:6,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/core_intr.c:45:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/core.c:56:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/dma-mapping.h:6,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/core.c:47:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/platform.c:52:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/platform.c:41:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/params.c:39:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/node.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/cpu.h:16,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/of_device.h:4,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/params.c:37:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd.c:55:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/platform_device.h:14,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd.c:45:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_intr.c:52:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/dma-mapping.h:6,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_intr.c:44:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_queue.c:54:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/dma-mapping.h:6,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_queue.c:46:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_ddma.c:52:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/dma-mapping.h:6,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/hcd_ddma.c:44:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/debugfs.c:22:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/debugfs.h:18,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/debugfs.c:18:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
> In file included from drivers/usb/dwc2/core.h:45:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/gadget.c:34:
> drivers/usb/dwc2/hw.h:230:0: warning: "GUID" redefined
> Â#define GUIDÂÂÂÂHSOTG_REG(0x003c)
> Â^
> In file included from include/linux/uuid.h:19:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/fs.h:33,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/seq_file.h:10,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/consumer.h:17,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/pinctrl/devinfo.h:21,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/device.h:24,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom include/linux/platform_device.h:14,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/dwc2/gadget.c:21:
> include/uapi/linux/uuid.h:27:0: note: this is the location of the
> previous definition
> Â#define GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)ÂÂÂ\
> Â^
>
> Introduced by commit
>
> Â e0a74cd0a2d4 ("uuid: rename uuid types")
>
> GUID is used in at least 2 other files as well :-(
>

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy