Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp332945pxj; Fri, 28 May 2021 05:13:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHOzKtwk3crFs2y+luXOUh5K1wkEyohFZ98Bv+KCMyF0wOjdXUbO+a8Xp45j2AF8LCXr0j X-Received: by 2002:a05:6602:3359:: with SMTP id c25mr6662902ioz.171.1622204004326; Fri, 28 May 2021 05:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622204004; cv=none; d=google.com; s=arc-20160816; b=JO53AaojMrstO6sv/h5ZHqzheIobT6enkY5md1UmQ/a0FoQrneFgKYgCLWs2RmEQTJ e8kCrk/uQkztbvynx0FE1iXDO5q3LK04c3l52uWkLv29od9FEjEZSVFej78SwYOYcTiu DDAjAPQnj8J14XdQWcH52xpTJd1YnI6soxmTKTw4g4F3pBbr5GrzCkPkGykkucmtjexi DPzj8gmwkP//OYQqi+9xY0JmOII0MBcsrBpV/GAD2ayIb6yTRpkA2pbF6v3SgyBmDTc2 ZuEaDtMVJlza+tmbRRIjdHsy7dTMZZyGoQTL/AoWWXqCb7Gutw0IcBQ+9ElKFSALOZlW wagA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:references :in-reply-to:dkim-signature; bh=Ytw4YtazLS3OSWqWy2P+H1yFNTwlZImVQDvQFxKBdRg=; b=i00ZJabQ5OUT3jp8ryzjQY4SrLt1RtwBlTHuuIY3ty++svawqKmk3bJW4PS3jgPU5p 7UzKyTNpgUNp/yqc/gYE9CjgDx25uV3jCHHmEQ6d2n5WZH1YRpg9IA9Cl7DxaDZyYmyO 3cdGiAk31eAldYRz/qClHimRK6a8qXsKztM/aV23Y03GXMcEiHnc9yYD0Hj/ldvB3GCD kVSKnz6N7AdRfbfMyaR5nXe9ZAUMwYtesX5KWehMcP3DJvm7b+caC/UvNVDd5i/Sb+8x oL8lkbT8rw0tjL1akZxRMyDJqC7kzW3CWx4l6oG+59V8d/1lRDSn3XD0Nw60S2SuAROU f0EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=n1uuabCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o67si6165066jao.17.2021.05.28.05.13.09; Fri, 28 May 2021 05:13:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=n1uuabCv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234497AbhE1KNP (ORCPT + 99 others); Fri, 28 May 2021 06:13:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236076AbhE1KNO (ORCPT ); Fri, 28 May 2021 06:13:14 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6360C061574 for ; Fri, 28 May 2021 03:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ytw4YtazLS3OSWqWy2P+H1yFNTwlZImVQDvQFxKBdRg=; b=n1uuabCvwzP5Fb5cCWQjSdE7n6 1p8/rW38uV8tafus1LvqLODKyQar9lyagXw32V9FumPBFzLmkNhnvny7tZCDyLEv67WLq+9IqL0RL rcanmgSJzukXYeGzENhWQyFMpDeKuI+z9nTYsl5D7arksqxjf1RTO7wwvsSKxqmHembcCFr3F24t0 eCDos5P4fv7IFHxQDzI32plOePV2T6mWhAvnoMRTdh86EVe0SO/42rmxqbo/rTdsKbmBpo4uVvtos 4x4ewVMVYI5dZIconnz1mFvMmNhk5uxQtelQuOr0NY9SBmlCeRfR7Ax8M3lBgnCfPvIZnz1JpRJ9K VmpCId8w==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:57310 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmZSm-0008F6-0X; Fri, 28 May 2021 11:11:32 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lmZSl-0005Sa-On; Fri, 28 May 2021 11:11:31 +0100 In-Reply-To: <20210518120633.GW12395@shell.armlinux.org.uk> References: <20210518120633.GW12395@shell.armlinux.org.uk> From: "Russell King (Oracle)" To: Yanfei Xu Cc: rppt@kernel.org, ardb@kernel.org, linus.walleij@linaro.org, akpm@linux-foundation.org, carver4lio@163.com, tiantao6@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/6] ARM: change vmalloc_min to be unsigned long MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Fri, 28 May 2021 11:11:31 +0100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vmalloc_min is currently a void pointer, but everywhere its used contains a cast - either to a void pointer when setting or back to an integer type when being used. Eliminate these casts by changing its type to unsigned long. Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) --- arch/arm/mm/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index c06ebfbc48c4..206c345f063e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1123,8 +1123,8 @@ void __init debug_ll_io_init(void) } #endif -static void * __initdata vmalloc_min = - (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); +static unsigned long __initdata vmalloc_min = + VMALLOC_END - (240 << 20) - VMALLOC_OFFSET; /* * vmalloc=size forces the vmalloc area to be exactly 'size' @@ -1147,7 +1147,7 @@ static int __init early_vmalloc(char *arg) vmalloc_reserve >> 20); } - vmalloc_min = (void *)(VMALLOC_END - vmalloc_reserve); + vmalloc_min = VMALLOC_END - vmalloc_reserve; return 0; } early_param("vmalloc", early_vmalloc); @@ -1167,7 +1167,7 @@ void __init adjust_lowmem_bounds(void) * and may itself be outside the valid range for which phys_addr_t * and therefore __pa() is defined. */ - vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET; + vmalloc_limit = (u64)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET; /* * The first usable region must be PMD aligned. Mark its start -- 2.20.1