From patchwork Sat Apr 1 14:06:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simran Singhal X-Patchwork-Id: 9658027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 947176035D for ; Sat, 1 Apr 2017 14:06:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DF3C285D2 for ; Sat, 1 Apr 2017 14:06:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 829BE28616; Sat, 1 Apr 2017 14:06:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2D3FC28613 for ; Sat, 1 Apr 2017 14:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/xDEfEtNA1lScTx8UgVVBCl+GjqwCRHg7WN/ZN5F0LU=; b=jpxJdCZkMqQm3L iTt44myxrG2OWJ+CstkJAk2JBFkjDuwCD+y86DWB7zZ4+446jJOJRy3LTaE6TO2d7kK28KZFYViLV U5hu7CmLVgssCUpDFRT3ghJ7rym+sXsQ+rasgOV4X8h97cVhww8qEEgig2y037v23Qu+KNStn2ARX yrR4zYuGVFhF9YXI64kLWkI6HkyKBe3RYIEwTL4pDNlCN/UuZC1Un7ODuaXo0yxqSf8b/Q4wN8xiP Nv9JEPlhzZmAMIVp9YKZg6knB1rrGAX/CQLuKiNYMkeXbw/B79JWGFww0pz9VZdTMHnL2g6xIJig1 FKh3gej1So9EqAq1JNRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cuJfu-0003n4-UO; Sat, 01 Apr 2017 14:06:42 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cuJfr-0003kX-D9; Sat, 01 Apr 2017 14:06:41 +0000 Received: by mail-pf0-x241.google.com with SMTP id 197so1401639pfv.0; Sat, 01 Apr 2017 07:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=sx1V2e4et0B2YAYUV3nmJy6xE2560hdEYtIa84Ezi8w=; b=OmiQth+lnb3Cdh+DO+ReV2/Yk8YxfR+pEYbQx9LIpgUgp3fbX7SLgV/1k5igzlGvSI WCRnjwA85TwOsEPktOc9hKGfYOKxUiRkW4CIDDnh1341oJDPvMIOpNGklQoGRzr6wlAo j6dbrTEJkiLYL1Gne9u3w7km8abwiPGrx9KRxC2V9CLa0RI/nbFGZWCk5f+HRcoS7fkb p+XDJT7+/tzyH1QeHjsf2MkRvtkSxI6/JdIGeXFGfKD5mJ8yVa7H1OVMNvHVeB5j5gnX NC4NZZC06kTXY2SyarlvqbF2KYI8ndeYMlD1mhPGqhJ/+4y+gmAo60fQRC+yhHtL3cG0 bkLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=sx1V2e4et0B2YAYUV3nmJy6xE2560hdEYtIa84Ezi8w=; b=cUQhutujYfLfdOotntoMkEMTxGKNGVcrNiB/oX42DrpFQDtDXSneJElg54W1zDxvFY +4Rw8rbrfRPaLRKPJs8mHPOljvrxdlwbfwY30RuvW3hCw5Pu9M+ffGvGk55NTJf8Ld6V cG9xEO/8OhibRoyTChYrybJc2dJJDfIEAa6/8FnhoL5V/xtn7bNwc3KcF9NPsiBc1S0U zyF+n4h1Fdl9ErtUE4gGgpAtQzUpn0WuaM0VymLQHeqMdHq5O8MaG/YfhuagImlP25qo Q2FtKUQ+KRodH8m8oGeWQALeioUswxAJXSJcsZNm7ROdkZiHcNTaqLyP7FVu81f2pjJP 1uRg== X-Gm-Message-State: AFeK/H0LkjVc+/dYxJTZMOrcq3Cpc4UMgg/RA5GF87/Ueh9H1puzgvkYl3jK1x90soEAwQ== X-Received: by 10.98.106.134 with SMTP id f128mr7968203pfc.142.1491055578234; Sat, 01 Apr 2017 07:06:18 -0700 (PDT) Received: from singhal-Inspiron-5558 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id m3sm16541024pgn.52.2017.04.01.07.06.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 07:06:17 -0700 (PDT) Date: Sat, 1 Apr 2017 19:36:14 +0530 From: simran singhal To: jic23@kernel.org Subject: [PATCH] iio: adc: Remove unnecessary cast on void pointer Message-ID: <20170401140613.GA20941@singhal-Inspiron-5558> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170401_070639_478782_564861D2 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Lars-Peter Clausen , Heiko Stuebner , linux-rockchip@lists.infradead.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Javier Martine Canillas , Chen-Yu Tsai , Kukjin Kim , Peter Meerwald-Stadler , Hartmut Knaack , Maxime Ripard , linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/iio/adc/exynos_adc.c | 2 +- drivers/iio/adc/imx7d_adc.c | 2 +- drivers/iio/adc/max1027.c | 2 +- drivers/iio/adc/rockchip_saradc.c | 2 +- drivers/iio/adc/sun4i-gpadc-iio.c | 2 +- drivers/iio/adc/vf610_adc.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index ad1775b..6c5a7be 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -579,7 +579,7 @@ static int exynos_read_s3c64xx_ts(struct iio_dev *indio_dev, int *x, int *y) static irqreturn_t exynos_adc_isr(int irq, void *dev_id) { - struct exynos_adc *info = (struct exynos_adc *)dev_id; + struct exynos_adc *info = dev_id; u32 mask = info->data->mask; /* Read value */ diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c index e2241ee..254b29a 100644 --- a/drivers/iio/adc/imx7d_adc.c +++ b/drivers/iio/adc/imx7d_adc.c @@ -365,7 +365,7 @@ static int imx7d_adc_read_data(struct imx7d_adc *info) static irqreturn_t imx7d_adc_isr(int irq, void *dev_id) { - struct imx7d_adc *info = (struct imx7d_adc *)dev_id; + struct imx7d_adc *info = dev_id; int status; status = readl(info->regs + IMX7D_REG_ADC_INT_STATUS); diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c index 3b7c4f7..ebc7159 100644 --- a/drivers/iio/adc/max1027.c +++ b/drivers/iio/adc/max1027.c @@ -364,7 +364,7 @@ static int max1027_set_trigger_state(struct iio_trigger *trig, bool state) static irqreturn_t max1027_trigger_handler(int irq, void *private) { - struct iio_poll_func *pf = (struct iio_poll_func *)private; + struct iio_poll_func *pf = private; struct iio_dev *indio_dev = pf->indio_dev; struct max1027_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index 85d7012..ae6d332 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -109,7 +109,7 @@ static int rockchip_saradc_read_raw(struct iio_dev *indio_dev, static irqreturn_t rockchip_saradc_isr(int irq, void *dev_id) { - struct rockchip_saradc *info = (struct rockchip_saradc *)dev_id; + struct rockchip_saradc *info = dev_id; /* Read value */ info->last_val = readl_relaxed(info->regs + SARADC_DATA); diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index a8e134f..e531825 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -382,7 +382,7 @@ static int sun4i_gpadc_runtime_resume(struct device *dev) static int sun4i_gpadc_get_temp(void *data, int *temp) { - struct sun4i_gpadc_iio *info = (struct sun4i_gpadc_iio *)data; + struct sun4i_gpadc_iio *info = data; int val, scale, offset; if (sun4i_gpadc_temp_read(info->indio_dev, &val)) diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index 228a003..01fc76f 100644 --- a/drivers/iio/adc/vf610_adc.c +++ b/drivers/iio/adc/vf610_adc.c @@ -584,7 +584,7 @@ static int vf610_adc_read_data(struct vf610_adc *info) static irqreturn_t vf610_adc_isr(int irq, void *dev_id) { - struct iio_dev *indio_dev = (struct iio_dev *)dev_id; + struct iio_dev *indio_dev = dev_id; struct vf610_adc *info = iio_priv(indio_dev); int coco;