Re: [PATCH net-next v2 1/6] bnxt_en: Move common definitions to include/linux/bnxt/
From: Pavan Chebbi <pavan.chebbi@broadcom.com>
Date: 2025-09-23 17:17:10
. On Tue, Sep 23, 2025 at 10:03 PM Saeed Mahameed [off-list ref] wrote:
quoted
diff --git a/include/linux/bnxt/common.h b/include/linux/bnxt/common.h new file mode 100644 index 000000000000..2ee75a0a1feb --- /dev/null +++ b/include/linux/bnxt/common.h@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (c) 2025, Broadcom Corporation + * + */ + +#ifndef BNXT_COMN_H +#define BNXT_COMN_H + +#include <linux/bnxt/hsi.h> +#include <linux/bnxt/ulp.h> +#include <linux/auxiliary_bus.h> + +struct bnxt_aux_priv { + struct auxiliary_device aux_dev; + struct bnxt_en_dev *edev; + int id; +}; +This file is redundant since ulp.h already holds every thing "aux", so this struct belongs there. Also the only place you include this is file: drivers/net/ethernet/broadcom/bnxt/bnxt.h
Hi Saeed, later bnxt fwctl will include it as well. You could say it can still be inside ulp.h but fwctl is only going to need bnxt_aux_priv. So I carved it out of earlier bnxt.h.
So I am not sure if you have your include paths properly setup to avoid cross subsystem includes, in-case this was the point of this patch :).quoted
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h b/include/linux/bnxt/ulp.h similarity index 100% rename from drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h rename to include/linux/bnxt/ulp.h --2.39.1