Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1817645rda; Tue, 24 Oct 2023 04:29:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHngrejrwDRie6wcfA4u66pH5CmsutBLgm73vWRlvtThkVNoBoX1A+fbKbaEbnQcxU1xQjB X-Received: by 2002:a17:903:2289:b0:1ca:86db:1d2f with SMTP id b9-20020a170903228900b001ca86db1d2fmr14774936plh.43.1698146942908; Tue, 24 Oct 2023 04:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698146942; cv=none; d=google.com; s=arc-20160816; b=ZpGhohEoNAN1+/tHO/mqaLZjQPLPmak0EVCm9DbuD/HsTa0rkSH87RR0/vmK3vSoSi U0r/LIwdQ3AgMsOtPuLYtw1dqhWSbCrY6Y/3uitL8cSWcR7Y9flmH2AEz37UJVWW8u+L lglxLxao3O3NMS+MGrZJFdux348JHtoXHlXTuyGpZpbiN78N7jq/uDO13UQ9JCOUc49i bRnQfH6glkS3/agdgs4C9JY62dmBib5/jB9Bc+Me9ag+8J1JYBg5NcAMzDEvducIvcph TBO/waA+Iqv7qeTKm6sxA4Zp4l/L8zrmruVrXYXgGSXxhzuLUZJJXvCWpfj9/A4N/oSi dQ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CX4+doENGmNchlwWpwv+1yjRTi3YVh0wXhBLOXVVrzE=; fh=jsEK9zAZXY2dV4jVawdM5SHJOoSNw+0DPdQkMrXQPzU=; b=dq/xWZWdkCbVJNLMS0EMXhakuXIbYtwgoaKURN2I4bTJM3KO6+IOS9iy9WWN2SiYeH TdXhUb8ekVgNoBNWV2oVEXzByq4xjNkFbDPzR05iDUV++G4eQrmO/eDffffPDw1/GTix ftGizWQDcGupVO9I4BoFq74M5JBy2WXWGORF5TTboVyu3HwbgR65GQddJ2bMr3FcIjvM Z+WdNnWowTJknt5dzZRhWi+Dx+ex0A8BlwLE9N3OOdrG4e5qcEVRxESQ5c8ZjqcxitQA eG9O8D/UvncxRFEQDI6p7oNgmfk4i0gQ3ALG61eyykLnGv4r49gyR4AwWKN67Js4UV7R BGvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Njhyf1s/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i9-20020a17090332c900b001c9c108bf6esi8319098plr.387.2023.10.24.04.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 04:29:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Njhyf1s/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 581B980B26B5; Tue, 24 Oct 2023 04:29:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbjJXL2v (ORCPT + 99 others); Tue, 24 Oct 2023 07:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjJXL2u (ORCPT ); Tue, 24 Oct 2023 07:28:50 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DA74128; Tue, 24 Oct 2023 04:28:48 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1c9d132d92cso8264295ad.0; Tue, 24 Oct 2023 04:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698146927; x=1698751727; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CX4+doENGmNchlwWpwv+1yjRTi3YVh0wXhBLOXVVrzE=; b=Njhyf1s/QWkeaHdK34rzxZqNZRX8tFKGfAjLGyfwmMr+KpKVhSuYdcNr09hhREN+s2 DFczBtQIiblfsteU8dK9aHdJA6CjBFMgDbeXCz7CCqItxh2epYk45VW+2RiaY6MPJztl z+Dp1OjasT6WTc9BeAILGRI2khHOcBP3bXN0pUAKakW+rOtnKuh6sgZbrF6UDkngrOmK 3GT44PJtAJ1KRye5uSJziKdy+xQDO8PqGo7Ws+cVTII6lGg80Wbyqmxr/tRBY3oMy1rS X4SscLmNyAwsJK2YkYz4DMoSoJ9E0GXcAdwgqox0rHly9nDmnJAygj+iRdrnwtb+AbVM sEWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698146927; x=1698751727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CX4+doENGmNchlwWpwv+1yjRTi3YVh0wXhBLOXVVrzE=; b=ZWDqFVjAK9OBS1PEEU2CSS1r2jAYXSVCHAyfQUm24hhqeBYOSqsIWPwiTK9tEIYXhh 9i+1zb/e4o838/h+RSyl++JZRpNL4V9e5eMmxKeojb4f3CXhoLWnNJoemZcGGUFSk726 q1eSdnSAOBD8z0p5RPfPh3IB4xREDIsdOzDs0RFtw2NALLcNOWOZo/4K2tikIiUDcIhi /RWwtyZhKzBpYgYMuynFgJ0ETV7bnP1VgBCjkQNROJjMzpI+yMpE5215mMX3zkxewvUo qtNYb3XLPLI4XucvjuWoN4fN038OEeAKo1GRs56b/Y9glWVILDwBRwr70dMH7JGeQ4pV nGQA== X-Gm-Message-State: AOJu0YxkQDPVAy3RhXyWprjPIkTX5+HrJiZLWKlOSy09t+xlQXg90msP OMJcloHQKu6vPMBTNQoOTsw= X-Received: by 2002:a17:902:dac6:b0:1c1:fbec:bc3f with SMTP id q6-20020a170902dac600b001c1fbecbc3fmr11428938plx.5.1698146927571; Tue, 24 Oct 2023 04:28:47 -0700 (PDT) Received: from abhinav.. ([103.75.161.208]) by smtp.gmail.com with ESMTPSA id q13-20020a17090311cd00b001b7f40a8959sm7219640plh.76.2023.10.24.04.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 04:28:47 -0700 (PDT) From: Abhinav Singh To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Abhinav Singh Subject: [PATCH] Fixing warning cast removes address space '__iomem' of expression Date: Tue, 24 Oct 2023 16:58:32 +0530 Message-Id: <20231024112832.737832-1-singhabhinav9051571833@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 04:29:00 -0700 (PDT) This patch fixes sparse complaining about the removal of __iomem address space when casting the return value of this function ioremap_cache(...) from `void __ioremap*` to `void*`. I think there are two way of fixing it, first one is changing the datatype of variable `ghcb_va` from `void*` to `void __iomem*` . Second way of fixing it is using the memremap(...) which is done in this patch. Signed-off-by: Abhinav Singh --- arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index 21556ad87f4b..c14161add274 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -70,7 +70,7 @@ static int hyperv_init_ghcb(void) /* Mask out vTOM bit. ioremap_cache() maps decrypted */ ghcb_gpa &= ~ms_hyperv.shared_gpa_boundary; - ghcb_va = (void *)ioremap_cache(ghcb_gpa, HV_HYP_PAGE_SIZE); + ghcb_va = memremap(ghcb_gpa, HV_HYP_PAGE_SIZE, MEMREMAP_WB); if (!ghcb_va) return -ENOMEM; -- 2.39.2