There are no external users of the vsc7514_*_regmap[] symbols. They were
exported in commit 32ecd22ba60b ("net: mscc: ocelot: split register
definitions to a separate file") with the intention of being used, but the
actual structure used in commit 2efaca411c96 ("net: mscc: ocelot: expose
vsc7514_regmap definition") ended up being all that was needed.
Bury these unnecessary symbols.
Signed-off-by: Colin Foster <[email protected]>
Suggested-by: Vladimir Oltean <[email protected]>
---
drivers/net/ethernet/mscc/vsc7514_regs.c | 24 ++++++++----------------
include/soc/mscc/vsc7514_regs.h | 9 ---------
2 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ethernet/mscc/vsc7514_regs.c b/drivers/net/ethernet/mscc/vsc7514_regs.c
index da0c0dcc8f81..9938f04aeefc 100644
--- a/drivers/net/ethernet/mscc/vsc7514_regs.c
+++ b/drivers/net/ethernet/mscc/vsc7514_regs.c
@@ -68,7 +68,7 @@ const struct reg_field vsc7514_regfields[REGFIELD_MAX] = {
};
EXPORT_SYMBOL(vsc7514_regfields);
-const u32 vsc7514_ana_regmap[] = {
+static const u32 vsc7514_ana_regmap[] = {
REG(ANA_ADVLEARN, 0x009000),
REG(ANA_VLANMASK, 0x009004),
REG(ANA_PORT_B_DOMAIN, 0x009008),
@@ -148,9 +148,8 @@ const u32 vsc7514_ana_regmap[] = {
REG(ANA_POL_HYST, 0x008bec),
REG(ANA_POL_MISC_CFG, 0x008bf0),
};
-EXPORT_SYMBOL(vsc7514_ana_regmap);
-const u32 vsc7514_qs_regmap[] = {
+static const u32 vsc7514_qs_regmap[] = {
REG(QS_XTR_GRP_CFG, 0x000000),
REG(QS_XTR_RD, 0x000008),
REG(QS_XTR_FRM_PRUNING, 0x000010),
@@ -164,9 +163,8 @@ const u32 vsc7514_qs_regmap[] = {
REG(QS_INJ_ERR, 0x000040),
REG(QS_INH_DBG, 0x000048),
};
-EXPORT_SYMBOL(vsc7514_qs_regmap);
-const u32 vsc7514_qsys_regmap[] = {
+static const u32 vsc7514_qsys_regmap[] = {
REG(QSYS_PORT_MODE, 0x011200),
REG(QSYS_SWITCH_PORT_MODE, 0x011234),
REG(QSYS_STAT_CNT_CFG, 0x011264),
@@ -209,9 +207,8 @@ const u32 vsc7514_qsys_regmap[] = {
REG(QSYS_SE_STATE, 0x00004c),
REG(QSYS_HSCH_MISC_CFG, 0x011388),
};
-EXPORT_SYMBOL(vsc7514_qsys_regmap);
-const u32 vsc7514_rew_regmap[] = {
+static const u32 vsc7514_rew_regmap[] = {
REG(REW_PORT_VLAN_CFG, 0x000000),
REG(REW_TAG_CFG, 0x000004),
REG(REW_PORT_CFG, 0x000008),
@@ -224,9 +221,8 @@ const u32 vsc7514_rew_regmap[] = {
REG(REW_STAT_CFG, 0x000890),
REG(REW_PPT, 0x000680),
};
-EXPORT_SYMBOL(vsc7514_rew_regmap);
-const u32 vsc7514_sys_regmap[] = {
+static const u32 vsc7514_sys_regmap[] = {
REG(SYS_COUNT_RX_OCTETS, 0x000000),
REG(SYS_COUNT_RX_UNICAST, 0x000004),
REG(SYS_COUNT_RX_MULTICAST, 0x000008),
@@ -347,9 +343,8 @@ const u32 vsc7514_sys_regmap[] = {
REG(SYS_PTP_NXT, 0x0006c0),
REG(SYS_PTP_CFG, 0x0006c4),
};
-EXPORT_SYMBOL(vsc7514_sys_regmap);
-const u32 vsc7514_vcap_regmap[] = {
+static const u32 vsc7514_vcap_regmap[] = {
/* VCAP_CORE_CFG */
REG(VCAP_CORE_UPDATE_CTRL, 0x000000),
REG(VCAP_CORE_MV_CFG, 0x000004),
@@ -371,9 +366,8 @@ const u32 vsc7514_vcap_regmap[] = {
REG(VCAP_CONST_CORE_CNT, 0x0003b8),
REG(VCAP_CONST_IF_CNT, 0x0003bc),
};
-EXPORT_SYMBOL(vsc7514_vcap_regmap);
-const u32 vsc7514_ptp_regmap[] = {
+static const u32 vsc7514_ptp_regmap[] = {
REG(PTP_PIN_CFG, 0x000000),
REG(PTP_PIN_TOD_SEC_MSB, 0x000004),
REG(PTP_PIN_TOD_SEC_LSB, 0x000008),
@@ -384,9 +378,8 @@ const u32 vsc7514_ptp_regmap[] = {
REG(PTP_CLK_CFG_ADJ_CFG, 0x0000a4),
REG(PTP_CLK_CFG_ADJ_FREQ, 0x0000a8),
};
-EXPORT_SYMBOL(vsc7514_ptp_regmap);
-const u32 vsc7514_dev_gmii_regmap[] = {
+static const u32 vsc7514_dev_gmii_regmap[] = {
REG(DEV_CLOCK_CFG, 0x0),
REG(DEV_PORT_MISC, 0x4),
REG(DEV_EVENTS, 0x8),
@@ -427,7 +420,6 @@ const u32 vsc7514_dev_gmii_regmap[] = {
REG(DEV_PCS_FX100_CFG, 0x94),
REG(DEV_PCS_FX100_STATUS, 0x98),
};
-EXPORT_SYMBOL(vsc7514_dev_gmii_regmap);
const u32 *vsc7514_regmap[TARGET_MAX] = {
[ANA] = vsc7514_ana_regmap,
diff --git a/include/soc/mscc/vsc7514_regs.h b/include/soc/mscc/vsc7514_regs.h
index dfb91629c8bd..79a9152cd08d 100644
--- a/include/soc/mscc/vsc7514_regs.h
+++ b/include/soc/mscc/vsc7514_regs.h
@@ -14,15 +14,6 @@ extern struct vcap_props vsc7514_vcap_props[];
extern const struct reg_field vsc7514_regfields[REGFIELD_MAX];
-extern const u32 vsc7514_ana_regmap[];
-extern const u32 vsc7514_qs_regmap[];
-extern const u32 vsc7514_qsys_regmap[];
-extern const u32 vsc7514_rew_regmap[];
-extern const u32 vsc7514_sys_regmap[];
-extern const u32 vsc7514_vcap_regmap[];
-extern const u32 vsc7514_ptp_regmap[];
-extern const u32 vsc7514_dev_gmii_regmap[];
-
extern const u32 *vsc7514_regmap[TARGET_MAX];
extern const struct vcap_field vsc7514_vcap_es0_keys[];
--
2.25.1
On Fri, Feb 03, 2023 at 04:12:11PM -0800, Colin Foster wrote:
> There are no external users of the vsc7514_*_regmap[] symbols. They were
> exported in commit 32ecd22ba60b ("net: mscc: ocelot: split register
> definitions to a separate file") with the intention of being used, but the
> actual structure used in commit 2efaca411c96 ("net: mscc: ocelot: expose
> vsc7514_regmap definition") ended up being all that was needed.
>
> Bury these unnecessary symbols.
>
> Signed-off-by: Colin Foster <[email protected]>
> Suggested-by: Vladimir Oltean <[email protected]>
> ---
These can be unexported too:
extern const struct vcap_field vsc7514_vcap_es0_keys[];
extern const struct vcap_field vsc7514_vcap_es0_actions[];
extern const struct vcap_field vsc7514_vcap_is1_keys[];
extern const struct vcap_field vsc7514_vcap_is1_actions[];
extern const struct vcap_field vsc7514_vcap_is2_keys[];
extern const struct vcap_field vsc7514_vcap_is2_actions[];
I guess we make exceptions for the 24 hour reposting rule when the patch
has been reviewed?
On Sat, 4 Feb 2023 03:34:39 +0200 Vladimir Oltean wrote:
> These can be unexported too:
>
> extern const struct vcap_field vsc7514_vcap_es0_keys[];
> extern const struct vcap_field vsc7514_vcap_es0_actions[];
> extern const struct vcap_field vsc7514_vcap_is1_keys[];
> extern const struct vcap_field vsc7514_vcap_is1_actions[];
> extern const struct vcap_field vsc7514_vcap_is2_keys[];
> extern const struct vcap_field vsc7514_vcap_is2_actions[];
>
> I guess we make exceptions for the 24 hour reposting rule when the patch
> has been reviewed?
FWIW I think that it's perfectly fine to skip the wait whenever
reviewer explicitly asks for a quick repost. The only person who's
judgment we don't trust is the author (including me not trusting
myself when I post my own patches).
On Sat, Feb 04, 2023 at 03:34:39AM +0200, Vladimir Oltean wrote:
> On Fri, Feb 03, 2023 at 04:12:11PM -0800, Colin Foster wrote:
> > There are no external users of the vsc7514_*_regmap[] symbols. They were
> > exported in commit 32ecd22ba60b ("net: mscc: ocelot: split register
> > definitions to a separate file") with the intention of being used, but the
> > actual structure used in commit 2efaca411c96 ("net: mscc: ocelot: expose
> > vsc7514_regmap definition") ended up being all that was needed.
> >
> > Bury these unnecessary symbols.
> >
> > Signed-off-by: Colin Foster <[email protected]>
> > Suggested-by: Vladimir Oltean <[email protected]>
> > ---
>
> These can be unexported too:
>
> extern const struct vcap_field vsc7514_vcap_es0_keys[];
> extern const struct vcap_field vsc7514_vcap_es0_actions[];
> extern const struct vcap_field vsc7514_vcap_is1_keys[];
> extern const struct vcap_field vsc7514_vcap_is1_actions[];
> extern const struct vcap_field vsc7514_vcap_is2_keys[];
> extern const struct vcap_field vsc7514_vcap_is2_actions[];
I was as positive as I could have been that I'd grepped (grept?) and saw
those used in Seville, Felix, and ocelot_ext yesterday. I'll fix this
up, and thanks for checking!
>
> I guess we make exceptions for the 24 hour reposting rule when the patch
> has been reviewed?