Skip to contentSkip to conversation

media: dvb_frontend: make static read-only array DIB3000MC_I2C_ADDRESS const

PATCH New Colin Ian King 1 participant 1 message Jan 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: dvb_frontend: make static read-only array DIB3000MC_I2C_ADDRESS const

The static array DIB3000MC_I2C_ADDRESS is read-only so it make sense to make it const. Also add spaces to clean up checkpatch warnings.

---
 drivers/media/dvb-frontends/dib3000mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/dib3000mc.c +1 -1
index 692600ce5f23..06c95dc99dae 100644
@@ -859,7 +859,7 @@ int dib3000mc_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 defa
 	int k;
 	u8 new_addr;
 
-	static u8 DIB3000MC_I2C_ADDRESS[] = {20,22,24,26};
+	static const u8 DIB3000MC_I2C_ADDRESS[] = { 20, 22, 24, 26 };
 
 	dmcst = kzalloc(sizeof(struct dib3000mc_state), GFP_KERNEL);
 	if (dmcst == NULL)
Signature · 1 line
2.33.1