From patchwork Thu Jun 30 08:41:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12901424 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB394C433EF for ; Thu, 30 Jun 2022 08:43:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 24E9F6B0072; Thu, 30 Jun 2022 04:43:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1FE838E0003; Thu, 30 Jun 2022 04:43:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C6498E0002; Thu, 30 Jun 2022 04:43:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id F24006B0072 for ; Thu, 30 Jun 2022 04:43:50 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D5DE06141D for ; Thu, 30 Jun 2022 08:43:50 +0000 (UTC) X-FDA: 79634264220.02.05FA609 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by imf29.hostedemail.com (Postfix) with ESMTP id 8707712003F for ; Thu, 30 Jun 2022 08:43:50 +0000 (UTC) Received: by mail-lf1-f54.google.com with SMTP id a2so32502299lfg.5 for ; Thu, 30 Jun 2022 01:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FRwgkTSNohRfiL5f9W62+pqiZh7C0RRMUcztPjMF0+Y=; b=XuSV5nDaJo8fSzAsBYl717/yebW1VwQTju3kxDtZZOkoFdIFYr6buKj8dY9nyzw3zY a3nIjRZAZ6ZntE3rtccSjUVMBh7zF6ppBPAnjgOHEUCao95+Z58cAjeVJ9SonXGeN/o9 0+L9gOGAu7Lyray3CWodEvcD6pkuRN3nD1Op2inrx0s3r9YrblMHhERlvIT1jL3zdv+0 KCc3i36s6ttDv+/IWog/J//2kX51uJb6furgp0LpczO+D6t7vD2BI0Olffl7PtuZH53Z vtY9UlKzrLnx010VoslviDkVRMHgYpWW8fc8kj03WZsIBj9skjF797aQBzfuzLJCOi0a 4iLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FRwgkTSNohRfiL5f9W62+pqiZh7C0RRMUcztPjMF0+Y=; b=Ckmo6cafwGNhU8fjlc5kuIZL01SmaiAnMwNtpDKpbWHvhg653jr/ZWpUl5z5ZSRgzA tJ+laMaFjLEaR4xazQJnUzvKs2xGG7DYNtT25BUUUpgfK1ZxPC1BPZ9Ylsyh/Ttvn1vK lYVyMievgtGgVt3uyIZMyMWwXZvcADhc09sVSNONkh9cCmkEMYEbAc67vAxGow2O8KYl sJ+kLz9szFKRk6QaZrXVy5oPeEm2XauTnAzUScUGjdAlyitp5bDyfjelDQHNdjUHckVq coBW1/SJNCby0Iei6wLx+kzjSFnMT/oBSS/O6J25lKw6T3vRPD0yNwq5XNsYB7DL7Q1K csLQ== X-Gm-Message-State: AJIora/tT8U7deiCCD//l7MjmRW2XeeV775hv08JNERxRD7VXoDvp/KT QbV4UL+Vbr1cq9x59IGOYxCJNg== X-Google-Smtp-Source: AGRyM1uIwKcN0gApoCr24yelttj8AFsK9iNIfAhV3cWCBex2e3fIW5TAUkqsETKUbzrFHPRgVbjXLg== X-Received: by 2002:a05:6512:260a:b0:47f:ab30:d624 with SMTP id bt10-20020a056512260a00b0047fab30d624mr5063877lfb.326.1656578629159; Thu, 30 Jun 2022 01:43:49 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id o23-20020a05651205d700b0047f62762100sm2973023lfo.138.2022.06.30.01.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 01:43:48 -0700 (PDT) From: Linus Walleij To: Andrew Morton Cc: linux-mm@kvack.org, Linus Walleij Subject: [PATCH 1/5] lib/test_free_pages.c: Pass a pointer to virt_to_page() Date: Thu, 30 Jun 2022 10:41:20 +0200 Message-Id: <20220630084124.691207-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220630084124.691207-1-linus.walleij@linaro.org> References: <20220630084124.691207-1-linus.walleij@linaro.org> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656578630; a=rsa-sha256; cv=none; b=BajTHisnWVyhB/Vg8LIl3xRHWM+cd+Dk0QgejbsU1dY32hMfl0HxlT5tTWBIONFm9qtNUC G6gjQEdz8MGLIymCxUQw1x7grQ0npBO/1TrDxcf13hBmmVEl+6j3QUI3iNYQZ3UkCLsqzg ltxPqizn1Mkf9ydgOGz0p3uXG4Za5xs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=XuSV5nDa; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf29.hostedemail.com: domain of linus.walleij@linaro.org designates 209.85.167.54 as permitted sender) smtp.mailfrom=linus.walleij@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656578630; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FRwgkTSNohRfiL5f9W62+pqiZh7C0RRMUcztPjMF0+Y=; b=RZ2heSgjZMiz9q77l7dUqjpGEU4lKIc0GyRAWpLRN7Nr4RjHupLGw4HMi4IbHXUchAvpjT C2Zp4ESfMLHkQRnaFYEs1QkTNEcfeH4gFRmnE+1CUsLYPWp/JIdhuAik3GdbR44DjoRVJM w2gC3A/J6jedcPdx6pZjf+N47R39Y7M= X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 8707712003F Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=XuSV5nDa; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf29.hostedemail.com: domain of linus.walleij@linaro.org designates 209.85.167.54 as permitted sender) smtp.mailfrom=linus.walleij@linaro.org X-Rspam-User: X-Stat-Signature: 1qrqqupbbwhib7okswtsq4porwdk9du5 X-HE-Tag: 1656578630-452292 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: A pointer into virtual memory is represented by a (void *) not an u32, so the compiler warns: lib/test_free_pages.c:20:50: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion] Fix this with an explicit cast. Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Linus Walleij --- lib/test_free_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_free_pages.c b/lib/test_free_pages.c index 25ae1ac2624a..9ebf6f5549f3 100644 --- a/lib/test_free_pages.c +++ b/lib/test_free_pages.c @@ -17,7 +17,7 @@ static void test_free_pages(gfp_t gfp) for (i = 0; i < 1000 * 1000; i++) { unsigned long addr = __get_free_pages(gfp, 3); - struct page *page = virt_to_page(addr); + struct page *page = virt_to_page((void *)addr); /* Simulate page cache getting a speculative reference */ get_page(page);