From patchwork Mon Jul 29 01:47:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744138 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 F2143C3DA49 for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8142F6B0085; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C4506B0088; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B3BA6B0089; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 515196B0085 for ; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0560D1202BA for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) X-FDA: 82391104362.19.5D70562 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf20.hostedemail.com (Postfix) with ESMTP id 4C4391C0011 for ; Mon, 29 Jul 2024 01:47:59 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="BPrNele/"; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217626; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=SSSqKf5Io6+hxyWT1TMyGbatrbXdtitMoWeB5xMHysBnwGH0nIU3ALtoS/9aMZ/VBHYGiS sMhh/Uhg4XIj/jI2qoBSkTHd6Cr07x2RLE/rrW7MewdDelsB37Ihhz8uIN13JYs7MujseS v8oLfIK5qtaC+S9efaG630WDfFpC+Jc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217626; a=rsa-sha256; cv=none; b=5Jq2UKyGN82LKwP+4By7HQzD5TMpk3zSReCCGruVCz35+Xn94MBbma51y4mxqjOHvQm7L0 q9op8ij6k+1wfFUJ1m8HE9WsZYdEuw8W4BproFQYXhWOov5IswM5Qk7IPpRj3Fgi4IUIMj 7v/QBY8YTslW98p/LnuZPOh34tUtRig= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="BPrNele/"; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52ef95ec938so3431125e87.3 for ; Sun, 28 Jul 2024 18:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217677; x=1722822477; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=BPrNele/lw8wH0mdJy2Ln98tooeaypPO9eeveKvlMdxzMA7kuemiZfa4qooXuitsuS QV79Q+Eu45Q6sAY+i6PyVi2BZ36qk4RF5gxXYNzZdOlK1nZuChTVQjyi7+lyq2+0Vsv0 hAZ+WoCXg/fGIDOP6MMLbecazX6mCYSscCyi+7vIStrKB7V79xP+eKbOt5A1xAG8lfwe vI2zsZnHFUigqZWkWZxElRcoW4b6QfBpOyc0yQbUTRP2txVNu4K/mjqtr4ujTk8KRkRh tky3mH3XUNBeyi9SIyTgGNZESjCBf+mJaMJKzARqko15LiHQ0bRyVn9CwkuyvCoUDMOC Bjyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217677; x=1722822477; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A8kkYcJa59kQZUgKarOlDxJXHcnI7ps1B8yQUjcTF1s=; b=Ts/FXYNK1PWEtLP8BfZgCuw4/0Ja5DQslhdoDwYqp+PqEHidnbbFVQYee6m2sRmGTp Kk6e3dwyV8mgcO1+0XFSOIKKQ38ERlW9/a3qfUsYa+Iv9EH9TJnLXqEFMaaPFEj43Jr1 M/XZs2yOiE80eVKqoW8Hgb36EPs9lYWqjWW6bTYzdWEZb6xgrcTelPrtW6Wj+6rvge8U e8tIgXbJI+SNDGVP/TgW1uF+nlqWvgIcHVz+6G9cc1bhjBiXngDIHfk6uyfEWiZI7yYW rP3lbCedIf6L4qTZKC2wzKbf9PbVhkTJTZcWYmHtTNvWUZMLPTGOVUYz8osEE5IAR7Pm CbbQ== X-Forwarded-Encrypted: i=1; AJvYcCVmnTE7a453PkQE9V8X/EMsqdIhk80yc2HiqEPwTkxLT5ZGAGvFurxM5MDImmV3lR+USdvGhAUvmVn/zKmMBCbfgDo= X-Gm-Message-State: AOJu0YwPAtdrI39TUCuXom8rmdrUrySotYQ4zAeQM/ISgbhI/V8ku3xE zOPZHSUf2CPZjLP7oDHLv91vvQxVWHRECWS0LaL3+hkJHr1QkAff X-Google-Smtp-Source: AGHT+IESUw+4w3oWeHrCw8KQxsl+nRkSsjjtNX7KBs4B1idaR3MyPaPXaloqUBplFPAHIcgYSmvDnQ== X-Received: by 2002:ac2:4c56:0:b0:52e:9b74:120 with SMTP id 2adb3069b0e04-5309b26b690mr5086361e87.19.1722217677030; Sun, 28 Jul 2024 18:47:57 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acadb8072sm441807966b.196.2024.07.28.18.47.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:47:56 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 1/5] memblock test: fix implicit declaration of function 'virt_to_phys' Date: Mon, 29 Jul 2024 01:47:21 +0000 Message-Id: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: spbo39azmq1uiqyu8t5bbaatsubzeo8w X-Rspamd-Queue-Id: 4C4391C0011 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1722217679-389917 X-HE-Meta: U2FsdGVkX190ijq3KdWwX9RznsBJuBwFG63gEm3eNE4kuo+G8w4fKe1hazQkBOKp6UOPUvfAHn0mYwEHyE8PJngki7hPNhKMS7MkhPdm1x3l8Jf5Pnjb/4OB6/Ubgim3WkRN0QI+8y8ivHDIaov1BjPvAyKDR2NpAx7jOwVQHHPVMnif6bE7JX0O/4tRVShSyLiVgk93EYseXWLPYanbP4q+u3lCB+W5u/uZx7ODn+CYXn974fDwX75CmyjLk3CAra4leI6qs0HZ8U1SqxF0o0v0ci203ztJ7ckwusIXYfRTx4zzCWFh59LSN/nyvocwTOWHMRoPqS4AftCyxEIaptnkf/PSLAYFn0awgXPfW0JjsQ6xi90x1buMgLmWSPyI6VF5P6NGe3TDud+zCMS/vDT/CuHMmGy43ZLPoy+aT99ppZRnkxP/RWI3DsA/MKNrey7F+3B2zcO71oltZUbON7VupdfhLUD3HMrF1++YGEgjpMLtiMWcDuqx1PH5DZ9NxsTyVK0jdFffRK660U1KBkD9zJOZ/LKZtt0XmDX7IjrytxYsKul8jKSYTFUl9+U1A1ia1+hu/KKWN02VZb+eskmKfmmfooeNEfuwUz2ktZn1XZR6eHbh/kfc1vXxOUIJ18xJ2JD+V8XPewyotbCcaUxnrNbypavtRwEdLOuuvtBEEUf2RwBs3A5sTUBvVQr5qBpIDg+pbVVJr7ZQ2aE6jMx+BzaJKHulC/IH/Daoec2nHBh+VuWIcReH4e31ld3CmuypjsdKKhajGa1KjtGgDUtu4rygnQz7niX0jeVsK4qjqtf63mgdQyNcDgN5bB5nqhvYXtKunjBcdcCgOEbFwai5h8Em5me1hiR6h97XP4denjmUcUoyRv8k7NIYzQkp1kEyruAn3DpZlqsNsM+0muqU/nfDTSQDQM6mD5gLvmtuR2kOKtSCFHBHs7N396SoMms8QFr+G+9FozMaz3S 6aNr2/vD dZfo92H/Je2KOAnX3KIkxY4ioS9/QBqxj//VCdhAoGn/rZOhRQ2Qz0FPQAX7r2R/9XmjQFE2PhJY7I5Qo//ZPaV4ZJxlDV3seKboMpRY+52SliBHbZ7GgQBjg7SucVhVm9yNCKd3KROF0HmSG8UJx/xQHKknefD1DVlIf4dhobRmMcLHcJhwPkKprn0qVxESpwM2tWfITmh/gnMpfZgnuMWpZMDyUoEk2q3S4+yrA3G0SrGCf11jSJjTfrIwM1kVibz9730hM+9B6NSdVQFZUTbXBfj/syYQjqLLVw7R4gfPjV3hJB3eQNvEgTt+wh2V+MNLWb3mscRCn3o1Zxd7AiFBBm0JyiaXafUsjK1BPzyOgieTMAQWwj5ca0p9Ez0xNsnbezsV6BCCZwoEUQBfCvVoFZH3gUaMFFZ06YdeczK5QHmOWdoXBKWz417OgIXT1if1Kp1IzRpz7/Ug= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000048, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 94ff46de4a73 ("memblock: Move late alloc warning down to phys alloc") introduce the usage of virt_to_phys(), which is not defined in memblock tests. Define it in mm.h to fix the build error. Signed-off-by: Wei Yang --- v2: move definition to mm.h --- tools/include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index cad4f2927983..9db45c5d00fc 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -20,6 +20,8 @@ #define pfn_to_page(pfn) ((void *)((pfn) * PAGE_SIZE)) #define phys_to_virt phys_to_virt +#define virt_to_phys(p) ((unsigned long)p) + static inline void *phys_to_virt(unsigned long address) { return __va(address); From patchwork Mon Jul 29 01:47:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744139 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 1CEB9C3DA64 for ; Mon, 29 Jul 2024 01:48:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 247EC6B0088; Sun, 28 Jul 2024 21:48:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F80B6B0089; Sun, 28 Jul 2024 21:48:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C0096B008A; Sun, 28 Jul 2024 21:48:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E3F956B0088 for ; Sun, 28 Jul 2024 21:48:01 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9A7408019B for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) X-FDA: 82391104362.22.21EC1BA Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf04.hostedemail.com (Postfix) with ESMTP id C5AB940005 for ; Mon, 29 Jul 2024 01:47:59 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YWIroAhj; spf=pass (imf04.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217676; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=BbCh2qq+GqJnDj1NLZnr9Rls+DkMZwrRCOx9dR1Do1E=; b=G2Cb+EeA1g9/GTwfbxEW5h9Qo7fjpvIAd1ihyQCS4VWmAdmw/Iy8mEQfjOYOlI3L6ISDFO eTnnaKWTiNj7JIudH1g+1ock3VhFwxkg22yBjOLenCkASG5JVUSdi00UcbeqIJQvMJKeHC L4SdFo5m/BuFJsOmxkKrpYCNwtyVkss= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YWIroAhj; spf=pass (imf04.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217676; a=rsa-sha256; cv=none; b=IbOxmm4GQuVzDaBFBYJe41DDs1yLhQHXV8XIbaQd75MZYjJGAVIz4q3jVQFwLosAF2cAqL WrVZOj8eDmFBsm2gQSZnfbjBMJe6trLizcQQ5y5zrCHCGfmzxUZcX4Sna2d4/OxKtTNggA AtPcqG14klwjB+vsb2ypnjxdtJfnui0= Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52efa16aad9so4300620e87.0 for ; Sun, 28 Jul 2024 18:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217678; x=1722822478; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=BbCh2qq+GqJnDj1NLZnr9Rls+DkMZwrRCOx9dR1Do1E=; b=YWIroAhjKQ6v2PIimh3V6N4sn0XMa3CVQXlSLVCyDCsZ49XsD/ymOlIJBT40tzXPC7 FCKhgNm588eF65a3iEpajQ1OnzsfOe8ZmSWXqtFoEV1+wDkeneE7t5taThivRv19O/vU 357myqmbgres1f2BxbOG4gETtgYdjiCjkAcjOW+6o35RukZteswgzRC7PSP0YZmT5cp4 1SGhYEs8NhHW8x7hTWp46of0XhnVI6zVyR5qJrz8j6piLrklne02dNz+u9FraQk9x/tE 4L3azZfvNpaFUE0pkjlwh5rmIQEYgcE0iPeRwVFu77lqoOQZ4cx+qoW+NEEByne6gfbE uSOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217678; x=1722822478; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BbCh2qq+GqJnDj1NLZnr9Rls+DkMZwrRCOx9dR1Do1E=; b=q9brlCMHzlhJIL5RXSztkDOshsZch9NthkQWQt/85chVBPxMg6kvnc8XH/7iEBoLEw qbM2I+d2HSxhjj+aQnT24xemFgpgZKYIpnEZiicv/Am+fsLKwWoFN6rP+O3L+Yn4vd6J CXK9EOrI9DxiChM2Zrt5Ex4eJYDG2FmZ/t3O2AB8bR8UvQuwuvSqKWEK0Dm+gydsaFIJ EZ6EGciHQ3jQMuVfI97w3jbWTZxWk6Eg599b9fqxv3XWvCauKXZaC/jZVVgsg8p3OO5N Ao7TqqSd8/N78Y6JTm37T7aATZZ9Nu0VdENNOI616TI+3vws7T0ZJXg01BQ6UhSq4kSN TXAw== X-Forwarded-Encrypted: i=1; AJvYcCVRbiA8WR4zALr42XV4BNOJ6z6LHnyw4MjhV+eeCO7uhsYbaRR1b2vbsWQxGXCW3XlTWobRT4jj/zzmWUORSTbcmp4= X-Gm-Message-State: AOJu0Yz/UuvXDEB9c7XDQqJOO5z2DYc+UZaz6lM4XghQb7lRc8fZ7MZ1 iisWOrrQ7aZEoZRTZ6p9cd7is3c9nTMb6amwThF1f80KFfLFMtkb X-Google-Smtp-Source: AGHT+IEVzBqqk3h+Q+ML88j7YQtqbRjU/2MEWf7kaMFlyHzEl7/UyentabOeAYROp50qc9GhPlsyIg== X-Received: by 2002:a05:6512:3504:b0:52c:de00:9c04 with SMTP id 2adb3069b0e04-5309b2c2ac3mr4293542e87.48.1722217677979; Sun, 28 Jul 2024 18:47:57 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acac63795sm448355566b.95.2024.07.28.18.47.57 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:47:57 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 2/5] memblock test: add the definition of __setup() Date: Mon, 29 Jul 2024 01:47:22 +0000 Message-Id: <20240729014725.29839-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240729014725.29839-1-richard.weiyang@gmail.com> References: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Rspam-User: X-Stat-Signature: j6ixqxynihhu6kwk3rs1wir8ymg3t9ow X-Rspamd-Queue-Id: C5AB940005 X-Rspamd-Server: rspam11 X-HE-Tag: 1722217679-702520 X-HE-Meta: U2FsdGVkX18PL2gT/pGFRtQubQ4KDURIDHeUD+TEaZ9HkxSpw9LzQ4wL53DCq4I4X9+8MezxPNHpGVyXW6whbb9PnbWfBRLtxOC7XmYHhseZoXlS9BIiaypEwICxeJVkj4LpyUMRBvv9HW2e+JQ8sNqc/fFkkfXbQHINROJUph8TTuqOgz89vDSqBijlhWLW/VxGe6apaVfccRBtXFiCnwm1a/ISKx1UW6z6ZpLzaJ+F9l8Vij3Kdpna0pf5xmXYQ/4KI0FH6uugTboVkBzmTr+gR9NDpzGgAif0vdJe9UzX75WrTghsENdAAv+X1Bxnhwc5C239TXklw+o6lcZJg8La6u7VuoCHrL7fvWjqqIhhcrB1CufVPMdYiyajpkmWvhx8ST7pw1pVQP3PN9m4eOWX2XybBcHrZQJXcXJi7gT7xRhFIFATZ7A6UN/EVlHj/NzkLIeR/j+gtcshLLE9NZF09P70XoZM/5cCLH4bQ3pMrf9LhIq9k4cyTqDM31AWeJ8iRluCSaP4LxizuOz1ib56Feucm7jnLHZwHtjmB6653XD4s8xX+JWvkoy/fEkv9sX2HtpyuAbpl4kJ5r8zc5s3aADF1m88+1hIi4de1DVxUiMnqquMWZ1XO4PvAHg3vJwNTYcQyRSaB6Y01BRsNJMGDK7Eo5reNGbh7Dr8ldtWERR/IUI0QITqnJbqsyLngaaQw4rGrFE/lqLe5SVk+0nrR0f7vyedRRwcgX+YLCJRcofw0fNRllJ+FQcYUQ/gZhu/Jg3TY49cRht9dA55ciWxTw6wYduNet1n3asZV1s0Tt4eJlTM24sbkwDcFOenxaIkk1uVeh7y90NygPM0iseeWIiHnJOafaM0jxA6U8pY5po3pXZOO85NVIheLQsf1HmLWZnZKz6qPRpb7Sp1I6cUmVrZIwj52fvhq/LI6LoC1ADx3BUV6/0MmsWSHOEIsGGqKXFDq8KrxgLiLSk 6+X7NgbU L78onlShRm3vs5bRi9iF+ASvQKyoiC1suA5DyosMS/mbKA68pe7Q825p21T/KD+Kp/Z8Pee40Je3MYjTqmr4410tT1QoTdfJOwCqcGS4FUDveHmEtmQwyH7gFoZpYRWoya6Hd3+3JhZoJ0bjrEr/d9BUjY6ywJTVN1/hZyimZSWxLyXC+5pnfVPKQHY+OSBNtHdNQm8NGGGKPyGtqOJsx0WAxS8+z795jNwNeoy31le3Vy6mgjQyNgmBxIt1cQFqt4jjUtVIKbRSfmqzDgt0O5KELA+A8W70v8TEcjhSFX/XjdqvcKV6462URAVnnT+QnIjNdFJArnx4rNv9Ak5az+5sU5l/Qd6t6e2jnglQFrEga2iqsxXe1xoj6z4183JXbzGBSAKZPCql5/IqP/Tla6WVrgyiqWa4MEUcaQQN1Cj3lrboENP5n9OgbRRJbLK5OsivQlb+kljGqPII= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000118, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce usage of __setup(), which is not defined in memblock test. Define it in init.h to fix the build error. Signed-off-by: Wei Yang --- tools/testing/memblock/linux/init.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/memblock/linux/init.h b/tools/testing/memblock/linux/init.h index 828e0ee0bc6c..036616a25427 100644 --- a/tools/testing/memblock/linux/init.h +++ b/tools/testing/memblock/linux/init.h @@ -28,6 +28,9 @@ struct obs_kernel_param { __aligned(__alignof__(struct obs_kernel_param)) = \ { __setup_str_##unique_id, fn, early } +#define __setup(str, fn) \ + __setup_param(str, fn, fn, 0) + #define early_param(str, fn) \ __setup_param(str, fn, fn, 1) From patchwork Mon Jul 29 01:47:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744140 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 0EAC0C3DA49 for ; Mon, 29 Jul 2024 01:48:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 110B86B008A; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09B2F6B008C; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E55F56B0092; Sun, 28 Jul 2024 21:48:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C142C6B008A for ; Sun, 28 Jul 2024 21:48:03 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 637368018B for ; Mon, 29 Jul 2024 01:48:03 +0000 (UTC) X-FDA: 82391104446.23.53668EA Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf17.hostedemail.com (Postfix) with ESMTP id 980204001B for ; Mon, 29 Jul 2024 01:48:01 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Eb4ZHsu2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217638; a=rsa-sha256; cv=none; b=FpG7QTgJFzVyO7+Zu4basqAYNY9uxDLFJUXkk0/uznFjeFkE1gNmrWsaV847q695Hhu5LI XQ0uLINBv1rkm+IiypUDOdUqiL7RjSufVJsXH6k3zAXdfgdhxxyTXD2iguw/DnDs209++z DuBDkx0MCUA95LD+QCoyJH+RivgU7w8= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Eb4ZHsu2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf17.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217638; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=qyYOlz2K4LoDSHsLe8705YksXRaxa+aqBd+KCuRDSeI=; b=8pGYJkIohsvoP/7+vB5/yQLm3V9cz5ivH/12Juk3dPZ6+Lj7VIXjpYRtsfqjduJCDz0enx i6F1+OjyGvDdonA/0qjdnUDifpuZTrBsGo39QqzJrfeg9J+bilszXIziDEQiV+hWOco391 yCREsFfmQ7euQ4c7MeVCO14mcAAq5Dc= Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ef2c56da6cso34165091fa.1 for ; Sun, 28 Jul 2024 18:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217680; x=1722822480; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=qyYOlz2K4LoDSHsLe8705YksXRaxa+aqBd+KCuRDSeI=; b=Eb4ZHsu28Hk3eENISdwOPaMKYvqgMyMhXH049tydTIy+mnB/tdfPwb4fAW7bAIZAyN 28wqadkyS/pM922ZHvCOYJfDXwGzxurCC6+iGNOAOhG1gespcaZMxQStpUjXuyOb5SwB 7DJzbGNd1eJBvH47JYqwLFTkN1fLaxZ7OgtvYgNCt+Sd8arP4bR3S+DITF0d2DgIR0iC dgdzrChdLvUHTXfmEKgSsvJ00cwaua7uJtAKEUv/jNCazbF+0j3owmK/kF3qKApjUEfm yJ6q7pdYGs0iJZzgxt1aVdRFm8bJYEt3OZ0ZrxvjO56xAQPfVz09n9B7fz/qaL1AkRCB 78dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217680; x=1722822480; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qyYOlz2K4LoDSHsLe8705YksXRaxa+aqBd+KCuRDSeI=; b=ihBBHod1h71uzQCgv12NLi85yp/dDHCLgqop/Ia/BO+yHGDE6GgdAOyMURTOuh2hfX I2i1E3Y+VSvgDfOTvncdYW44jEL3INZvX+yWAa/SzWEGDRljdh4IPHO4QvIXX2yOSlbL vcu2fayPP6FPMr2lXoaS1wCYoAZhV5BlSBe289/GgUFt+NyrIFCKS2/CTtsZ4zRdpwG8 UyadZJi1xwgSuWb3QROmM5krG3qpHFjs1VoiRYV0hFrCUQVzSjAmD7esESKAzUBzpXHe QxRmoaHEJy5MZjl/P/nXjVJjPsTl7TApEDmi/mq6KkOVS96SZEV2t5VeKhpyDvWxDx7J pWgw== X-Forwarded-Encrypted: i=1; AJvYcCXeMqwq1pBI25+XrzDGGzlohTt/d8wFDi6F3ibLbJmhvWB8Fo6F5i20CjIg0x9NXtOHHVUZuU/vz7qFetokUwXOaTM= X-Gm-Message-State: AOJu0YxzXIbUyvB65lzS7Ll+XM1SYDDfMrjQWQc4Bkl2bL3zJbhI9Q67 Q6RbSYZp02+ejsV6PZzkS7ph/V+AX3o3XvbquKywy5dSOdSCvEh5 X-Google-Smtp-Source: AGHT+IE+qlzpCq1UXhhU4cq/cBAQcMXhG/k6viozn73E8gKzNaEC5ly6j9uhxoFrE7HgKYt2maBkxg== X-Received: by 2002:a2e:8686:0:b0:2ef:2a68:beca with SMTP id 38308e7fff4ca-2f12edd8220mr36122661fa.24.1722217679622; Sun, 28 Jul 2024 18:47:59 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac64eb7c0fsm5053001a12.62.2024.07.28.18.47.58 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:47:58 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 3/5] memblock test: fix implicit declaration of function 'memparse' Date: Mon, 29 Jul 2024 01:47:23 +0000 Message-Id: <20240729014725.29839-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240729014725.29839-1-richard.weiyang@gmail.com> References: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 980204001B X-Stat-Signature: 6jx9h6zu8wf5mpc6t4tyeu6k3nbfmxp7 X-Rspam-User: X-HE-Tag: 1722217681-771265 X-HE-Meta: U2FsdGVkX19CqEmS+6NZnPQg8AREDYwq+uVLYXGHK6JamEsLsUvKRfvWmk4zZ4/CrqoYiIDEEAZQ0lBQuAkeYg6L6FWTSb57uDcVC/qDeg1FxP9q8rF9thZtM0Md+tb/OCWqsagqgLZ35SMyHJ+YiNwgs4FIwjAeUF/9z9nKXBMtpezRvu+iXdogW0Za2kq/oiiZ13Z+kwiPAJu1xVqro86EfCfCQX3gesSQkoD6zZ9g1i3ISTL8yK6b4s9YbeTAs0f7qON8YwSauR0gkaa1ED1bHYxkYmK9uj4Pr4fKs6QA/ZXz06en9/pKV9t2RfLd0Cqg7Jbs8WD02aHNYxHjredABh6Rp+zisr/910sTB4bCWLYun+2A7dUMIxQ3rhSFbCi9Ozwod0Cr50swM8cV0Gn9U09sILSMf9e2MqtPn9eKvGtFaeg2fJ+/0wDIiOOpfvzXYH8xbEkVEx0NxLvWH1A9N268wY/34bC55pzB/cTQeWKVP2KH9R3Nj1fjFo+5tCEKhOaH3jieCaehFpOS/PfJO1AFRxDDikIdLCXZ8hVEdY8dMdBRFshGmNnb1gd3GIIaVYkfVHPopintxu8BgFa7QgKU9n+tUCeOXvSgveFLbVh5shpuKW5GAfLjeNfEjXTd5icDKlvg6Qz5TV8tX7aljMZyzZoiRbCubmbCWsi62YLEWFUFCFPbDwfJNRCeMCG9a/pc3pDx/rYRSNnctaphbyisxgwQFHceaSQRHRO+4xZGncHXMfBAEkE08e7xUZ7sgx4vKF0m0QKiXNzhCjDs5Zm4MWREcULJbaeHX1Hit8LiBwYDX3/rYRtKqNbYZBk0/MXucfJYal8FnaHQthPK1CMGlTHjqMl9W/9UTv3Vgq07kq70Mt+M9lmmA+lx8pcWDdb54eMB8CvU6UTzkxbD28aTJaw1cpOk2MZFwzsZTooVkM6XrsTHy8AGPeDKJ+yCCo1sm69wlHkEt53 yskdA5it DDrKx0ibnmQqP1tkuny7sGK6G2zSBYYP1i8f1Z4MVy4XfCYaAUxrjxh61e1DtvfyEkGVMFBtRloWtg4dkYpo2JaRipJqM3pf2VIEop3mMx0PjDlQ5zh/EpL0M+blNYyPLZHdQe3hLGLwMi+6M47m46JcfQCQrgKxZ86dqqRvL2jjzHOYAtxzcjdIVp7X7EDu2OmH3kGyGesKGS9OddRZIsa55SSL8MiRH63isDdM9clfz870iLb9E/UCv/H2q2QfifTUutpqQHrfhdnN/A02i7ppmIf02S8NCesftZXDpsxl1a7sYPw/Q7FzwXGUOtd7lSLZKE/OJDKTpbueAm1miKozUIc6ChhaYkSbl2ge0AIdmlh8Crr9peGt3MD9C6OZZxsiSJk4V6YAnynKLfyDNDxpQNIcSRi/zQwAr 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: List-Subscribe: List-Unsubscribe: Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce the usage of memparse(), which is not defined in memblock test. Add the definition and link it to fix the build. Signed-off-by: Wei Yang --- tools/include/linux/string.h | 1 + tools/lib/cmdline.c | 53 +++++++++++++++++++++++++++ tools/testing/memblock/Makefile | 2 +- tools/testing/memblock/linux/kernel.h | 1 + 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 tools/lib/cmdline.c diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h index db5c99318c79..fb8eda3019b5 100644 --- a/tools/include/linux/string.h +++ b/tools/include/linux/string.h @@ -47,4 +47,5 @@ extern char * __must_check skip_spaces(const char *); extern char *strim(char *); extern void *memchr_inv(const void *start, int c, size_t bytes); +extern unsigned long long memparse(const char *ptr, char **retptr); #endif /* _TOOLS_LINUX_STRING_H_ */ diff --git a/tools/lib/cmdline.c b/tools/lib/cmdline.c new file mode 100644 index 000000000000..c85f00f43c5e --- /dev/null +++ b/tools/lib/cmdline.c @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * From lib/cmdline.c + */ +#include + +#if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +#else +# define fallthrough do {} while (0) /* fallthrough */ +#endif + +unsigned long long memparse(const char *ptr, char **retptr) +{ + char *endptr; /* local pointer to end of parsed string */ + + unsigned long long ret = strtoll(ptr, &endptr, 0); + + switch (*endptr) { + case 'E': + case 'e': + ret <<= 10; + fallthrough; + case 'P': + case 'p': + ret <<= 10; + fallthrough; + case 'T': + case 't': + ret <<= 10; + fallthrough; + case 'G': + case 'g': + ret <<= 10; + fallthrough; + case 'M': + case 'm': + ret <<= 10; + fallthrough; + case 'K': + case 'k': + ret <<= 10; + endptr++; + fallthrough; + default: + break; + } + + if (retptr) + *retptr = endptr; + + return ret; +} diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile index 7a1ca694a982..d80982ccdc20 100644 --- a/tools/testing/memblock/Makefile +++ b/tools/testing/memblock/Makefile @@ -8,7 +8,7 @@ LDFLAGS += -fsanitize=address -fsanitize=undefined TARGETS = main TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \ tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o -DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o +DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o cmdline.o OFILES = main.o $(DEP_OFILES) $(TEST_OFILES) EXTR_SRC = ../../../mm/memblock.c diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h index d2f148bd8902..c16d9cd2d1ae 100644 --- a/tools/testing/memblock/linux/kernel.h +++ b/tools/testing/memblock/linux/kernel.h @@ -8,5 +8,6 @@ #include #include #include +#include #endif From patchwork Mon Jul 29 01:47:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744141 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 61F8DC3DA70 for ; Mon, 29 Jul 2024 01:48:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E09646B008C; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D91B56B0092; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5A4E6B0093; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 9785B6B008C for ; Sun, 28 Jul 2024 21:48:04 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 221368018B for ; Mon, 29 Jul 2024 01:48:04 +0000 (UTC) X-FDA: 82391104488.11.6357E8C Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf05.hostedemail.com (Postfix) with ESMTP id 6C0DF100010 for ; Mon, 29 Jul 2024 01:48:02 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=TbQZZ1dW; spf=pass (imf05.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217656; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=3+JPYPQt1yTaGk3WXPjbRRDMHWDKLDoRYgnwrc901qQ=; b=CpgebY8Z1HRyJ44c4tIAmx1DzA0f/H5u7Pa3OF/WxPc/jqpsybK5iyuaP6YC0O2FbHliUu Hdfxo7yLD2Swkb78cgmGk21OENxjgHZ4aponmU2+bchi/sb4PnrHKxToYl/knuVpYHCD9p xsXl1U11OAJzRs08BrEkp8aOjH5t+Ik= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=TbQZZ1dW; spf=pass (imf05.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217656; a=rsa-sha256; cv=none; b=u5K2ncjtUtHHeNdprLNwr4nXZ1b6BlVZd3B1g3FOIYkpVqtpUG888I2yr3SZDLAwgB8ezv fFn2Klk3qocMETTwehdI6cJaiKDy9e3aQVKPfh+Ixm3n33xdMfM4Myoz5sMKtJCCnSHyda 18BHlHZsiSK3W8miNeVtW0Hm6P9Dzes= Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso4849084a12.1 for ; Sun, 28 Jul 2024 18:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217681; x=1722822481; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=3+JPYPQt1yTaGk3WXPjbRRDMHWDKLDoRYgnwrc901qQ=; b=TbQZZ1dWbs8sKZeW+Hevf4i7aHAVhRDa/TugO4Td94cMIDeHFLNVrCWzKTVj1fefZS XFTbe8BzYcSOA9Hg8FgUCxBGmHvD+cyTzXjPpoEGGAmwrulziTZVMLKFwnjlevXMVKPl 0bmH0AwK5EgHFf5Uvkae/JTLTw0X9V12iJE/sd1h+KGCliyjGU3HnGiXxUVytUa3/L+g cjnipeZThTedIinSL0kc4SgFdi5zreZu2JmkHEviA1msQbQIukJ3pLTtYtDxND9j/3c8 UhaxxeG+Yrwnaw9Nckulg7FShFqaMKyBku2tZzEtAoiVZbixDQcHA5jCYre4CEBThwC5 Vrjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217681; x=1722822481; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3+JPYPQt1yTaGk3WXPjbRRDMHWDKLDoRYgnwrc901qQ=; b=e2fOntsqtb0hHeE0V1YD60QQubZTwjel5MXEBDu95uRMYWcyLqS2XWwmUlFPjQTOJ3 TJ9TUmSwW4s0jylHaztMVOq2CiKHttT0glaHvB8ymOAw9KxwwVRUCRfaxWXPn7JoRFmf XySXRAVYZEFqMekb9n2asBI91dEthaOHDYa1RsLwp+Rw7vyw4AclBJr+EcT0/gSHfCHt QQVT+Sqhj5I/Jw6Nf9IZxWdgZyEiSlRKqRChdSGoo/78oRNtG3Q5SOkfZniDhzHfoWWT nrdLgK4mSwfrXW8IHTyVbA784oltikZRdM/U8MVl88LP8EvQI8wAjcCNHnoewt1niGD2 JccA== X-Forwarded-Encrypted: i=1; AJvYcCXXrKYkoRMyBHlgZKjJYJ3HA1A5vpLXqgJAZjVP68Mhrl6701RGoXOZNQRgtHh+FCwTKHKSDX/Ig1h0rMFHnWcV4uw= X-Gm-Message-State: AOJu0YzK+U3+i2OtbTnXbDKG3mR6RPeBT+ztYSoHtFBtqD4y2+inMNPx /UrK1z+S//Am8BHM7ztmqjB7jRgs+xWvzi7iBe/JLbkWxIWIqMRO X-Google-Smtp-Source: AGHT+IEFJ6tmkCvSL23OSnviSOViPBwZPbf4kVXdAQwudZZrtBsj2eqZoqbLQEvM6RBTWkHdxZvgUw== X-Received: by 2002:a17:907:1c19:b0:a7a:a5ae:11bd with SMTP id a640c23a62f3a-a7d4019b3e7mr468705966b.67.1722217680572; Sun, 28 Jul 2024 18:48:00 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acac615c0sm444792066b.97.2024.07.28.18.47.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:48:00 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 4/5] memblock test: fix implicit declaration of function 'isspace' Date: Mon, 29 Jul 2024 01:47:24 +0000 Message-Id: <20240729014725.29839-4-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240729014725.29839-1-richard.weiyang@gmail.com> References: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 6C0DF100010 X-Stat-Signature: aw7c8doqx8knyriaixd1zatjgi3dbyu3 X-HE-Tag: 1722217682-14756 X-HE-Meta: U2FsdGVkX1+d0eT/dqgVtMQTSYqQLSSHT7+oIZmmMYxH7t8PxMeNVX7ekbMrlxcDF03eWqx0AledUw7SjbRVayypEolWUwDH9A4T38s1vqXgejBjVAyll9dUuiGe7ALkXJsZ4UwPSqzrziPENzGRGzfSeM0Ugf63PDRx5cdtINSWtOtaj/I58m2Xqn1Aex+qDSCZ0i+Jqw3KzzQfgxyGyHSuC/rC+n30cBihFAJzbOQO+W1uo3fIKabwXS1tDlolwMQez0IknZlFMfI43c+mJx32Jeqo3aAjXKW8ZTL9xGjXBxQbxCAcHiquYxNmenkzfEZtHRNkfIzoUXB+nR80MoRPEAAfgaQh3xS2UZmq9Vuj+UA5YF5DzpOyqL2l/g8YNeadtSGdypjxZZRRzF0Rmkx4lTmkDARUJ/Z9/PBXhTPFgf9jo/KQOeXYd6MiJ8y/ow3KsJeKTfBbXBjMw1az7+Ftha2fvjAKCMYVI3S8PGfRZwbpI3zIM0CN8fTKyh+QhAcMUfqwlgHiG9ziz6xzm/wWVj/G31U+gHskE5lCmfyuVo4rhdUfp2WSi6tPNVjjtiUoQyEc/K+wJILUV4mdM2yzoWFmcTkiRB+09sOvGkBOHIprFfJlHCKEXRyKa9vgEDeBMkB0dWMF2RaiRloulbi9jEeqh/NJhYfeW8VGCAzDjPMs9NGEKJKfUFKK/zvMlCyLMVzaV+6w9hrM7uDktnNn8ax/MkT6t8GFkAHZhAm4hMwnhj2f8ry8p0Uib/eyrBsBqMbl1irviT+CCwzYiNxuaVB961pAeRJ8mEtkJf4B6PXgILhi0sLUQu4sMre/GP8VQqunMSl0L7mRMpUAj7dXaM0rAj57RJ4dRQVoMw8INZRJHR4PPAC67SsLwvOaAN5oVWyPO8NYx/dtEWnOsbN9Sgl9tObUrBphGupTNLk9aESqcm/+beGeK1v8EmCq4sCDOCanbeQxOIg+uXz QrQA6c+K maz3NAYs6gQhlFecFHEvQoi3BUoq8GA6jYmxYg8LeWhIbrEatH5hjk4Y7uywoVEURMZa/WjBHUoloMOCjWaiTISbMyq4998I9qWBmEd8hivF6F6VZhQMISP1ZEvfoA9UnPYHHY84SoSN8i8s3zI1+pgr4GW0YH0yDC+S5MV4pGGJuf6EfM5SGQztrE5/8IFEiODw9FJSxvwPvIYk4JXT4NtZdXnSu+bavdgw2Z0LKIDijTBPmN+WqQTwbmMvHJhqlF4TUa9gXM9ZPILr7sOs2QHHCVuw0id+nUDkmuUS/1bba0U7lsk7g2+VstTb6GtDMjLiWGbB67x9MrD+Ir9fig5ajkMSwUJzMs9B56L8Zs/yGpvrMRRn58xmi/rdlr1Yr+ZOASbdu5kjR51fhgo0jqO+A+Q6NFR21BkwTCuWJnoNEN66gwLoME13FPqPbdvjavWO6+8siMG4lfHw= 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: List-Subscribe: List-Unsubscribe: Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce usage of isspace(). Let's include in kernel.h to fix this. Signed-off-by: Wei Yang --- v2: include ctype.h in kernel.h --- tools/testing/memblock/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h index c16d9cd2d1ae..4d1012d5be6e 100644 --- a/tools/testing/memblock/linux/kernel.h +++ b/tools/testing/memblock/linux/kernel.h @@ -9,5 +9,6 @@ #include #include #include +#include #endif From patchwork Mon Jul 29 01:47:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13744142 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 E148FC3DA64 for ; Mon, 29 Jul 2024 01:48:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C6DF6B0092; Sun, 28 Jul 2024 21:48:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7765E6B0093; Sun, 28 Jul 2024 21:48:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5559C6B0095; Sun, 28 Jul 2024 21:48:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 3447C6B0092 for ; Sun, 28 Jul 2024 21:48:05 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E084F1401A7 for ; Mon, 29 Jul 2024 01:48:04 +0000 (UTC) X-FDA: 82391104488.18.A8E979D Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf11.hostedemail.com (Postfix) with ESMTP id 2BEB54000D for ; Mon, 29 Jul 2024 01:48:02 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=O4xpwXTq; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722217657; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=MG9S6gbxwdSBJfdbb/Z4n1WtX6iDsEmG4mLp80lBudU=; b=zNyyWStF1b3jXmgQQLcDzz1hKN0AhrxliH3e4uYHFrzoJ7STc0c/WiyDakTWlQeDQ561ik IoptmB2V3k+zEuNQvcYSJWxmMn+dRKr+I0pxeWShvSJDXTSBNN4KG3kY0lV9sEeFc0rsjr UjqsuEJtWdQ0BdyXJTplCv6VEt+u3d8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=O4xpwXTq; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722217657; a=rsa-sha256; cv=none; b=PGy+QC8uCmO0zj6HVo1zlza4e/vubdwA671j0fdZS6JkSRA7xjxDIN51flZxrwKxat/2LE k14C7nME6jek3IDcAalOFU1n2kfk7IYgGMNDLOCNfEQnEjPubk71xv16ZcCZYiuBUS+R3H zHxuhVdi2qUzHBesmdXINRkvsPOyRYY= Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5a1337cfbb5so5324718a12.3 for ; Sun, 28 Jul 2024 18:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722217682; x=1722822482; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=MG9S6gbxwdSBJfdbb/Z4n1WtX6iDsEmG4mLp80lBudU=; b=O4xpwXTqBD+9nyCE93o9jOcecZ++vAiyWnZle64hHJufoau6NL9IeZ17HTaMeBk5mX qxbjSvIENoGOYJJic1vXeaQZtIb9D+kx9tAdUxFTJ+yWQzOyPT3+0jnzMGD8/O1iE0o1 JsHgEs2HloIHWTL8IBz6ZKEAips+CSzGt81stDuikeqboGyeiiDGDaj2JoCZbM6oSp/+ 6h2v5/zC24Bzx4YRNblY3quG2fAEb+BMuatJJwNkt9l04FuJKVnuBsylG1jxZDR46sfO tcTjDXOZ4yp6kZh+z0sFvQNi/5cBsF/XP5jgkPc+2nR6deTNEUV6qpn6yi32YRAy0n2x pW8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722217682; x=1722822482; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MG9S6gbxwdSBJfdbb/Z4n1WtX6iDsEmG4mLp80lBudU=; b=DWQP0uCJ6SdgJMGhEGImdFiEMzcPHchC0sIoyrpqY+NQk/pJI7P0ydkhOQMNfNfz5U kVFf9ts1TxwF0UKhq42IyH6B+jLgVLQpSC5V3ylTQVVwjKkCxncREAB62gSuNTKT54h6 JBuWmvSKfYskPL/pnFCwiv2PFXlluR3RaBimgtpBf6fojJR/NtO7iZRyg1V/gUewHDDk zKRtHJp/d5ZpD+G1l8qaS1JL+S1TGCD0Y+AXS50g3tS3r9/fmYEBPhsgr0Q5jVsXJ8i8 vESWuKamNzamd9jCYOkzWRQ7oyQNg8mP60mgct+3np6hLOCN2HvZsvWdEkr9nzNkcSZ8 87Zg== X-Forwarded-Encrypted: i=1; AJvYcCU8MOvwmN0xDKmNwnWilaASp1QgbZFUqwYuDLe5QAHotVaIPXubJTz7YY4t/1ZujP2HjrGLIFPX21W/glPt/ATHj1s= X-Gm-Message-State: AOJu0YwkEjoEbZr7QU83dq/Lx8X2WExbmPYS0Ve4cMqGGu8r1tFYhXj9 oN9oG30QXdsQ03j9dmaSviUrMmsxciq/jIem4K2onzX+zdRmS3J9 X-Google-Smtp-Source: AGHT+IFV5uloFEw3dLtZ5qdkRVEgAh3a5HblKniDcyE/0U3trOXnrt8hQKyxN8LuaZwFQOHz4VSW2g== X-Received: by 2002:a50:cd9d:0:b0:5a2:fc48:db12 with SMTP id 4fb4d7f45d1cf-5b020cb9a13mr3615025a12.19.1722217681428; Sun, 28 Jul 2024 18:48:01 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac657836f9sm4949206a12.90.2024.07.28.18.48.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2024 18:48:01 -0700 (PDT) From: Wei Yang To: rppt@kernel.org, richard.weiyang@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 5/5] memblock test: fix implicit declaration of function 'strscpy' Date: Mon, 29 Jul 2024 01:47:25 +0000 Message-Id: <20240729014725.29839-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240729014725.29839-1-richard.weiyang@gmail.com> References: <20240729014725.29839-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 2BEB54000D X-Stat-Signature: wgi147e5ai11q7jno3xd5exx7cbtr1ws X-HE-Tag: 1722217682-421424 X-HE-Meta: U2FsdGVkX1+9DdLudq7lVtISkKrvPNCWt15xiiL7uEHJLqkHErH3gULDzhZ9IfWP53ltUVMxN9mmA5SzmbzGv6T+h5Cj1Wrfmdhp4aYbKnA71u/F1ejpC3dPmBzhpUAdxHMbjEo8/645s4BPLqXFcK8Uf1gk+EpRaWfoa9eBQK78m7LB/1Kr9KEVQdLLLAmQkhz/j/J9Jrqz+PV9UC8gFs6ao+Kzhoy1nYSmw7DPleGNnFzP9+wwi1F2EQzBo+lFYqlt4Yh3UwoooEcUvXjYQHT6qj54eQ0T+x1IuHEyZUqBsT6iF1ZaMH2oj77Knlzx3XKNgAeYbji27NDMVXxY1VB5SWsq5rt61qCSQ/0xYvLnUY1482g2cnlEwINibAjrrX2LatA6ZGhSDttRl+kqPXAwZbb1UzFIScxPA73E/xPBOEG8H6tlKKokJh9F7Nta3FGgvOrxl17CF+eN4ldldRIGgqukTYgjxcsYVvUA6HcoLzm+drCxs5s5OwwwNVICpYIkQ8k5WMsQkgU+iFelixAeNAt+A2KtP6VATL0AM9QQc5KC1ucfLTSkOhcPh9p3uBZHRB46knsOWO9/dU/hEkMyd9IU4bm9eS91+9p0OZCDZYUz+Nw0s4AvwrnVE6Yzsh98jQYfXzm480Hup03IqGoeIifzA3pHASqilo/FodB2gpp4CxVo3rRAQjOuE/5snUnh26ouT1slC6gnOZTvnBuaJTvr+1TC79vRrbtmUigUCMij9Awu8I6yc/MOJ+gKzlu0gTyoN/m4ELHky0DvKZTeiWMo83eTbLmIJZpyTfa95HWRJemX9TUvYN3xkPn6FLd+9irou4o8ORO5/wpsnpy4HDCBMSIdPomH35vqmM+nWpptlq/cMHxvJ3PjfrkjEItIO10iOOhJsuBINxSAB2WP+IR4mRUys9Qqs2nbK0BrWEPxInUHHE1t9uGb3B6JaCGxLbUU2BbJeQ20fL7 pmBU81Wm v8HL8lajWv96kb1LmKKS4u/hMIyP5BhIBKCrJn9eK3miOoUUWv0uG31aJ5U572jBkL7wGdp2k1jhjUa+hGmG2Y5ax90KNcC0dULLgxcCgzFFyr5yZQljpn8hgt61qoIxvJAzRcJKWpLn1Pg0YgI+/xfX3W3rDMNZ2xoN/88wsdnbKgwI9688fMeblN89Hu5pMlqAPmFOqZCKzNYIHPhr8KsvKhzNChlUzPhQjHRK8Gx0I5xPCwUs9FzYSVvQmvisA2kGdokbJKn4aqCdkCztEmjVPw4rp28fObnZN1+BDsE7UcjoMr6k26iJP2oFtKHOPE5DQnHSTEM4qwWOzizUtgpc4VSO4Edj1/eIW5tu601bslf3h7omzBVerkvpPz6tIS2eklm8SixFcsGynZsPGkJ+zpJ//FP3jXULM 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: List-Subscribe: List-Unsubscribe: Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce the usage of strscpy, which breaks the memblock test. Let's define it as strcpy in userspace to fix it. Signed-off-by: Wei Yang --- tools/include/linux/string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h index fb8eda3019b5..41e7fa734922 100644 --- a/tools/include/linux/string.h +++ b/tools/include/linux/string.h @@ -12,6 +12,8 @@ void argv_free(char **argv); int strtobool(const char *s, bool *res); +#define strscpy strcpy + /* * glibc based builds needs the extern while uClibc doesn't. * However uClibc headers also define __GLIBC__ hence the hack below