diff mbox series

[v1,net-next,2/2] net: mscc: ocelot: add missed parentheses around macro argument

Message ID 20220430232327.4091825-3-colin.foster@in-advantage.com (mailing list archive)
State Accepted
Commit 8c5b07da9bc8c056a3ddca00b4e268358f643343
Delegated to: Netdev Maintainers
Headers show
Series ocelot stats improvement | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Colin Foster April 30, 2022, 11:23 p.m. UTC
Commit 2f187bfa6f35 ("net: ethernet: ocelot: remove the need for num_stats
initializer") added a macro that patchwork warned it lacked parentheses
around an argument. Correct this mistake.

Fixes: 2f187bfa6f35 ("net: ethernet: ocelot: remove the need for num_stats initializer")
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 include/soc/mscc/ocelot.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vladimir Oltean May 1, 2022, 11:08 a.m. UTC | #1
On Sat, Apr 30, 2022 at 04:23:27PM -0700, Colin Foster wrote:
> Commit 2f187bfa6f35 ("net: ethernet: ocelot: remove the need for num_stats
> initializer") added a macro that patchwork warned it lacked parentheses
> around an argument. Correct this mistake.
> 
> Fixes: 2f187bfa6f35 ("net: ethernet: ocelot: remove the need for num_stats initializer")
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
diff mbox series

Patch

diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 75739766244b..8d8d46778f7e 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -106,7 +106,7 @@ 
 #define REG_RESERVED(reg)		REG(reg, REG_RESERVED_ADDR)
 
 #define for_each_stat(ocelot, stat)				\
-	for ((stat) = ocelot->stats_layout;			\
+	for ((stat) = (ocelot)->stats_layout;			\
 	     ((stat)->name[0] != '\0');				\
 	     (stat)++)