All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
@ 2022-09-02  3:06 Jakub Kicinski
  2022-09-02  6:01 ` Stefan Schmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2022-09-02  3:06 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, leon, sudipm.mukherjee, Gal Pressman,
	Jakub Kicinski, alex.aring, stefan, paul, linux-wpan

From: Gal Pressman <gal@nvidia.com>

When CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled,
NL802154_CMD_DEL_SEC_LEVEL is undefined and results in a compilation
error:
net/ieee802154/nl802154.c:2503:19: error: 'NL802154_CMD_DEL_SEC_LEVEL' undeclared here (not in a function); did you mean 'NL802154_CMD_SET_CCA_ED_LEVEL'?
 2503 |  .resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                   NL802154_CMD_SET_CCA_ED_LEVEL

Unhide the experimental commands, having them defined in an enum
makes no difference.

Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
v1: /tmp/0001-net-ieee802154-Fix-compilation-error-when-CONFIG_IEE.patch
v2: unhide instead of changing the define used

CC: alex.aring@gmail.com
CC: stefan@datenfreihafen.org
CC: paul@paul-moore.com
CC: linux-wpan@vger.kernel.org
---
 include/net/nl802154.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/net/nl802154.h b/include/net/nl802154.h
index 145acb8f2509..f5850b569c52 100644
--- a/include/net/nl802154.h
+++ b/include/net/nl802154.h
@@ -58,9 +58,6 @@ enum nl802154_commands {
 
 	NL802154_CMD_SET_WPAN_PHY_NETNS,
 
-	/* add new commands above here */
-
-#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
 	NL802154_CMD_SET_SEC_PARAMS,
 	NL802154_CMD_GET_SEC_KEY,		/* can dump */
 	NL802154_CMD_NEW_SEC_KEY,
@@ -74,7 +71,8 @@ enum nl802154_commands {
 	NL802154_CMD_GET_SEC_LEVEL,		/* can dump */
 	NL802154_CMD_NEW_SEC_LEVEL,
 	NL802154_CMD_DEL_SEC_LEVEL,
-#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
+
+	/* add new commands above here */
 
 	/* used to define NL802154_CMD_MAX below */
 	__NL802154_CMD_AFTER_LAST,
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
  2022-09-02  3:06 [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled Jakub Kicinski
@ 2022-09-02  6:01 ` Stefan Schmidt
  2022-09-02  8:18 ` Sudip Mukherjee
  2022-09-03  4:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Schmidt @ 2022-09-02  6:01 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: netdev, edumazet, pabeni, leon, sudipm.mukherjee, Gal Pressman,
	alex.aring, paul, linux-wpan


Hello Jabkub.

On 02.09.22 05:06, Jakub Kicinski wrote:
> From: Gal Pressman <gal@nvidia.com>
> 
> When CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled,
> NL802154_CMD_DEL_SEC_LEVEL is undefined and results in a compilation
> error:
> net/ieee802154/nl802154.c:2503:19: error: 'NL802154_CMD_DEL_SEC_LEVEL' undeclared here (not in a function); did you mean 'NL802154_CMD_SET_CCA_ED_LEVEL'?
>   2503 |  .resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
>        |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
>        |                   NL802154_CMD_SET_CCA_ED_LEVEL
> 
> Unhide the experimental commands, having them defined in an enum
> makes no difference.
> 
> Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> v1: /tmp/0001-net-ieee802154-Fix-compilation-error-when-CONFIG_IEE.patch
> v2: unhide instead of changing the define used
> 
> CC: alex.aring@gmail.com
> CC: stefan@datenfreihafen.org
> CC: paul@paul-moore.com
> CC: linux-wpan@vger.kernel.org
> ---
>   include/net/nl802154.h | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/include/net/nl802154.h b/include/net/nl802154.h
> index 145acb8f2509..f5850b569c52 100644
> --- a/include/net/nl802154.h
> +++ b/include/net/nl802154.h
> @@ -58,9 +58,6 @@ enum nl802154_commands {
>   
>   	NL802154_CMD_SET_WPAN_PHY_NETNS,
>   
> -	/* add new commands above here */
> -
> -#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
>   	NL802154_CMD_SET_SEC_PARAMS,
>   	NL802154_CMD_GET_SEC_KEY,		/* can dump */
>   	NL802154_CMD_NEW_SEC_KEY,
> @@ -74,7 +71,8 @@ enum nl802154_commands {
>   	NL802154_CMD_GET_SEC_LEVEL,		/* can dump */
>   	NL802154_CMD_NEW_SEC_LEVEL,
>   	NL802154_CMD_DEL_SEC_LEVEL,
> -#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
> +
> +	/* add new commands above here */
>   
>   	/* used to define NL802154_CMD_MAX below */
>   	__NL802154_CMD_AFTER_LAST,


Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

Thanks for handling this! I will simply ack it as I assume you will take 
it directly instead of me taking it through my tree and adding delays.

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
  2022-09-02  3:06 [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled Jakub Kicinski
  2022-09-02  6:01 ` Stefan Schmidt
@ 2022-09-02  8:18 ` Sudip Mukherjee
  2022-09-03  4:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2022-09-02  8:18 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David S. Miller, netdev, Eric Dumazet, Paolo Abeni,
	Leon Romanovsky, Gal Pressman, Alexander Aring, Stefan Schmidt,
	paul, linux-wpan

On Fri, Sep 2, 2022 at 4:06 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> From: Gal Pressman <gal@nvidia.com>
>
> When CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled,
> NL802154_CMD_DEL_SEC_LEVEL is undefined and results in a compilation
> error:
> net/ieee802154/nl802154.c:2503:19: error: 'NL802154_CMD_DEL_SEC_LEVEL' undeclared here (not in a function); did you mean 'NL802154_CMD_SET_CCA_ED_LEVEL'?
>  2503 |  .resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                   NL802154_CMD_SET_CCA_ED_LEVEL
>
> Unhide the experimental commands, having them defined in an enum
> makes no difference.
>
> Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Fixes the build for me.

Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>


-- 
Regards
Sudip

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
  2022-09-02  3:06 [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled Jakub Kicinski
  2022-09-02  6:01 ` Stefan Schmidt
  2022-09-02  8:18 ` Sudip Mukherjee
@ 2022-09-03  4:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-03  4:20 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, leon, sudipm.mukherjee, gal,
	alex.aring, stefan, paul, linux-wpan

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  1 Sep 2022 20:06:20 -0700 you wrote:
> From: Gal Pressman <gal@nvidia.com>
> 
> When CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled,
> NL802154_CMD_DEL_SEC_LEVEL is undefined and results in a compilation
> error:
> net/ieee802154/nl802154.c:2503:19: error: 'NL802154_CMD_DEL_SEC_LEVEL' undeclared here (not in a function); did you mean 'NL802154_CMD_SET_CCA_ED_LEVEL'?
>  2503 |  .resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                   NL802154_CMD_SET_CCA_ED_LEVEL
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
    https://git.kernel.org/netdev/net-next/c/8254393663f9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-03  4:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  3:06 [PATCH net-next v2] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled Jakub Kicinski
2022-09-02  6:01 ` Stefan Schmidt
2022-09-02  8:18 ` Sudip Mukherjee
2022-09-03  4:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.