Skip to content

Commit 3930dcc

Browse files
idoschkuba-moo
authored andcommitted
mlxsw: reg: Remove unused function argument
The 'lock' argument is always set to the default value of '0'. Remove it from the arguments list. Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Petr Machata <[email protected]> Link: https://lore.kernel.org/r/fb5dd22830622ceeda1c2d6431c27fccd0687aca.1690281940.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7447eda commit 3930dcc

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

drivers/net/ethernet/mellanox/mlxsw/core_env.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mlxsw_env_validate_cable_ident(struct mlxsw_core *core, u8 slot_index, int id,
111111
if (err)
112112
return err;
113113

114-
mlxsw_reg_mcia_pack(mcia_pl, slot_index, id, 0,
114+
mlxsw_reg_mcia_pack(mcia_pl, slot_index, id,
115115
MLXSW_REG_MCIA_PAGE0_LO_OFF, 0, 1,
116116
MLXSW_REG_MCIA_I2C_ADDR_LOW);
117117
err = mlxsw_reg_query(core, MLXSW_REG(mcia), mcia_pl);
@@ -188,7 +188,7 @@ mlxsw_env_query_module_eeprom(struct mlxsw_core *mlxsw_core, u8 slot_index,
188188
}
189189
}
190190

191-
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, 0, page, offset, size,
191+
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page, offset, size,
192192
i2c_addr);
193193

194194
err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mcia), mcia_pl);
@@ -266,12 +266,12 @@ mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, u8 slot_index,
266266
page = MLXSW_REG_MCIA_TH_PAGE_CMIS_NUM;
267267
else
268268
page = MLXSW_REG_MCIA_TH_PAGE_NUM;
269-
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, 0, page,
269+
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page,
270270
MLXSW_REG_MCIA_TH_PAGE_OFF + off,
271271
MLXSW_REG_MCIA_TH_ITEM_SIZE,
272272
MLXSW_REG_MCIA_I2C_ADDR_LOW);
273273
} else {
274-
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, 0,
274+
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module,
275275
MLXSW_REG_MCIA_PAGE0_LO,
276276
off, MLXSW_REG_MCIA_TH_ITEM_SIZE,
277277
MLXSW_REG_MCIA_I2C_ADDR_HIGH);
@@ -491,7 +491,7 @@ mlxsw_env_get_module_eeprom_by_page(struct mlxsw_core *mlxsw_core,
491491
size = min_t(u8, page->length - bytes_read,
492492
MLXSW_REG_MCIA_EEPROM_SIZE);
493493

494-
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, 0, page->page,
494+
mlxsw_reg_mcia_pack(mcia_pl, slot_index, module, page->page,
495495
device_addr + bytes_read, size,
496496
page->i2c_address);
497497
mlxsw_reg_mcia_bank_number_set(mcia_pl, page->bank);

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9644,14 +9644,6 @@ static inline void mlxsw_reg_mtbr_temp_unpack(char *payload, int rec_ind,
96449644

96459645
MLXSW_REG_DEFINE(mcia, MLXSW_REG_MCIA_ID, MLXSW_REG_MCIA_LEN);
96469646

9647-
/* reg_mcia_l
9648-
* Lock bit. Setting this bit will lock the access to the specific
9649-
* cable. Used for updating a full page in a cable EPROM. Any access
9650-
* other then subsequence writes will fail while the port is locked.
9651-
* Access: RW
9652-
*/
9653-
MLXSW_ITEM32(reg, mcia, l, 0x00, 31, 1);
9654-
96559647
/* reg_mcia_module
96569648
* Module number.
96579649
* Access: Index
@@ -9764,14 +9756,12 @@ MLXSW_ITEM_BUF(reg, mcia, eeprom, 0x10, MLXSW_REG_MCIA_EEPROM_SIZE);
97649756
MLXSW_REG_MCIA_EEPROM_UP_PAGE_LENGTH + 1)
97659757

97669758
static inline void mlxsw_reg_mcia_pack(char *payload, u8 slot_index, u8 module,
9767-
u8 lock, u8 page_number,
9768-
u16 device_addr, u8 size,
9759+
u8 page_number, u16 device_addr, u8 size,
97699760
u8 i2c_device_addr)
97709761
{
97719762
MLXSW_REG_ZERO(mcia, payload);
97729763
mlxsw_reg_mcia_slot_set(payload, slot_index);
97739764
mlxsw_reg_mcia_module_set(payload, module);
9774-
mlxsw_reg_mcia_l_set(payload, lock);
97759765
mlxsw_reg_mcia_page_number_set(payload, page_number);
97769766
mlxsw_reg_mcia_device_address_set(payload, device_addr);
97779767
mlxsw_reg_mcia_size_set(payload, size);

0 commit comments

Comments
 (0)