From patchwork Thu Apr 21 18:15:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 613232 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qrRqP4BlMz9t4Z for ; Fri, 22 Apr 2016 04:19:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754072AbcDUSP6 (ORCPT ); Thu, 21 Apr 2016 14:15:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:21993 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbcDUSP5 (ORCPT ); Thu, 21 Apr 2016 14:15:57 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 21 Apr 2016 11:15:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,513,1455004800"; d="scan'208";a="960003221" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2016 11:15:51 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 35B97629; Thu, 21 Apr 2016 21:15:46 +0300 (EEST) From: Andy Shevchenko To: Tejun Heo , linux-ide@vger.kernel.org, Rob Herring , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Christian Lamparter , =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= , Julian Margetson Subject: [PATCH v1 14/23] ata: sata_dwc_460ex: get rid of some pointless casts Date: Thu, 21 Apr 2016 21:15:35 +0300 Message-Id: <1461262544-115408-15-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1461262544-115408-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1461262544-115408-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Mans Rullgard Casting a pointer to unsigned long only to immediately cast it back to a pointer makes no sense. Fix this. Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 571ecd1..9e8271d 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -844,26 +844,26 @@ static void sata_dwc_enable_interrupts(struct sata_dwc_device *hsdev) in_le32(&hsdev->sata_dwc_regs->errmr)); } -static void sata_dwc_setup_port(struct ata_ioports *port, unsigned long base) +static void sata_dwc_setup_port(struct ata_ioports *port, void __iomem *base) { - port->cmd_addr = (void __iomem *)base + 0x00; - port->data_addr = (void __iomem *)base + 0x00; + port->cmd_addr = base + 0x00; + port->data_addr = base + 0x00; - port->error_addr = (void __iomem *)base + 0x04; - port->feature_addr = (void __iomem *)base + 0x04; + port->error_addr = base + 0x04; + port->feature_addr = base + 0x04; - port->nsect_addr = (void __iomem *)base + 0x08; + port->nsect_addr = base + 0x08; - port->lbal_addr = (void __iomem *)base + 0x0c; - port->lbam_addr = (void __iomem *)base + 0x10; - port->lbah_addr = (void __iomem *)base + 0x14; + port->lbal_addr = base + 0x0c; + port->lbam_addr = base + 0x10; + port->lbah_addr = base + 0x14; - port->device_addr = (void __iomem *)base + 0x18; - port->command_addr = (void __iomem *)base + 0x1c; - port->status_addr = (void __iomem *)base + 0x1c; + port->device_addr = base + 0x18; + port->command_addr = base + 0x1c; + port->status_addr = base + 0x1c; - port->altstatus_addr = (void __iomem *)base + 0x20; - port->ctl_addr = (void __iomem *)base + 0x20; + port->altstatus_addr = base + 0x20; + port->ctl_addr = base + 0x20; } static int sata_dwc_dma_get_channel(struct sata_dwc_device_port *hsdevp) @@ -1253,7 +1253,7 @@ static int sata_dwc_probe(struct platform_device *ofdev) /* Setup port */ host->ports[0]->ioaddr.cmd_addr = base; host->ports[0]->ioaddr.scr_addr = base + SATA_DWC_SCR_OFFSET; - sata_dwc_setup_port(&host->ports[0]->ioaddr, (unsigned long)base); + sata_dwc_setup_port(&host->ports[0]->ioaddr, base); /* Read the ID and Version Registers */ idr = in_le32(&hsdev->sata_dwc_regs->idr);