From: Mauro Carvalho Chehab <mche...@redhat.com>

After removing the typedef, it is now clear that HICommand() were
abusing of a var that was expecting to be constant:

drivers/media/dvb-frontends/drx39xyj/drxj.c: In function ‘HICommand’:
drivers/media/dvb-frontends/drx39xyj/drxj.c:2272:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2272:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2273:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2273:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2274:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2274:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2275:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2275:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2278:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2278:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2279:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2279:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2291:2: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.writeReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2291:2: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2311:4: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.readReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2311:4: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’
drivers/media/dvb-frontends/drx39xyj/drxj.c:2315:3: warning: passing argument 1 
of ‘drxDapDRXJFunct_g.readReg16Func’ discards ‘const’ qualifier from pointer 
target type [enabled by default]
drivers/media/dvb-frontends/drx39xyj/drxj.c:2315:3: note: expected ‘struct 
i2c_device_addr *’ but argument is of type ‘const struct i2c_device_addr *’

Signed-off-by: Mauro Carvalho Chehab <m.che...@samsung.com>
---
 drivers/media/dvb-frontends/drx39xyj/drxj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c 
b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index 84f4e1823925..a41b2a9fe9b4 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -1146,7 +1146,7 @@ FUNCTIONS
 ----------------------------------------------------------------------------*/
 /* Some prototypes */
 static DRXStatus_t
-HICommand(const struct i2c_device_addr *devAddr,
+HICommand(struct i2c_device_addr *devAddr,
          const pDRXJHiCmd_t cmd, pu16_t result);
 
 static DRXStatus_t
@@ -2258,7 +2258,7 @@ rw_error:
 *
 */
 static DRXStatus_t
-HICommand(const struct i2c_device_addr *devAddr, const pDRXJHiCmd_t cmd, 
pu16_t result)
+HICommand(struct i2c_device_addr *devAddr, const pDRXJHiCmd_t cmd, pu16_t 
result)
 {
        u16_t waitCmd = 0;
        u16_t nrRetries = 0;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to