From patchwork Mon Mar 3 10:06:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3752651 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 097429F1EE for ; Mon, 3 Mar 2014 10:08:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 189D720303 for ; Mon, 3 Mar 2014 10:08:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09FB1202FE for ; Mon, 3 Mar 2014 10:08:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbaCCKH7 (ORCPT ); Mon, 3 Mar 2014 05:07:59 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:49299 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbaCCKHt (ORCPT ); Mon, 3 Mar 2014 05:07:49 -0500 Received: from [201.74.152.26] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKPmj-00078J-Om; Mon, 03 Mar 2014 10:07:47 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1WKPmE-0006UE-TI; Mon, 03 Mar 2014 07:07:14 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Mauro Carvalho Chehab Subject: [PATCH 07/79] [media] drx-j: remove the "const" annotate on HICommand() Date: Mon, 3 Mar 2014 07:06:01 -0300 Message-Id: <1393841233-24840-8-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393841233-24840-1-git-send-email-m.chehab@samsung.com> References: <1393841233-24840-1-git-send-email-m.chehab@samsung.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mauro Carvalho Chehab 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 --- 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;