Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp240151ybi; Wed, 29 May 2019 20:26:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwH7omYpp/e7s94fIAcuYivPmTHbBKJgE5TwjvZOUccuzGub5eTq9MKoa4YboFWt9ILn1SW X-Received: by 2002:a65:62c4:: with SMTP id m4mr1740074pgv.308.1559186791499; Wed, 29 May 2019 20:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559186791; cv=none; d=google.com; s=arc-20160816; b=UWN1/JehABikYRNP6+NmoOHm+h9sqm78WpT10w9ZFYyw24R9S65vZ6A3ikaSazzYKy M2GNFQcZVNwg4pKnQ4k9hwdgQMX/DhfBs3qm3KWlBXgFrLeQn/yBDnDc8+4SZ/Yn83kj sSS4FybmHncSTrvMHNMEYW0TmlVgOgfcHUypx6XyOgdEe3pytqJb75XEumyAontPfRFZ /M6r8LgUh7DWyZZ+TDUyCX6FQmMJ83JmXX0rxx3b8D1ErLprxUegAXz5G7trGTLSoG8D JyCjCnak9qa/+b15SUThRrVPpiacv9HtHzFcroc4BfHGY+AZ/TX4/hETX5Z/dL8hpyoC Y8lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n8piMb1h8e1uUVwPgLsRs3qu7xZ1TEUWWNF2gZF02EQ=; b=CLFcRXWgx8UCz1PtH1ubhk7c2Sp32nFWqtzVrlSXfjKrTfOKUlf96wQohVpnJ5DYx1 RCZfc5avLTTdVwa10OgQUhuvR776Bh2AjvM+7vFuhnZmp+mBl0IGHgxljFHdokGJQEmw 75zd1x6/AagByofbAwO3PNqMgxZdZ9vrajjbO1iBurL/gQ1IiIGbforhd4WaC2OeGqaG r17PRZ1P/x1YrkoYbe1VoAqvzRNkiiKMUkl4ze5gqwhhKegVwZGE5Go3rz/v92PVGpLn N6/0l4EQv/lKBh++edEThXNc+UkzeK1N5iX0knaFzyeUVYTeh6oUgMSvTcESMjUlMyYN HjHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JdrWrCzc; 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 t11si2114039pgp.153.2019.05.29.20.26.14; Wed, 29 May 2019 20:26:31 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=JdrWrCzc; 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 S1732438AbfE3DYQ (ORCPT + 99 others); Wed, 29 May 2019 23:24:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:48978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731277AbfE3DRw (ORCPT ); Wed, 29 May 2019 23:17:52 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB53024718; Thu, 30 May 2019 03:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186271; bh=FK2eOd6gHPjeb/9Nqb6dWLlgwBjcGSNJNwoAgFaYeMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JdrWrCzcPblbCedEqY7kE6YGcDJGVQQva9P+072XIK9Qj8Y/iLFs/Drv/xapWlFuJ 5VgONGmKYmPNsrOhzayoWzwMFMuz4MoUHar4QYOYjdt6vXkdynYdaDfpQo/4qvwLJD oBrkmDGThcq6z6Tav2SC3YEC38eWQsFDKiL57pJQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Simon Horman , Sasha Levin Subject: [PATCH 4.19 212/276] sh: sh7786: Add explicit I/O cast to sh7786_mm_sel() Date: Wed, 29 May 2019 20:06:10 -0700 Message-Id: <20190530030538.397622651@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8440bb9b944c02222c7a840d406141ed42e945cd ] When compile-testing on arm: arch/sh/include/cpu-sh4/cpu/sh7786.h: In function ‘sh7786_mm_sel’: arch/sh/include/cpu-sh4/cpu/sh7786.h:135:21: warning: passing argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [-Wint-conversion] return __raw_readl(0xFC400020) & 0x7; ^~~~~~~~~~ In file included from include/linux/io.h:25:0, from arch/sh/include/cpu-sh4/cpu/sh7786.h:14, from drivers/pinctrl/sh-pfc/pfc-sh7786.c:15: arch/arm/include/asm/io.h:113:21: note: expected ‘const volatile void *’ but argument is of type ‘unsigned int’ #define __raw_readl __raw_readl ^ arch/arm/include/asm/io.h:114:19: note: in expansion of macro ‘__raw_readl’ static inline u32 __raw_readl(const volatile void __iomem *addr) ^~~~~~~~~~~ __raw_readl() on SuperH is a macro that casts the passed I/O address to the correct type, while the implementations on most other architectures expect to be passed the correct pointer type. Add an explicit cast to fix this. Note that this also gets rid of a sparse warning on SuperH: arch/sh/include/cpu-sh4/cpu/sh7786.h:135:16: warning: incorrect type in argument 1 (different base types) arch/sh/include/cpu-sh4/cpu/sh7786.h:135:16: expected void const volatile [noderef] * arch/sh/include/cpu-sh4/cpu/sh7786.h:135:16: got unsigned int Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Sasha Levin --- arch/sh/include/cpu-sh4/cpu/sh7786.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/include/cpu-sh4/cpu/sh7786.h b/arch/sh/include/cpu-sh4/cpu/sh7786.h index 96b8cb1f754a9..029bbadaf7ab5 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7786.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7786.h @@ -135,7 +135,7 @@ enum { static inline u32 sh7786_mm_sel(void) { - return __raw_readl(0xFC400020) & 0x7; + return __raw_readl((const volatile void __iomem *)0xFC400020) & 0x7; } #endif /* __CPU_SH7786_H__ */ -- 2.20.1