Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkpatch generates incorrect warning for __DEPRECATED_MACRO #16674

Closed
mnkp opened this issue Jun 7, 2019 · 1 comment
Closed

Checkpatch generates incorrect warning for __DEPRECATED_MACRO #16674

mnkp opened this issue Jun 7, 2019 · 1 comment
Labels
area: Build System Enhancement Changes/Updates/Additions to existing features

Comments

@mnkp
Copy link
Member

mnkp commented Jun 7, 2019

Bug descritpion
When trying to deprecate a macro using __DEPRECATED_MACRO e.g.

#define GPIO_PUD_NORMAL        __DEPRECATED_MACRO 0

checkpatch generates the following warning

-:1067: WARNING:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1067: FILE: include/gpio.h:274:
+#define GPIO_PUD_NORMAL        __DEPRECATED_MACRO 0

even if __DEPRECATED_MACRO is used correctly.

To Reproduce
Steps to reproduce the behavior:

  1. modify source code by adding
    #define GPIO_PUD_NORMAL __DEPRECATED_MACRO 0
  2. commit changes using git.

Expected behavior
No warning.

Environment:

  • OS: Linux
  • Zephyr version 1.14
@mnkp mnkp added the bug The issue is a bug, or the PR is fixing a bug label Jun 7, 2019
@carlescufi carlescufi added Enhancement Changes/Updates/Additions to existing features area: Build System and removed bug The issue is a bug, or the PR is fixing a bug labels Jun 7, 2019
@gmarull
Copy link
Member

gmarull commented Aug 11, 2022

We currently ignore COMPLEX_MACRO, so this no longer applies.

@gmarull gmarull closed this as completed Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants