2022-02-14 03:27:51

by Yevhen Orlov

[permalink] [raw]
Subject: [PATCH net-next] net: marvell: prestera: Fix includes

Include prestera.h in prestera_hw.h, because it may contain common
definitions.

Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices")
Signed-off-by: Yevhen Orlov <[email protected]>
---
drivers/net/ethernet/marvell/prestera/prestera_hw.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.h b/drivers/net/ethernet/marvell/prestera/prestera_hw.h
index 3ff12bae5909..24f2cf1c875f 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_hw.h
+++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.h
@@ -5,6 +5,7 @@
#define _PRESTERA_HW_H_

#include <linux/types.h>
+#include "prestera.h"
#include "prestera_acl.h"

enum prestera_accept_frm_type {
--
2.17.1


2022-02-15 05:40:33

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next] net: marvell: prestera: Fix includes

On Mon, 14 Feb 2022 03:12:28 +0200 Yevhen Orlov wrote:
> Include prestera.h in prestera_hw.h, because it may contain common
> definitions.

*May*? Is prestera_hw.h using definitions from prestera.h today?
Dependencies between header files are best avoided completely.

2022-02-16 07:36:10

by Yevhen Orlov

[permalink] [raw]
Subject: Re: [PATCH net-next] net: marvell: prestera: Fix includes

On Mon, Feb 14, 2022 at 09:17:43PM -0800, Jakub Kicinski wrote:
> *May*? Is prestera_hw.h using definitions from prestera.h today?
> Dependencies between header files are best avoided completely.

Make sense. Thank you for review.
I will try to avoid such dependencies in the future.
This patch could be abandoned.