rtl8150: Check if RSR is already defined
Subsystems (4)
PATCH 1/1 rtl8150: Check if RSR is already defined
I am getting the following warn
drivers/net/usb/rtl8150.c:30:0: warning: "RSR" redefined arch/xtensa/include/asm/processor.h:189:0: note: this is the location of the previous definition
I wanted to remove RSR as it is not being used but it is not clear if being used for documenting purpose. undefining should be enough.
--- drivers/net/usb/rtl8150.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/usb/rtl8150.c +4 -0
@@ -21,6 +21,10 @@#define DRIVER_AUTHOR "Petko Manolov <[email protected]>"#define DRIVER_DESC "rtl8150 based usb-ethernet driver" +#ifdef RSR +#undef RSR +#endif +#define IDR 0x0120#define MAR 0x0126#define CR 0x012e
Signature · 1 line
2.0.1
David Miller
maintainerFrom: Nick Krause <[email protected]>
Date: Thu, 7 Aug 2014 07:24:54 +0200
Quoted 9 lines
I am getting the following warn
drivers/net/usb/rtl8150.c:30:0: warning: "RSR" redefinedarch/xtensa/include/asm/processor.h:189:0: note: this is the location of the previous definitionI wanted to remove RSR as it is not being used but it is not clear if being used for documenting purpose. undefining should be enough.
Signed-off-by Nick Krause <[email protected]>
This isn't the right way to fix this.
Rather, the thing to do is to give the macros in this driver an appropriate prefix such as "RTL8150_" so that they don't collide with things in the global namespace.