drivers/bluetooth/btintel_pcie.c | 2 -- 1 file changed, 2 deletions(-)
Remove the duplicate definition of BTINTEL_PCIE_MAGIC_NUM macro.
The macro is defined twice with the same value (0xA5A5A5A5) which
is redundant and should be cleaned up.
Fixes: b9465e6670a2 ("Bluetooth: btintel_pcie: Read hardware exception data")
Signed-off-by: Jun Zhan <zhanjun@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
------
PS: I don`t know why not show a gcc redefined warning or error?
------
---
drivers/bluetooth/btintel_pcie.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 6e7bbbd35279..758fbf3fb55a 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -65,8 +65,6 @@ struct btintel_pcie_dev_recovery {
#define BTINTEL_PCIE_SCP_HWEXP_SIZE 4096
#define BTINTEL_PCIE_SCP_HWEXP_DMP_ADDR 0xB030F800
-#define BTINTEL_PCIE_MAGIC_NUM 0xA5A5A5A5
-
#define BTINTEL_PCIE_TRIGGER_REASON_USER_TRIGGER 0x17A2
#define BTINTEL_PCIE_TRIGGER_REASON_FW_ASSERT 0x1E61
--
2.20.1
Dear Wentao, Thank you for your patch. Am 12.08.25 um 14:43 schrieb Wentao Guan: > Remove the duplicate definition of BTINTEL_PCIE_MAGIC_NUM macro. > The macro is defined twice with the same value (0xA5A5A5A5) which > is redundant and should be cleaned up. > > Fixes: b9465e6670a2 ("Bluetooth: btintel_pcie: Read hardware exception data") > Signed-off-by: Jun Zhan <zhanjun@uniontech.com> > Signed-off-by: Wentao Guan <guanwentao@uniontech.com> > > ------ > PS: I don`t know why not show a gcc redefined warning or error? Macros are processed by the preprocessor, and are no variables. But maybe I am wrong. > ------ > --- > drivers/bluetooth/btintel_pcie.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c > index 6e7bbbd35279..758fbf3fb55a 100644 > --- a/drivers/bluetooth/btintel_pcie.c > +++ b/drivers/bluetooth/btintel_pcie.c > @@ -65,8 +65,6 @@ struct btintel_pcie_dev_recovery { > #define BTINTEL_PCIE_SCP_HWEXP_SIZE 4096 > #define BTINTEL_PCIE_SCP_HWEXP_DMP_ADDR 0xB030F800 > > -#define BTINTEL_PCIE_MAGIC_NUM 0xA5A5A5A5 > - > #define BTINTEL_PCIE_TRIGGER_REASON_USER_TRIGGER 0x17A2 > #define BTINTEL_PCIE_TRIGGER_REASON_FW_ASSERT 0x1E61 > Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Kind regards, Paul
Dear Paul, Thanks for you review, > > PS: I don`t know why not show a gcc redefined warning or error? > > Macros are processed by the preprocessor, and are no variables. But > maybe I am wrong. Right, "If a macro is redefined with a definition that is not effectively the same as the old one, the preprocessor issues a warning and changes the macro to use the new definition. " From GCC docs: https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html Best Regards Wentao Guan
© 2016 - 2025 Red Hat, Inc.