From patchwork Tue Aug 29 14:39:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 9927571 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 3F7F8602B9 for ; Tue, 29 Aug 2017 14:40:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 283AE2899F for ; Tue, 29 Aug 2017 14:40:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CDFB2897B; Tue, 29 Aug 2017 14:40:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Flag: YES X-Spam-Level: **** X-Spam-Status: Yes, score=4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 X-Spam-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [65.50.211.133 listed in list.dnswl.org] * 1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net * [Blocked - see ] * 3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [103.254.204.108 listed in zen.spamhaus.org] * 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source * [103.254.204.108 listed in dnsbl.sorbs.net] * 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (himanshujha199640[at]gmail.com) * 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is * CUSTOM_MED * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 1D92F28980 for ; Tue, 29 Aug 2017 14:40:03 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From: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=ZnKOFcWcHGJ1fROQ7stOlLopc03V7y8hw4QN8T5xFNs=; b=fTb W2pomA6NhMSB15YaVjyrMUfCwO854jCokp4nfkP5/JzdnpyTiSqbURX6akF5DhYzjLuTSu7jv949h 3atjhkJSRRFYmqyOgJZ3SHxOCx96e9Lv6pO5n8LjLRbZAbwvx/hxotZr12TkaYfE8xSxJTvL4Ox38 5V/Ow2q0t9+x+jh8sA304SV7AJDGxUBckiIn4tm1uNN42Tdml60UM+VP3Ytb5qXsT5PJ2Po8xmJjH wc/HpJ0Ud7OHKHMtSOiogN+4tpd6nd+j2xpyqsjP2fu6Z2Rz06x0TCNm168LnvXtckOGnqBxc0RIM sF+H7MpVlgwP08dmd0Adm+6or+MOtdw==; 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 1dmhgE-0006nh-6J; Tue, 29 Aug 2017 14:39:50 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dmhg4-0006X4-Ts for linux-arm-kernel@lists.infradead.org; Tue, 29 Aug 2017 14:39:48 +0000 Received: by mail-pf0-x244.google.com with SMTP id g13so2466360pfm.2 for ; Tue, 29 Aug 2017 07:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9/5V+3s+gKCAbGy1ECZ2uikOn2Ksb5bblIq0IijPYVQ=; b=iPaqR6Eu0UpZXzigNBiTf7rEYKKJFcNPhpNPA9vuIE1TqpymWbczr1G+y1fXcBbLXq nB8m0bWTu5dNt8+9ARGYyZT22l31xdaRxCU57oqhV+ISfu4eO+/Zg1iWrV4Hkt+iVm8O k4TwNWQ64rMIcqaZCIOjm593ZKcO9CXB+rDQ+sRZCl8hR0gwDvLwfAxOy8BBtj5kOekn SKv1hG2PhJHA16G3DnrdSnXKy6GbGX+Q8rZiSJ1S8cqQUHvu9EcZqncGKnOTx7d/MNzw EO1BWD6MaU9yb5M0gICTRrBLx6mXX4va8PsrA24VRY8v+W6BBEmidzRJ0AjzuvSRliTP Iv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9/5V+3s+gKCAbGy1ECZ2uikOn2Ksb5bblIq0IijPYVQ=; b=JdTm4xgSeizmDPaQXHDYfDlVSk+1YXcTuhzOo266oK8a5vGkf15ksMSUyXhZXSl5Yw ApVzr46R5uvfz/kArr+5aG8U2SQnyre5ds3KcGg0uQrK2psvW2aJkWT70g5Xp7GQdWH7 UCAeSTlI86WBJecsodonDQdsNmtKXgWaOaXyqeyVdp3vRjAnqPxUPWBJRzjSnsb1qYIF T4132SvNEoNdmG58YeBQQ9ggzb1Gk29C1Cp4kAOlz7kiw3F2WDxxIp2GwiWDGfJeuHP3 iDs084I72zijUYe32Ys5+QB+Wvkw2//TNuY8cLeRUrVH4sP+z1bEN7FI/iPXgoOf4C23 ce9g== X-Gm-Message-State: AHYfb5g//VLyT8XNzW94EdgucqKTrxezsRQqHBV/u8UIimSEtzSV1J23 GWYeV03CzsoZ8w== X-Google-Smtp-Source: ADKCNb5D0pj3simQ5SsRe3VtugZ4hZoHWuW/j8KNvyF0xn200Bwf3eH7PgeloeHmLgyQh1nuRn0jBA== X-Received: by 10.84.254.66 with SMTP id a2mr719317pln.33.1504017559625; Tue, 29 Aug 2017 07:39:19 -0700 (PDT) Received: from localhost.localdomain ([103.254.204.108]) by smtp.gmail.com with ESMTPSA id w64sm5394077pfi.75.2017.08.29.07.39.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 07:39:18 -0700 (PDT) From: Himanshu Jha To: alexandre.belloni@free-electrons.com Subject: [PATCH] rtc: remove cast to void pointer Date: Tue, 29 Aug 2017 20:09:03 +0530 Message-Id: <1504017543-19720-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170829_073941_032706_11EF7C27 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it, linux-kernel@vger.kernel.org, patrice.chotard@st.com, michal.simek@xilinx.com, Himanshu Jha , mcoquelin.stm32@gmail.com, maxime.ripard@free-electrons.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha --- drivers/rtc/interface.c | 4 ++-- drivers/rtc/rtc-88pm80x.c | 2 +- drivers/rtc/rtc-88pm860x.c | 2 +- drivers/rtc/rtc-at32ap700x.c | 2 +- drivers/rtc/rtc-hym8563.c | 2 +- drivers/rtc/rtc-m48t59.c | 2 +- drivers/rtc/rtc-max8925.c | 2 +- drivers/rtc/rtc-pic32.c | 2 +- drivers/rtc/rtc-s3c.c | 4 ++-- drivers/rtc/rtc-st-lpc.c | 2 +- drivers/rtc/rtc-stm32.c | 2 +- drivers/rtc/rtc-sun6i.c | 2 +- drivers/rtc/rtc-sunxi.c | 2 +- drivers/rtc/rtc-vr41xx.c | 4 ++-- drivers/rtc/rtc-xgene.c | 2 +- drivers/rtc/rtc-zynqmp.c | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 8cec9a0..81c85d2 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -528,7 +528,7 @@ void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode) */ void rtc_aie_update_irq(void *private) { - struct rtc_device *rtc = (struct rtc_device *)private; + struct rtc_device *rtc = private; rtc_handle_legacy_irq(rtc, 1, RTC_AF); } @@ -541,7 +541,7 @@ void rtc_aie_update_irq(void *private) */ void rtc_uie_update_irq(void *private) { - struct rtc_device *rtc = (struct rtc_device *)private; + struct rtc_device *rtc = private; rtc_handle_legacy_irq(rtc, 1, RTC_UF); } diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 466bf7f..819612e 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c @@ -60,7 +60,7 @@ struct pm80x_rtc_info { static irqreturn_t rtc_update_handler(int irq, void *data) { - struct pm80x_rtc_info *info = (struct pm80x_rtc_info *)data; + struct pm80x_rtc_info *info = data; int mask; mask = PM800_ALARM | PM800_ALARM_WAKEUP; diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index 19e53b3..67f7fa3 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c @@ -59,7 +59,7 @@ struct pm860x_rtc_info { static irqreturn_t rtc_update_handler(int irq, void *data) { - struct pm860x_rtc_info *info = (struct pm860x_rtc_info *)data; + struct pm860x_rtc_info *info = data; int mask; mask = ALARM | ALARM_WAKEUP; diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index de8bf56..f603f99 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c @@ -164,7 +164,7 @@ static int at32_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) static irqreturn_t at32_rtc_interrupt(int irq, void *dev_id) { - struct rtc_at32ap700x *rtc = (struct rtc_at32ap700x *)dev_id; + struct rtc_at32ap700x *rtc = dev_id; unsigned long isr = rtc_readl(rtc, ISR); unsigned long events = 0; int ret = IRQ_NONE; diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c index e5ad527..0709968 100644 --- a/drivers/rtc/rtc-hym8563.c +++ b/drivers/rtc/rtc-hym8563.c @@ -436,7 +436,7 @@ static struct clk *hym8563_clkout_register_clk(struct hym8563 *hym8563) */ static irqreturn_t hym8563_irq(int irq, void *dev_id) { - struct hym8563 *hym8563 = (struct hym8563 *)dev_id; + struct hym8563 *hym8563 = dev_id; struct i2c_client *client = hym8563->client; struct mutex *lock = &hym8563->rtc->ops_lock; int data, ret; diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index d99a705..2e35f73 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -302,7 +302,7 @@ static int m48t59_rtc_proc(struct device *dev, struct seq_file *seq) */ static irqreturn_t m48t59_rtc_interrupt(int irq, void *dev_id) { - struct device *dev = (struct device *)dev_id; + struct device *dev = dev_id; struct platform_device *pdev = to_platform_device(dev); struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); struct m48t59_private *m48t59 = platform_get_drvdata(pdev); diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index 67d6fc2..45d7e40 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c @@ -74,7 +74,7 @@ struct max8925_rtc_info { static irqreturn_t rtc_update_handler(int irq, void *data) { - struct max8925_rtc_info *info = (struct max8925_rtc_info *)data; + struct max8925_rtc_info *info = data; /* disable ALARM0 except for 1SEC alarm */ max8925_set_bits(info->rtc, MAX8925_ALARM0_CNTL, 0x7f, 0); diff --git a/drivers/rtc/rtc-pic32.c b/drivers/rtc/rtc-pic32.c index 5cfb6df..04788c3 100644 --- a/drivers/rtc/rtc-pic32.c +++ b/drivers/rtc/rtc-pic32.c @@ -92,7 +92,7 @@ static void pic32_rtc_alarm_clk_enable(struct pic32_rtc_dev *pdata, static irqreturn_t pic32_rtc_alarmirq(int irq, void *id) { - struct pic32_rtc_dev *pdata = (struct pic32_rtc_dev *)id; + struct pic32_rtc_dev *pdata = id; clk_enable(pdata->clk); rtc_update_irq(pdata->rtc, 1, RTC_AF | RTC_IRQF); diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a8992c2..8e8a815 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -113,7 +113,7 @@ static void s3c_rtc_disable_clk(struct s3c_rtc *info) /* IRQ Handlers */ static irqreturn_t s3c_rtc_tickirq(int irq, void *id) { - struct s3c_rtc *info = (struct s3c_rtc *)id; + struct s3c_rtc *info = id; if (info->data->irq_handler) info->data->irq_handler(info, S3C2410_INTP_TIC); @@ -123,7 +123,7 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id) static irqreturn_t s3c_rtc_alarmirq(int irq, void *id) { - struct s3c_rtc *info = (struct s3c_rtc *)id; + struct s3c_rtc *info = id; if (info->data->irq_handler) info->data->irq_handler(info, S3C2410_INTP_ALM); diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 82b0af1..75eb92c 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -74,7 +74,7 @@ static void st_rtc_set_hw_alarm(struct st_rtc *rtc, static irqreturn_t st_rtc_handler(int this_irq, void *data) { - struct st_rtc *rtc = (struct st_rtc *)data; + struct st_rtc *rtc = data; rtc_update_irq(rtc->rtc_dev, 1, RTC_AF); diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 3a5c3d7..66fc7ba 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -169,7 +169,7 @@ static int stm32_rtc_wait_sync(struct stm32_rtc *rtc) static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) { - struct stm32_rtc *rtc = (struct stm32_rtc *)dev_id; + struct stm32_rtc *rtc = dev_id; unsigned int isr, cr; mutex_lock(&rtc->rtc_dev->ops_lock); diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index 305c4d0..496a8dd 100644 --- a/drivers/rtc/rtc-sun6i.c +++ b/drivers/rtc/rtc-sun6i.c @@ -256,7 +256,7 @@ CLK_OF_DECLARE_DRIVER(sun6i_rtc_clk, "allwinner,sun6i-a31-rtc", static irqreturn_t sun6i_rtc_alarmirq(int irq, void *id) { - struct sun6i_rtc_dev *chip = (struct sun6i_rtc_dev *) id; + struct sun6i_rtc_dev *chip = id; irqreturn_t ret = IRQ_NONE; u32 val; diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index abada60..f1f7fd7 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c @@ -158,7 +158,7 @@ struct sunxi_rtc_dev { static irqreturn_t sunxi_rtc_alarmirq(int irq, void *id) { - struct sunxi_rtc_dev *chip = (struct sunxi_rtc_dev *) id; + struct sunxi_rtc_dev *chip = id; u32 val; val = readl(chip->base + SUNXI_ALRM_IRQ_STA); diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 7ce2296..a0aa377 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -228,7 +228,7 @@ static int vr41xx_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) static irqreturn_t elapsedtime_interrupt(int irq, void *dev_id) { - struct platform_device *pdev = (struct platform_device *)dev_id; + struct platform_device *pdev = dev_id; struct rtc_device *rtc = platform_get_drvdata(pdev); rtc2_write(RTCINTREG, ELAPSEDTIME_INT); @@ -240,7 +240,7 @@ static irqreturn_t elapsedtime_interrupt(int irq, void *dev_id) static irqreturn_t rtclong1_interrupt(int irq, void *dev_id) { - struct platform_device *pdev = (struct platform_device *)dev_id; + struct platform_device *pdev = dev_id; struct rtc_device *rtc = platform_get_drvdata(pdev); unsigned long count = periodic_count; diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c index 65b432a..2b8247d 100644 --- a/drivers/rtc/rtc-xgene.c +++ b/drivers/rtc/rtc-xgene.c @@ -131,7 +131,7 @@ static const struct rtc_class_ops xgene_rtc_ops = { static irqreturn_t xgene_rtc_interrupt(int irq, void *id) { - struct xgene_rtc_dev *pdata = (struct xgene_rtc_dev *) id; + struct xgene_rtc_dev *pdata = id; /* Check if interrupt asserted */ if (!(readl(pdata->csr_base + RTC_STAT) & RTC_STAT_BIT)) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index da18a8a..f2f8a2d 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -193,7 +193,7 @@ static const struct rtc_class_ops xlnx_rtc_ops = { static irqreturn_t xlnx_rtc_interrupt(int irq, void *id) { - struct xlnx_rtc_dev *xrtcdev = (struct xlnx_rtc_dev *)id; + struct xlnx_rtc_dev *xrtcdev = id; unsigned int status; status = readl(xrtcdev->reg_base + RTC_INT_STS);