[PATCH net-next 2/3] idpf: make virtchnl2.h self-contained

Alexander Lobakin posted 3 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH net-next 2/3] idpf: make virtchnl2.h self-contained
Posted by Alexander Lobakin 1 year, 10 months ago
To ease maintaining of virtchnl2.h, which already is messy enough,
make it self-contained by adding missing if_ether.h include due to
%ETH_ALEN usage.
At the same time, virtchnl2_lan_desc.h is not used anywhere in the
file, so remove this include to speed up C preprocessing.

Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
---
 drivers/net/ethernet/intel/idpf/virtchnl2.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h
index 4a3c4454d25a..29419211b3d9 100644
--- a/drivers/net/ethernet/intel/idpf/virtchnl2.h
+++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h
@@ -4,6 +4,8 @@
 #ifndef _VIRTCHNL2_H_
 #define _VIRTCHNL2_H_
 
+#include <linux/if_ether.h>
+
 /* All opcodes associated with virtchnl2 are prefixed with virtchnl2 or
  * VIRTCHNL2. Any future opcodes, offloads/capabilities, structures,
  * and defines must be prefixed with virtchnl2 or VIRTCHNL2 to avoid confusion.
@@ -17,8 +19,6 @@
  * must remain unchanged over time, so we specify explicit values for all enums.
  */
 
-#include "virtchnl2_lan_desc.h"
-
 /* This macro is used to generate compilation errors if a structure
  * is not exactly the correct length.
  */
-- 
2.44.0
Re: [PATCH net-next 2/3] idpf: make virtchnl2.h self-contained
Posted by Jakub Kicinski 1 year, 10 months ago
On Tue, 26 Mar 2024 17:41:15 +0100 Alexander Lobakin wrote:
> To ease maintaining of virtchnl2.h, which already is messy enough,
> make it self-contained by adding missing if_ether.h include due to
> %ETH_ALEN usage.
> At the same time, virtchnl2_lan_desc.h is not used anywhere in the
> file, so remove this include to speed up C preprocessing.

Breaks allmodconfig, it seems..
-- 
pw-bot: cr
Re: [Intel-wired-lan] [PATCH net-next 2/3] idpf: make virtchnl2.h self-contained
Posted by Alexander Lobakin 1 year, 10 months ago
From: Jakub Kicinski <kuba@kernel.org>
Date: Tue, 26 Mar 2024 21:04:12 -0700

> On Tue, 26 Mar 2024 17:41:15 +0100 Alexander Lobakin wrote:
>> To ease maintaining of virtchnl2.h, which already is messy enough,
>> make it self-contained by adding missing if_ether.h include due to
>> %ETH_ALEN usage.
>> At the same time, virtchnl2_lan_desc.h is not used anywhere in the
>> file, so remove this include to speed up C preprocessing.
> 
> Breaks allmodconfig, it seems..

Oops, forgot one line and my night CI didn't notice anything...
Sending v2.

Thanks,
Olek
Re: [PATCH net-next 2/3] idpf: make virtchnl2.h self-contained
Posted by Gustavo A. R. Silva 1 year, 10 months ago

On 3/26/24 10:41, Alexander Lobakin wrote:
> To ease maintaining of virtchnl2.h, which already is messy enough,
> make it self-contained by adding missing if_ether.h include due to
> %ETH_ALEN usage.
> At the same time, virtchnl2_lan_desc.h is not used anywhere in the
> file, so remove this include to speed up C preprocessing.
> 
> Acked-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>

Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Thanks
-- 
Gustavo

> ---
>   drivers/net/ethernet/intel/idpf/virtchnl2.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h
> index 4a3c4454d25a..29419211b3d9 100644
> --- a/drivers/net/ethernet/intel/idpf/virtchnl2.h
> +++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h
> @@ -4,6 +4,8 @@
>   #ifndef _VIRTCHNL2_H_
>   #define _VIRTCHNL2_H_
>   
> +#include <linux/if_ether.h>
> +
>   /* All opcodes associated with virtchnl2 are prefixed with virtchnl2 or
>    * VIRTCHNL2. Any future opcodes, offloads/capabilities, structures,
>    * and defines must be prefixed with virtchnl2 or VIRTCHNL2 to avoid confusion.
> @@ -17,8 +19,6 @@
>    * must remain unchanged over time, so we specify explicit values for all enums.
>    */
>   
> -#include "virtchnl2_lan_desc.h"
> -
>   /* This macro is used to generate compilation errors if a structure
>    * is not exactly the correct length.
>    */