diff --git a/drivers/net/dsa/sja1105/sja1105_clocking.c b/drivers/net/dsa/sja1105/sja1105_clocking.c index b46b884e32a95e..1b701644b1221f 100644 --- a/drivers/net/dsa/sja1105/sja1105_clocking.c +++ b/drivers/net/dsa/sja1105/sja1105_clocking.c @@ -101,7 +101,7 @@ struct sja1105_cgu_mii_ctrl { u8 pd; }; -static const struct packed_field sja1105_cgu_idiv_fields[] = { +static const struct packed_field_8 sja1105_cgu_idiv_fields[] = { PACKED_FIELD(28, 24, struct sja1105_cgu_idiv, clksrc), PACKED_FIELD(11, 11, struct sja1105_cgu_idiv, autoblock), PACKED_FIELD(5, 2, struct sja1105_cgu_idiv, idiv), @@ -137,7 +137,7 @@ static int sja1105_cgu_idiv_config(struct sja1105_private *priv, int port, SJA1105_SIZE_CGU_CMD); } -static const struct packed_field sja1105_cgu_mii_ctrl_fields[] = { +static const struct packed_field_8 sja1105_cgu_mii_ctrl_fields[] = { PACKED_FIELD(28, 24, struct sja1105_cgu_mii_ctrl, clksrc), PACKED_FIELD(11, 11, struct sja1105_cgu_mii_ctrl, autoblock), PACKED_FIELD(0, 0, struct sja1105_cgu_mii_ctrl, pd), @@ -322,7 +322,7 @@ static int sja1105_mii_clocking_setup(struct sja1105_private *priv, int port, return 0; } -static const struct packed_field sja1105_cgu_pll_ctrl_fields[] = { +static const struct packed_field_8 sja1105_cgu_pll_ctrl_fields[] = { PACKED_FIELD(28, 24, struct sja1105_cgu_pll_ctrl, pllclksrc), PACKED_FIELD(23, 16, struct sja1105_cgu_pll_ctrl, msel), PACKED_FIELD(11, 11, struct sja1105_cgu_pll_ctrl, autoblock), @@ -372,7 +372,7 @@ static int sja1105_cgu_rgmii_tx_clk_config(struct sja1105_private *priv, } /* AGU */ -static const struct packed_field sja1105_cfg_pad_mii_fields[] = { +static const struct packed_field_8 sja1105_cfg_pad_mii_fields[] = { PACKED_FIELD(28, 27, struct sja1105_cfg_pad_mii, d32_os), PACKED_FIELD(26, 26, struct sja1105_cfg_pad_mii, d32_ih), PACKED_FIELD(25, 24, struct sja1105_cfg_pad_mii, d32_ipud), @@ -457,7 +457,7 @@ static int sja1105_cfg_pad_rx_config(struct sja1105_private *priv, int port) SJA1105_SIZE_CGU_CMD); } -static const struct packed_field sja1105_cfg_pad_mii_id_fields[] = { +static const struct packed_field_8 sja1105_cfg_pad_mii_id_fields[] = { PACKED_FIELD(15, 15, struct sja1105_cfg_pad_mii_id, rxc_stable_ovr), PACKED_FIELD(14, 10, struct sja1105_cfg_pad_mii_id, rxc_delay), PACKED_FIELD(9, 9, struct sja1105_cfg_pad_mii_id, rxc_bypass), @@ -468,7 +468,7 @@ static const struct packed_field sja1105_cfg_pad_mii_id_fields[] = { PACKED_FIELD(0, 0, struct sja1105_cfg_pad_mii_id, txc_pd), }; -static const struct packed_field sja1110_cfg_pad_mii_id_fields[] = { +static const struct packed_field_8 sja1110_cfg_pad_mii_id_fields[] = { PACKED_FIELD(26, 26, struct sja1105_cfg_pad_mii_id, rxc_stable_ovr), PACKED_FIELD(25, 21, struct sja1105_cfg_pad_mii_id, rxc_delay), PACKED_FIELD(20, 18, struct sja1105_cfg_pad_mii_id, rxc_range), @@ -822,7 +822,7 @@ int sja1105_clocking_setup(struct sja1105_private *priv) return 0; } -static const struct packed_field sja1110_cgu_outclk_fields[] = { +static const struct packed_field_8 sja1110_cgu_outclk_fields[] = { PACKED_FIELD(27, 24, struct sja1110_cgu_outclk, clksrc), PACKED_FIELD(11, 11, struct sja1110_cgu_outclk, autoblock), PACKED_FIELD(0, 0, struct sja1110_cgu_outclk, pd), diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.c b/drivers/net/dsa/sja1105/sja1105_ptp.c index 453f39923dc405..c4e78e23d727cf 100644 --- a/drivers/net/dsa/sja1105/sja1105_ptp.c +++ b/drivers/net/dsa/sja1105/sja1105_ptp.c @@ -58,7 +58,7 @@ enum sja1105_ptp_clk_mode { #define ptp_data_to_sja1105(d) \ container_of((d), struct sja1105_private, ptp_data) -static const struct packed_field sja1105et_ptp_cmd_fields[] = { +static const struct packed_field_8 sja1105et_ptp_cmd_fields[] = { PACKED_FIELD(31, 31, struct sja1105_ptp_cmd, valid), PACKED_FIELD(30, 30, struct sja1105_ptp_cmd, ptpstrtsch), PACKED_FIELD(29, 29, struct sja1105_ptp_cmd, ptpstopsch), @@ -69,7 +69,7 @@ static const struct packed_field sja1105et_ptp_cmd_fields[] = { PACKED_FIELD(0, 0, struct sja1105_ptp_cmd, ptpclkadd), }; -static const struct packed_field sja1105pqrs_ptp_cmd_fields[] = { +static const struct packed_field_8 sja1105pqrs_ptp_cmd_fields[] = { PACKED_FIELD(31, 31, struct sja1105_ptp_cmd, valid), PACKED_FIELD(30, 30, struct sja1105_ptp_cmd, ptpstrtsch), PACKED_FIELD(29, 29, struct sja1105_ptp_cmd, ptpstopsch), diff --git a/drivers/net/dsa/sja1105/sja1105_spi.c b/drivers/net/dsa/sja1105/sja1105_spi.c index 19bc6a75ddbf55..c9a385ac5f3b57 100644 --- a/drivers/net/dsa/sja1105/sja1105_spi.c +++ b/drivers/net/dsa/sja1105/sja1105_spi.c @@ -13,7 +13,7 @@ struct sja1105_chunk { u64 reg_addr; }; -static const struct packed_field sja1105_spi_message_fields[] = { +static const struct packed_field_8 sja1105_spi_message_fields[] = { PACKED_FIELD(31, 31, struct sja1105_spi_message, access), PACKED_FIELD(30, 25, struct sja1105_spi_message, read_count), PACKED_FIELD(24, 4, struct sja1105_spi_message, address), diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.h b/drivers/net/dsa/sja1105/sja1105_static_config.h index cadee965931754..26a35912a86927 100644 --- a/drivers/net/dsa/sja1105/sja1105_static_config.h +++ b/drivers/net/dsa/sja1105/sja1105_static_config.h @@ -506,11 +506,9 @@ void sja1105_packing(void *buf, u64 *val, int start, int end, size_t len, enum packing_op op); #define sja1105_pack_fields(buf, len, ustruct, fields) \ - pack_fields((buf), (len), (ustruct), (fields), ARRAY_SIZE(fields), \ - QUIRK_LSW32_IS_FIRST) + pack_fields_m((buf), (len), (ustruct), (fields), QUIRK_LSW32_IS_FIRST) #define sja1105_unpack_fields(buf, len, ustruct, fields) \ - unpack_fields((buf), (len), (ustruct), (fields), ARRAY_SIZE(fields), \ - QUIRK_LSW32_IS_FIRST) + unpack_fields_m((buf), (len), (ustruct), (fields), QUIRK_LSW32_IS_FIRST) /* Common implementations for the static and dynamic configs */ size_t sja1105pqrs_general_params_entry_packing(void *buf, void *entry_ptr,