From patchwork Mon Nov 4 17:22:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 178442 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1773466ilf; Mon, 4 Nov 2019 09:25:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzG6UyhcAFdwlnrxTw5MyHG9OvAbNduUHf4ZnNM/+6mL1Nix6rt/dflB1fTE3B4g1/5Q/6u X-Received: by 2002:a17:906:1e07:: with SMTP id g7mr25703066ejj.256.1572888335296; Mon, 04 Nov 2019 09:25:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572888335; cv=none; d=google.com; s=arc-20160816; b=Z/CeE+wB+Za+yFBgKCbo7Inbi2MLlmv7hYVaceHITYavl5Iw3dzSV01p+j5LipK3kk ooovOPWLSs3DN7IqWoaNdBWXdtw6yaKik22dN7ffeaY0HCYMeKNwReJ57HT+iSLek05b TeC8sdwNCk/OuKfXLrKYytKdqYG7PG2AnY9efa/VbbyMG75CluGOS4jp537La+Ko7ojR YYGz87EierytB+H+2yFHPJPIiNQFBSyzO1xGVbMlDODAsexlPNtAhRsnHSABzewJDzkL pC9QjV4w6UotFYiQSUt1+CSBdhRJGQi5t0ppbHFo3HG0sJuMIDXpxZu7csDD6Wzc9/5t nZ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=1NOYylUOkHzzGL4Uue6Mxpnd2d3WCuxLQ7Rjp8YOuII=; b=uqu/GG9JxTrCCAsQE/JbGrSANW95hxGVxctEvxSCIpzwRB3zp7uqfWO4WWclFYasZ5 z929HWgCbQz+swFZskN8SNffyZ/JkMA6bcoUcZcRIrU0OdsriXZf0Og1qOgrBxvYqNcX gtX3b37yUCPvcx5wvi35nDc75O1O7vgSUYmJUX/sErO16QZJ9gvGE8DPiXN71354OkXp sNkKBchNzzk2HRB8sueHeruKPW058zHWtS+Y237/2zmV1Hyi+YnTBt+3vNXINwIySKOz QohCMwjElQpIOo35o4XBr3yENGW6kMJedKIAf2tz/LXf96h8XVAazNH8AkN0guKG51yA FDdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si3316647ejr.260.2019.11.04.09.25.35; Mon, 04 Nov 2019 09:25:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729293AbfKDRZd (ORCPT + 26 others); Mon, 4 Nov 2019 12:25:33 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:47212 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728321AbfKDRZd (ORCPT ); Mon, 4 Nov 2019 12:25:33 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AC5162BC5EFDC1B2CBAA; Tue, 5 Nov 2019 01:25:31 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Tue, 5 Nov 2019 01:25:22 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v3 3/5] bus: hisi_lpc: Clean some types Date: Tue, 5 Nov 2019 01:22:17 +0800 Message-ID: <1572888139-47298-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572888139-47298-1-git-send-email-john.garry@huawei.com> References: <1572888139-47298-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse complains of these: drivers/bus/hisi_lpc.c:82:38: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:82:38: expected void const volatile [noderef] *addr drivers/bus/hisi_lpc.c:82:38: got unsigned char * drivers/bus/hisi_lpc.c:131:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:131:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:131:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:186:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:186:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:186:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:228:16: warning: cast to restricted __le32 drivers/bus/hisi_lpc.c:251:13: warning: incorrect type in assignment (different base types) drivers/bus/hisi_lpc.c:251:13: expected unsigned int [unsigned] [usertype] val drivers/bus/hisi_lpc.c:251:13: got restricted __le32 [usertype] Clean them up. Signed-off-by: John Garry --- drivers/bus/hisi_lpc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 20c957185af2..8101df901830 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -74,7 +74,7 @@ struct hisi_lpc_dev { /* About 10us. This is specific for single IO operations, such as inb */ #define LPC_PEROP_WAITCNT 100 -static int wait_lpc_idle(unsigned char *mbase, unsigned int waitcnt) +static int wait_lpc_idle(void __iomem *mbase, unsigned int waitcnt) { u32 status; @@ -209,7 +209,7 @@ static u32 hisi_lpc_comm_in(void *hostdata, unsigned long pio, size_t dwidth) struct hisi_lpc_dev *lpcdev = hostdata; struct lpc_cycle_para iopara; unsigned long addr; - u32 rd_data = 0; + __le32 rd_data = 0; int ret; if (!lpcdev || !dwidth || dwidth > LPC_MAX_DWIDTH) @@ -244,13 +244,12 @@ static void hisi_lpc_comm_out(void *hostdata, unsigned long pio, struct lpc_cycle_para iopara; const unsigned char *buf; unsigned long addr; + __le32 _val = cpu_to_le32(val); if (!lpcdev || !dwidth || dwidth > LPC_MAX_DWIDTH) return; - val = cpu_to_le32(val); - - buf = (const unsigned char *)&val; + buf = (const unsigned char *)&_val; addr = hisi_lpc_pio_to_addr(lpcdev, pio); iopara.opflags = FG_INCRADDR_LPC;