From patchwork Tue Feb 12 07:12:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 158116 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3509822jaa; Mon, 11 Feb 2019 23:14:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IbaG0eN6NjhkqzhIp0gFlkuWkOWhwi6jmHkVtZnUwx/sAik+mIsaTuLHT2+7oBIPXZYM1YD X-Received: by 2002:a63:5359:: with SMTP id t25mr2162723pgl.99.1549955647181; Mon, 11 Feb 2019 23:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549955647; cv=none; d=google.com; s=arc-20160816; b=Qg79Nwpizq+He8OkEwqsqHNx0g+JwVIfpt4EA4AZgw1+PIlucXEfcGCE7nWCUNICbb n9TSzeqMeA53XEeSb6ZnG/rKed0cwEdViQF7B8AylNSMnHuSblCQbvXhJAyeUKYOZl+D THGR7LX9boA5OjBzB1tGAGeBrNTb7Nu4U9eebN137c1pcPMdPSA57V+dXxN1C3DmAj9E w/M1YUMi06FJfu4pwPRFp5X0xIyOnb560DQtzzQ2XAD5XF0XXy3MfhxX4E7cgoNHeKBH jjhmbA8w07wATKWVe4Xpu9EjO7fY276QAOanh6dqzbvd73dggggJsK6uTyh/SIWA9YcI QlBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature; bh=L2ILPGgDUKksLtmvaKIYqW8M+MiMrkGWRgkgjw9cqFs=; b=vO3jf1Xo2veBGuSbpAh+G7rdba+vmQa+9vAc11aQunJmvsIrkF2+NqW3BdFrJGvJpq vVXjcmsNz2N1InBHbhKyN2f+9QOj80ea28cs84phJBee0kFDVmMZi5P3w6tupClynhGU DJOC/ur1okCFOAYK3eoF6h2mKE9dpCppDgattKKN08O+XE+sJNExldWgtsQfezS5ltAW wWz0KmJVXrU5VWZ92NBsLshS5MEPIY20yVOc56ADXyUqyrX9l2A8TQu+o5d8VwWXCZVh AgtY+GMqiUZGu6g/Uu5/erFCPheuPMAoM1SwbWUmlpZt9w5PQxXD8JxXZgj24uaWiFI5 Z3jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=VO1KnPNV; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=qbt9Ky2x; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id b23si6081597pgl.559.2019.02.11.23.14.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 23:14:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=VO1KnPNV; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=qbt9Ky2x; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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:References: In-Reply-To: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:List-Owner; bh=L2ILPGgDUKksLtmvaKIYqW8M+MiMrkGWRgkgjw9cqFs=; b=VO1KnPNVAN5sA7VpLuCtqFmiCv mH+Lwq2yervzniQTJwkVSHMPvA/ZSgfYo89BzquugpRaaFEDnkXT1/S6J5PQIgXIpHcrx0wkD76Oe 3y64BxStAgFeLOaDyZoWKHta/kf09ZWpMZE+3hM5R0IGwvGrFD4uFT3IuPwp8AjwPp9tCbhUp7/mT lTXzQHVbSlk3XljXxR4n+4zJcKEZi5wb2iT+dhOOdJ9gsxKgH9kYoNhAbplVX3Jo6sNc7GjgDFWja bI+DzDmZETBar/6A7Usu0Vm0U39CHxuBqgYkLNe1IkxpZRkBtcWtHpNLG7WZS2h7UB/VNFJZyYF/8 pHncy0ng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtSGU-0003Tc-8b; Tue, 12 Feb 2019 07:13:58 +0000 Received: from conuserg-09.nifty.com ([210.131.2.76]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtSGM-0003J8-NB for linux-mtd@lists.infradead.org; Tue, 12 Feb 2019 07:13:53 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x1C7DPdR019269; Tue, 12 Feb 2019 16:13:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x1C7DPdR019269 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549955609; bh=HYckDXuas8pq71xyZdmaNUVL9TtZH+n6gMwrrO1jxis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qbt9Ky2xDyQGdz88W/Sj6ZBspI2TphsqEV+kskQDTYR4VmUuHPhB4xPLdYi+v7lSM DTuISCkrU9MtBHR4Sk8c9EJAYXtCZ534xIpiLEfMmXxGuir24j86N90z/Ukp40kNR1 YLxaybUNFcSSGNfydSV1rWVuqCchnnp9QIqP465U37aR2imWHcnQCVEnGBkaqUiVQZ LJFImwKm70HYqib6gSaTcoPJlfSBs4tSRiJ3HD0Sri7d9XehajPkMrn2Mdhbw8JC8e boU5fzB5bs27Pml0tIF/VJjhg1SEu88igO42NXsTbTHGorl4QvKgwUUTOG9Ym768DQ 8YTZp9W/qQFCw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Miquel Raynal Subject: [PATCH v2 03/10] mtd: rawnand: denali: remove unneeded casts in denali_{read, write}_pio Date: Tue, 12 Feb 2019 16:12:55 +0900 Message-Id: <1549955582-30346-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549955582-30346-1-git-send-email-yamada.masahiro@socionext.com> References: <1549955582-30346-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_231351_463935_DAF934C8 X-CRM114-Status: GOOD ( 10.68 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.76 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Richard Weinberger , Boris Brezillon , linux-kernel@vger.kernel.org, Marek Vasut , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Since (u32 *) can accept an opaque pointer, the explicit casting from (void *) to (u32 *) is redundant. Change the function argument type to remove the casts. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/raw/denali.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index 9287f4f..a2fe2ff 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -478,11 +478,10 @@ static void denali_setup_dma32(struct denali_nand_info *denali, denali->host_write(denali, mode | 0x14000, 0x2400); } -static int denali_pio_read(struct denali_nand_info *denali, void *buf, +static int denali_pio_read(struct denali_nand_info *denali, u32 *buf, size_t size, int page) { u32 addr = DENALI_MAP01 | DENALI_BANK(denali) | page; - uint32_t *buf32 = (uint32_t *)buf; uint32_t irq_status, ecc_err_mask; int i; @@ -494,7 +493,7 @@ static int denali_pio_read(struct denali_nand_info *denali, void *buf, denali_reset_irq(denali); for (i = 0; i < size / 4; i++) - *buf32++ = denali->host_read(denali, addr); + buf[i] = denali->host_read(denali, addr); irq_status = denali_wait_for_irq(denali, INTR__PAGE_XFER_INC); if (!(irq_status & INTR__PAGE_XFER_INC)) @@ -506,18 +505,17 @@ static int denali_pio_read(struct denali_nand_info *denali, void *buf, return irq_status & ecc_err_mask ? -EBADMSG : 0; } -static int denali_pio_write(struct denali_nand_info *denali, - const void *buf, size_t size, int page) +static int denali_pio_write(struct denali_nand_info *denali, const u32 *buf, + size_t size, int page) { u32 addr = DENALI_MAP01 | DENALI_BANK(denali) | page; - const uint32_t *buf32 = (uint32_t *)buf; uint32_t irq_status; int i; denali_reset_irq(denali); for (i = 0; i < size / 4; i++) - denali->host_write(denali, addr, *buf32++); + denali->host_write(denali, addr, buf[i]); irq_status = denali_wait_for_irq(denali, INTR__PROGRAM_COMP | INTR__PROGRAM_FAIL);