From patchwork Thu Jul 25 01:41:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13741496 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 B1AB3C3DA63 for ; Thu, 25 Jul 2024 01:42:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 18C9E6B0083; Wed, 24 Jul 2024 21:42:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13D6D6B0085; Wed, 24 Jul 2024 21:42:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0041F6B0088; Wed, 24 Jul 2024 21:42:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C95546B0083 for ; Wed, 24 Jul 2024 21:42:05 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 65846C0D4A for ; Thu, 25 Jul 2024 01:42:05 +0000 (UTC) X-FDA: 82376574210.27.D117CE9 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by imf10.hostedemail.com (Postfix) with ESMTP id B08F3C000B for ; Thu, 25 Jul 2024 01:42:03 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bmPsHqfl; spf=pass (imf10.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.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=1721871675; 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=NFpkKmmT3youOgcmlSfL4KcOPVXS0ZnF2VstHXtU494=; b=I9xxn5UYV5pIzu7oH25x9mt3RSghFY8ItbvB7bwxP9q4Wkg4rrEK5Ib+OFsFPc0iJ52MkB PkE9eN4EmOnSd929aaFlwLVNVp/kK8MdP2TeayAeRlw+j7cH2dVePttCbMR2cqQZ13BAR5 y48h8Xa8dsmlhYOjmCLOS83D29URYyY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721871675; a=rsa-sha256; cv=none; b=adOD+RzPvwN4xwYnR/BSm51yre/YaKGdfUxE+fhGk6DL45JlJh9I7rx8V2M8MEF9cHJaY2 EvFS29wbGzLCZX8Fs0GWMdN0yXJTj9s650f2PpjVfmmBzG9gLj/wgUKstEkURAc8v9qFdQ ewYtelZ2rzDzc+lLIfMdgK5zhI6imWw= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bmPsHqfl; spf=pass (imf10.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-595856e2336so694864a12.1 for ; Wed, 24 Jul 2024 18:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721871722; x=1722476522; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NFpkKmmT3youOgcmlSfL4KcOPVXS0ZnF2VstHXtU494=; b=bmPsHqfluh9/TKtoqO0wIQgzWhLtZ/6MnAiTKEfrwx55RAYMI/jRpsF1FNllsBykMl tVcDOY4mz30Taxq8+vqs8fABFOWivT+qQWerAyueylXeNnmKLlV1/cfQnPnXUhHxArZo +Zkq0TsnLEl5Qa++W/XqcyWiAMzVYhFXLI5AZ0PU1ZuLYvN3lCxqWMDsMbxrjFHeZXCE fRJYH+jdKCNB/o0jeOJ7q+Pc7R4xbjuiKs/+aj+vnvvQnDHs4CXK567GOoaOUvqsAXof g0qsnccHbOw3j+RVJEEU7PRD8KkGT1VLKjHIJSTJ+qOzmeKEabALamacJUZE4HZn3o7f WESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721871722; x=1722476522; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NFpkKmmT3youOgcmlSfL4KcOPVXS0ZnF2VstHXtU494=; b=SMgChmPU57X32CLWNRZLMnP/nZgfSyutiLXMqAaDZ89YWIdkz0XMUtFTH3PPX8BP0x ery2r7CM9FmHwlcWwZFwRuwpiW/UUQr01gYUTl+bBOroO8pv7j6WWhuaTY1xBSIsPYjt tGkfSedqHQOuwTUS6bWFQm4svJIV8xCY/+yz0fLA70JjDxOptYyNKsl44uumTBg8gnPM PRr3nRxAKYpWMsJlMJVh9RPAMr8xf62JMD+VnakwuPj1Iwkg6mtz+g2+0aujTuXi3k0b dKbaThdwPTSPlIS79pQNDU9AYFnZy4XtoqXdkWwPxhxg6WR24qAGw/Ft9MERLFCwcWbk dfmg== X-Forwarded-Encrypted: i=1; AJvYcCVf/YIaNzeQx2ZKgWjgrz49KVJy+Jp6uojSRVJUWOg/xCAqPDziqt6YnCofkV2YKg21d2nPOs0ELWi1Jmc6u9xXLUg= X-Gm-Message-State: AOJu0YxWbN+gYpiLlF6NMM82ZJ7pxHD1nX6HaCiDgOCmf5St8rpEPEEV 6/iab/aWvHgqCmGiZnwBlIB+yUSlwbr54GWGrpcmuFcujGdOZn/2 X-Google-Smtp-Source: AGHT+IGoI+YQCe7Aw7rC7D+UViXAni2IQOz76J6pHhJWn2CLyBJkJKv38LUss6T7pyAx/2pjSOHYUQ== X-Received: by 2002:a05:6402:2546:b0:57c:614c:56e7 with SMTP id 4fb4d7f45d1cf-5ac148aa3b2mr1227907a12.18.1721871722021; Wed, 24 Jul 2024 18:42:02 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63b59c86sm246231a12.42.2024.07.24.18.42.01 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2024 18:42: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 1/5] memblock test: fix implicit declaration of function 'virt_to_phys' Date: Thu, 25 Jul 2024 01:41:53 +0000 Message-Id: <20240725014157.17707-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B08F3C000B X-Stat-Signature: s9kzodp4u8eh8zcnwmdbg79m1kgjopbe X-HE-Tag: 1721871723-460031 X-HE-Meta: U2FsdGVkX1/dzKkXeVKhERJyrTJToZWxPY4KR5JpLoLf79GhO6y/HPqlVu+O5hGeflJgXb3OL06KxuTqhCZtovUEXtoLNyqn0b9rmYZ2izo9H417ZJZMvvrb4K72T9HEQxRwqp/IEqrZb8f1rGE8FlOaQBbZZtQQl4PSrxlqaIob2fJPMyksL1URazJWHCDt7OFtXQi+xcZNBowPbHX1PHic0QhwxFXZAOU+LoM4xPJrNuVPF0k0rcEriYkbd8RdrZcav/tV+dk4B0wKk+BA5yvn1Sm2kem9SsHFr1MRGB3eMa1sF/qUvxYQcTKzoRo7s2OcNxnhH/rpdgr4vxAqz5OWqTfbdmk4N0dEMa5GM2/jBQvNXo2JneCj7FwBP8mjFVc/WtBnLXOwRKdDUOtnFW4sSjns95zZTnEh6f442dt7wYg3k43iqlRPhDBvD1rOh6GtQ0wNa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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 kernel.h to fix the build error. Signed-off-by: Wei Yang --- tools/testing/memblock/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h index d2f148bd8902..ca56f36ef296 100644 --- a/tools/testing/memblock/linux/kernel.h +++ b/tools/testing/memblock/linux/kernel.h @@ -9,4 +9,6 @@ #include #include +#define virt_to_phys(p) ((unsigned long)p) + #endif From patchwork Thu Jul 25 01:41:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13741497 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 35FD0C3DA61 for ; Thu, 25 Jul 2024 01:42:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BEDDD6B0085; Wed, 24 Jul 2024 21:42:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B27A96B0088; Wed, 24 Jul 2024 21:42:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 979526B0089; Wed, 24 Jul 2024 21:42:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7BAAF6B0085 for ; Wed, 24 Jul 2024 21:42:07 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 1D774C0D54 for ; Thu, 25 Jul 2024 01:42:07 +0000 (UTC) X-FDA: 82376574294.15.A435DC4 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf11.hostedemail.com (Postfix) with ESMTP id 3737A4000E for ; Thu, 25 Jul 2024 01:42:04 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=jquuiBq+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 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=1721871671; 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=ibcSoVIKXFytqZ6oO4u04Ah+TfQGl6xtDOvpYetFHunHS7AoCbT6S2jhQ8ZHuvQjwnk/AB xey39xtRrZwNEbGciDe6DU3JW4Y3s4x9avhfm4U8HFbfQjyb1A0XF2eGDyM4+yuzuQcpwt Vr4Y43yMWQXex735HGIJ55WkM2BTSmo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721871671; a=rsa-sha256; cv=none; b=yjWNaZnYGjosyoVB+DrBATzVFpUDMJoylYTx46Un4BFdH0NlZFMBM9qxZKgMP86X3prkAk cV5ItPFL9bV/BOVpo+KIR7mU+hAxR0GWQzbO2vO4/fOlqRV08ibM6InZkjCkR2mvvANFw9 zjwoujyRg/q+2q+9LcbSM8bbkfRmtj8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=jquuiBq+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso536318a12.1 for ; Wed, 24 Jul 2024 18:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721871724; x=1722476524; 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=jquuiBq+smLthZpM48/v+hi+2JnE9iLJ2t8Ty6KRs/Rh/ujP2uB7pMFl3OvkYk1jOP F/FkpxGQMJGguNwS7LtOtEDfe7IsXJQAqzXp5iuy7VDyUuLMyhEJbGJl2mWzUkv9rD8W U02PDYFmSt3zZJBGQZftU4FlwDTdNdSj0+61LWLo+cyxIC+muL7VE6taY046u1d6vdtw 6pULHgnwOZzIdWBtogGWSwsAU1s3JTZ9TgjRGXFqLsRK5fd6hrTaNimmHNW/yUfjWxW/ 4eJh2+eeM6haDrasJKL0Hnw5p2NlMW6mP7ru5qHFIgvjM5I/8rHP9p+pWb1+ffSEe5ab HEmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721871724; x=1722476524; 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=cWaMPdFv8gdkD5g02Xaig4JIebJwDL9l+zdHvN0DJujciUbzgW5CsSidtiTzBpAGgS LP2gss8cXFlEhvLzkPVgNGjj9YVPRpnLLwV7eSHxvUXivMuqwRde36kNsjrZw0LPb+zz ypTWYxt3NbPdf/EM4Jok9Gqu7jsgy38HzdgPcBw9/pcoHwkorANyzvGAgm70ao9byMOG NZKwTADheA8cWHljji9QbQCzkTCPw3UcUbT0CUF1So12rDLz7tx+whl//Xc+MzTMTxL9 dAJdVIxJBmHg5SvYF8UE7RYkXQimBSCBWFMRMJa6AeiH79j/XEnFmUOXirsGwLehw3p5 SbNA== X-Forwarded-Encrypted: i=1; AJvYcCVPiR1FYtewTDERlNVbqY75jBQTDPHhLgSHVSK9zb2QldHyMjO4pk99MPFLncBFLzuFxANlj6lVUriFZmVoKsL1VNI= X-Gm-Message-State: AOJu0YxhBj3/4a+v8BWa2qnbw6jpDtB7g8zAyb6/TYOdIOvlIsewbGAw W4YrzXl6cqQAkp1n2t1iythwGWC+6Etruni8mi7F97QJe0a4FP7M X-Google-Smtp-Source: AGHT+IFk3Ms/SyOdiC39YFmwoxbzYL/KBF5t+PsVfe5ruS/QQcledGnBNNjWB+rCtaq7rwicVZt4Pw== X-Received: by 2002:a17:906:c148:b0:a77:eb34:3b49 with SMTP id a640c23a62f3a-a7ac4f40e95mr83707666b.37.1721871723509; Wed, 24 Jul 2024 18:42:03 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acadb9a2asm17354366b.218.2024.07.24.18.42.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2024 18:42:02 -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 2/5] memblock test: add the definition of __setup() Date: Thu, 25 Jul 2024 01:41:54 +0000 Message-Id: <20240725014157.17707-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240725014157.17707-1-richard.weiyang@gmail.com> References: <20240725014157.17707-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3737A4000E X-Stat-Signature: wocqmu9c79xcq6ht3jpp5h7qdas5czg5 X-Rspam-User: X-HE-Tag: 1721871724-494836 X-HE-Meta: U2FsdGVkX1+v7FOSBLUu4FXtBHY3K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ITxNGJph3XzATawOShlWNtx0W3+I0UVU+/MU/JWnJmVm2VINN2EuTvoao0vMsVAMX3EDAuEoGqBmDWpsMToSLguihWdadf5YIc9FqLqz8n9Ke7Tu9fKLsU+ZoAycRjj3FThTUJJZwvKS0RzKYWcgWfSAotCEjDx/TBvTxKWrvwN/lDtACnjs7EY9hJlpUu6hUpN8eQSPPr6J677SYK8Qksp5O6NoM1s60KCsKWbA7+Bnp4xdluuP0EHYTVjHpsGeZPOYReYJTZMHggbjFk3kinqMlQtw466ixm/pBK3BgUiYQgMzV9Zr+WGmZ5obHgs6TEItAdrO/CjXM/iWls= 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 __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 Thu Jul 25 01:41:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13741498 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 0DE49C3DA63 for ; Thu, 25 Jul 2024 01:42:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B2B026B0089; Wed, 24 Jul 2024 21:42:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADA806B0092; Wed, 24 Jul 2024 21:42:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92BF86B008C; Wed, 24 Jul 2024 21:42:08 -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 73EDA6B0088 for ; Wed, 24 Jul 2024 21:42:08 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2F1BE160D11 for ; Thu, 25 Jul 2024 01:42:08 +0000 (UTC) X-FDA: 82376574336.21.2547B07 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by imf19.hostedemail.com (Postfix) with ESMTP id 634501A001C for ; Thu, 25 Jul 2024 01:42:06 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FuF1nDb5; spf=pass (imf19.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 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=1721871677; 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=ARX0cQSlFVlhm2JIEi3wscjUVQ/KZdEKGbbJxa4tmRY=; b=tIkGA0cy6vK1WUgaSwIX5Gv+F5qIrxt1b1++m3qLawes5TOhX5gJTFZzWXNj8q2+pid4/c 2+3arpGT51NSBVCgmo5/afuy1c7YsKrx9xVpT842t3cy7XvYuH4VcNSRIj5EGCZyDeB1oU oh4Ngjk0adPWX6z0RztxRsFtJzfbBa0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721871677; a=rsa-sha256; cv=none; b=CC9in93J16t1EMS8X1otc/ucpVRUGC0q/j41loHWbaXpqMsUF10mRTIPiNRs4HExyd0QSW HTMu46Yh7XKY3sChOx/bufpDIajCnEwfS11MsZx7pkkXaSX53uu/HfMuQqEKfrnBOMjwDc VWG5RFq3YRu1n8q6u0/yYtJUEqtGCm4= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FuF1nDb5; spf=pass (imf19.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a7a9185e1c0so3468166b.1 for ; Wed, 24 Jul 2024 18:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721871725; x=1722476525; 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=ARX0cQSlFVlhm2JIEi3wscjUVQ/KZdEKGbbJxa4tmRY=; b=FuF1nDb55MYBjSVBWSGBZXyjvIcgPD8d8hqVXvczf5nQ1UbaHUcRfo6DQ/LpmA1DLe PMw8p+t8uWOeIzCo66zpHQhK96eEfw8TgIN6E/M9bK58zTOCg2WGD0lZc6Owr0OP71X4 TtMpfbTAJvdlvvXRt+f2PNBcBB/j7lJ4NIGgnTT4X9tHfY6v4tDWKkmRHOW1xFHJiwd8 2rnMyv3nHipUHphnswn0a8Rh59Vwpn0ORGU4pXvFz/uI5TdeCr24d2cz7v7IOBRMOMu6 fEJX5kNpKM8hKONpawM+k/fOIYHsUxkn7ED2a5d0BgXtr5hQ8t68zp4/q70Ng52GXgmJ V1tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721871725; x=1722476525; 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=ARX0cQSlFVlhm2JIEi3wscjUVQ/KZdEKGbbJxa4tmRY=; b=nHvFv8T5l372jrzO5cMPX5gjtkA6SWMdZ8/hc7iwXjM9OKLsivkniYBOi3yvX+Q+73 fUzd/2z/WiXzKTvguEljdow18/w/izPq1chtoIarwRGh+mc1/cvGxn5S0oOMbLWxP21T bYKIjt3tEH+INwPx2rEcp5sjzLGqC4o49+UELy/96ZNZypbGsOVDVhsXoGQkkNsGgvHK q4ZFfiZObh+F9yfZ91DUFzwRKEFQOJK2uB19dMogA5z6eO7HlVGBDPnhJ/F/SlsejZxm E/MYDOaNxfTCHc37qKOTo2aTl45Rqi6dE7vmffhPcIZxg0TeDdfGJaz9LBH6NUmMysUe ExXw== X-Forwarded-Encrypted: i=1; AJvYcCXaRlH8UVbJWjsjhipmPYunW62CBDsOCZlfg/gB9kIxDO0hT4eJyNPI45z0kT0oW0u/kvKanEao9MWcXvGGl6fY1gY= X-Gm-Message-State: AOJu0Yzw9d7ZPMxfGYowdCbbrs11d9ANHb2pCtXsW9tP824NJy+MKCfE euOmDS3PR0sZ334xk5V3I1e9uGhC8AhxVsYZw+/aulRHLZ+2+5De X-Google-Smtp-Source: AGHT+IH69WvgxiMD6OMwiWg1G+NoqJLzclvrJI/UH51QjspTKcbBFBgby0YTMR1Hy0MUj/xO2uBgjQ== X-Received: by 2002:a17:907:9718:b0:a77:e48d:bc8 with SMTP id a640c23a62f3a-a7ac4f0bfcamr93989666b.21.1721871725006; Wed, 24 Jul 2024 18:42:05 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41462sm17069466b.119.2024.07.24.18.42.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2024 18:42:04 -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 3/5] memblock test: fix implicit declaration of function 'memparse' Date: Thu, 25 Jul 2024 01:41:55 +0000 Message-Id: <20240725014157.17707-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240725014157.17707-1-richard.weiyang@gmail.com> References: <20240725014157.17707-1-richard.weiyang@gmail.com> X-Stat-Signature: 4g8nu1xgx3zgd67gaen95sbp7qqyojtt X-Rspamd-Queue-Id: 634501A001C X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1721871726-329663 X-HE-Meta: U2FsdGVkX1+co/gFiyqB2+QhszK9emMqW1atgrlVCjQuqqahAyYPFTF+3JGUfB5DvWiaLdyqiTxz07i+7aZBbyfXBB0ZGRNuLatTqAkVMOJYac84z/raLV+976iJALU7M+O6AJ8VbvldYvxxro8MDFSplbmv48kQd5sTHP4NRH7dPQaF1yCtX2X6ZNSKu7CtnQJr6KtJl2wAkDKb35TA20T0DMi/EISo16k9DD501tbbDq8fYxY7jgVvl0hGO7bnAaa/+nhksdZcZxPbxP7TJAuOm4PQ6d8cvDMqbEzCg5L9ZKpeXfl/kUYNl8YAFcZlFoM2GeZML/jEEY23++3mihGFydWiNSHEnZoCiDCZLZ551zIXKZSgJpqdA8nU+zg/GC9YXzHSFEUy0Dw4lr089BtJ030Ev6pM/xIllxnZ6B9b+x1z9O0/dmFaOycmjwFVj4Sa/bsjd8wvKD0S0BXJpq11xxi3mtAr85cgPyMuF1uWDPE372WKujJLxRymwt7PBz1mcyI5IHU84vqJvDmIccb+FHn5SNjNryO2+rsmPeBkHFV/RAT+Med2D5EpFCrjhiJ9dQ54D3oybfnD1BtoTUAmvdNaAdninjKcITDyOOzHj52qQJzWUerIzVdlPnZp5vddKjWqBBYNds7lmRt8v630pTM0rSNcw/C8ukdpPDjhivJSQJdGZIhGTdoTpmuYj7+J7GRByNaGMn4hqhmJj/DOCwai96Yc5/C2psnp0obT4SVnGaMJp4m/1lvzKLKCVgFu7u3EJiaODvslINQ4Q8H1Qz5EsuZfJS2/sstGlhQZmhsNGOh2jBFQ8GvJJpS3aUzywoOQzC5+V8TF4FgkiPPkxXwXzDL6PhmlunFWFU6697YuywBQmk1rzt3htk+Hk1zKL3Z/TbJAPI6f0/qjvBBZFF3dKjUH0zfIDaE7tSDUAP0MVmw+wG0ZV9dlS5isxB8bLrcdnGyjzIpw6+O e2M8eQN4 +U0RPiecy2NGvqmVtJ0zGN27a0lsDWyEEo7IkFyJtrhsm35IblmM+qMktlYDxe1BFhxNXnSK6fiUJfz7zUkyjAR2xRNjI6/4TNvWhIvZL+72EW9fnEh/lHo3VaDhkL2ZCEXRyRHH7i0+6g8gPVnep95o34Z8ZfJ7dZlEKipxd9eBaHcSIGP4CcA8Bqp2XbOPYGKfJ2wBe9bgIPqFE+2D2bqmBRkcPLKlNSWlupLEdTB0ukYltEjTKphNC2QuOfzJwZTf294M8HureBL2I4FJc+/X8t4nC3ii1iOQ+UnYLp6celJljKxfVrfD7Mp0pWnq9VKzYJPykFpZqp1b/XTU/F3D+vNRDTWgvO0DcGdgg1gM9f45vI1q8mbRJJvjHdMmtASUSJ8iLy78X4b9/dB/JMa5m4FaKOcnvxvHv 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 ca56f36ef296..67c9ea1428a5 100644 --- a/tools/testing/memblock/linux/kernel.h +++ b/tools/testing/memblock/linux/kernel.h @@ -8,6 +8,7 @@ #include #include #include +#include #define virt_to_phys(p) ((unsigned long)p) From patchwork Thu Jul 25 01:41:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13741499 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 9A066C3DA63 for ; Thu, 25 Jul 2024 01:42:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9F33F6B008C; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 92C616B0092; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E2176B0093; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4B83F6B008C for ; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0F115A0CF3 for ; Thu, 25 Jul 2024 01:42:10 +0000 (UTC) X-FDA: 82376574420.25.729A770 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by imf14.hostedemail.com (Postfix) with ESMTP id 3FFE110001C for ; Thu, 25 Jul 2024 01:42:07 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Nc8GvbCV; spf=pass (imf14.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 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=1721871681; 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=d9t9X8YtjQJ97vnjdUQkBC7tpE7oM03qFERBGMdqLiQ=; b=R4nKEEQCRjm2icMlpdMZq19Y9Iuxv2ans4PWpCuOdYJ2Mwm3MnItksGhHf9RZh63G4YV/0 q5Y6Q8IkFUMpUnTZlp3CMuzsikR89Cc+Gr+6IugXO38+1du6DIiUf1fnHKj0YiwNrWu3gB FS8dR3wmdK1c/2lPei2Mb/1rXfBMpEc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721871681; a=rsa-sha256; cv=none; b=w9eU9HzpmRa9R5BxzTJHR/l7wiP1dhez1mFs2PfQ3n2Opy0apyXw+KNlNXQrSkmXrn3Oel Si9d5jKFj2udrPLaeUW+FqrhVf7yNKwaNqFA7XjwXGhxdAj6gCCCB98VM8xhmeRsmpKmMU yc1AUJMNiIEjAhU5+C+99IDMKCti2Sw= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Nc8GvbCV; spf=pass (imf14.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5a2ffc346ceso582714a12.1 for ; Wed, 24 Jul 2024 18:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721871727; x=1722476527; 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=d9t9X8YtjQJ97vnjdUQkBC7tpE7oM03qFERBGMdqLiQ=; b=Nc8GvbCVAa7z8Gc4r9pu1CmzV89jvEIrUF2Xblh/vJqwDJfetIB/40J5XCaBCIL9qD IE1UY2aPDJ7tl5ukDjw1/2IUqgE/Ouu45fLoQ4cFFSN7zgt8j9r8GLKozhE7zM/6gh2F SVSn9j2Qt4ct0uta7BHo1y99Ee3jeX9xuwtf7LPvihbXh9AfW9coHnCMBf0n2Bd0e6O9 Jbi7EP6kl5lE+IgmRXfNAVpv1gcpXB8r24vBOye1fGSx1xjrnOxixlzEG3eZ/wgWftoa vQCatgtupTK8RnwLFjCDgPaF6kMLpbG41m4KzV9MzeOEL0boIwYLLfG2X1hYjgQ7HsEi UGmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721871727; x=1722476527; 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=d9t9X8YtjQJ97vnjdUQkBC7tpE7oM03qFERBGMdqLiQ=; b=geuadD+9GWSdSp9COEOfVpfXewMdto0xmJx2q3zj4792vVyqySlGWm4QxapoMxhDK3 tywQpRIFRoV1CxEEQhDScEPYJQKG9L5leDSfO6JhXmcaNNXF9ObllH1ITRy8OCg1MYd8 dKsKxa3P6HcAhCeB5MOMgpu2eJLhg6DGV6ycJzBisHjJQ/qxnBrRn3J8ESss8BggVcos M+SezX4SkreMIQJhPtoMNy8UdZEB+5Owi0tUVplk3XXKaWePaoF1Us+kUx3FQcTlWHji QJaDB6NU8HGJJICbat8dEEA6UVaqtlXArhD4AK59Ls4a0uLCCMxS3IH6MUHJlBBZV0zM e+Ow== X-Forwarded-Encrypted: i=1; AJvYcCXrwl2CZm2ede8oVTR8N+Z3pF2TDVB9n5lcRPsT9PLs7c69DFKASwau6+G2316gOmaJr5hN7dPCTK71dFQ6vvxLx6g= X-Gm-Message-State: AOJu0YyJeZNuQ2TgW6ydvZPIRaGjFcwLDsV1MMrxwS5WUq0Vd31+jOyj qeJUnf4cF/q4jpaTdXZ4pp7o8G64FBB1ptLMepy8gmfYXK4oJrUzFPd9aw== X-Google-Smtp-Source: AGHT+IGV/bfSCfjZ2C2cURoUMo+w0MNVOHbB3RnlpWzPQrY+R7g3EebmWtmWo1mrRNSyoHfngvlUFA== X-Received: by 2002:a17:907:971f:b0:a7a:8522:5eec with SMTP id a640c23a62f3a-a7ac5076647mr83849166b.53.1721871726359; Wed, 24 Jul 2024 18:42:06 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acadb8039sm17289766b.200.2024.07.24.18.42.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2024 18:42:05 -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 4/5] memblock test: fix implicit declaration of function 'isspace' Date: Thu, 25 Jul 2024 01:41:56 +0000 Message-Id: <20240725014157.17707-4-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240725014157.17707-1-richard.weiyang@gmail.com> References: <20240725014157.17707-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: 3FFE110001C X-Stat-Signature: ckhtmnsiccswqgkmwdqfg8ki6jfiqeb6 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1721871727-887717 X-HE-Meta: U2FsdGVkX189Zuha6QAK/KhdpfT4dTM+Avvk9HLDs4ChrRLxd2k8Z3z+fH8xfvAB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yLM2oNkzysm4cycUJtGzefxDwwROxvMRrCmfrPHJYIKWf2bzPLkONY1N8imbv7ARailfuowlCyiUreMsmYNZXYEw3WIVQpwNLEmiUozAOH2F5vZQQwJs3Uom/JAg0YAidOAlxBPoBGbQztflwz4JRVAi4s4H+uGfI1Gwvwzwzg+KoJnejiC7Xzj6u2vDJrO+YgaqJ7BpNDI1VOUN8e2/WUH90QxPUg+DM+zjNfD875hUSWnTrhtIj/WDv7PEEL5bgbAUmPERsQuTDZjymY060X249LOlY6V7viUN4OWfeW6spB X-Bogosity: Ham, tests=bogofilter, spamicity=0.000093, 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(). In kernel source code, memblock.c include the definition by debugfs.h/seq_file.h/string_helpers.h/ctype.h. Since it already has ctype.h in tools, let complete the include chain to fix the build error. Signed-off-by: Wei Yang --- tools/include/linux/debugfs.h | 2 ++ tools/include/linux/seq_file.h | 2 ++ tools/include/linux/string_helpers.h | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 tools/include/linux/string_helpers.h diff --git a/tools/include/linux/debugfs.h b/tools/include/linux/debugfs.h index 4ba06140b1be..a99b0e0c5414 100644 --- a/tools/include/linux/debugfs.h +++ b/tools/include/linux/debugfs.h @@ -2,4 +2,6 @@ #ifndef _TOOLS_DEBUGFS_H #define _TOOLS_DEBUGFS_H +#include + #endif diff --git a/tools/include/linux/seq_file.h b/tools/include/linux/seq_file.h index f6bc226af0c1..8614fc2ca695 100644 --- a/tools/include/linux/seq_file.h +++ b/tools/include/linux/seq_file.h @@ -1,6 +1,8 @@ #ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H #define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H +#include + struct seq_file; #endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */ diff --git a/tools/include/linux/string_helpers.h b/tools/include/linux/string_helpers.h new file mode 100644 index 000000000000..bc11a762be8c --- /dev/null +++ b/tools/include/linux/string_helpers.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H +#define _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H + +#include + +#endif /* _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H */ + From patchwork Thu Jul 25 01:41:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13741500 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 0048EC3DA61 for ; Thu, 25 Jul 2024 01:42:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F3B56B0092; Wed, 24 Jul 2024 21:42:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 055996B0095; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D4B396B0096; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B14546B0095 for ; Wed, 24 Jul 2024 21:42:10 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 694DEA4B6B for ; Thu, 25 Jul 2024 01:42:10 +0000 (UTC) X-FDA: 82376574420.23.7890B4F Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf18.hostedemail.com (Postfix) with ESMTP id ABB251C0012 for ; Thu, 25 Jul 2024 01:42:08 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="O8/Jo3ck"; spf=pass (imf18.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.45 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=1721871705; 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=R2yFgxEP/SVeR/NmhWRRMe/iuQUs98XgdjS8MqpYTqIfqjHzZX8yoTOwwS+aIf/vOtp07D G/bUwQmQPkwCZWyBJh8EEuhbWQ/ZoVMGjNtSfHCj59FBtpcqTORfhhZ23SZy8SNXMz5Hcp wQGimE4na7dgW4CKu8699QAhw2jkA6U= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="O8/Jo3ck"; spf=pass (imf18.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.45 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=1721871705; a=rsa-sha256; cv=none; b=WLAIkDddsaiOvNYdHUVb3UzNPhsf83ZFelv0goHIoX70wVRcShDxYnRJSRAFdWSINiebD0 BQfUPuHbSiJDOP2TU/ONNqcUIDa3bxuKlsUllvH3qg7F1TyYSYDR52irW7z+7qGfdji+TO OJ6c4aStQlJdsoCKkpdeThvxHhVEZnQ= Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5a10bb7bcd0so565353a12.3 for ; Wed, 24 Jul 2024 18:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721871727; x=1722476527; 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=O8/Jo3ckI5RnqYxX2YyH9vVbiTRaGX75uyKVgONHoNtnBzGxHE6XHaF9jix3jX5ze+ 9YQlN69PwzX196xjPWs5080DArqyH7Cn3nUq9ltXSIOs8L+qieQOPS6jJ63NZZ20XPl9 VuB1H9GboqPByVaGYA5in5MZqX92TrLXVlhbMtpPzUejr6iex3LYUbEv5xo9Ffw6zewK heliXD9ilAwV67WS1WsGQnEOe5tJx8P+osCrTInmTiURs7Tw9wrRjomJ8YQvLvaKWvoS a4/0nlAzi60ZyEFXtmTG92wkpLsJjsHNU4T9ic967T0w49GgcXakMk43xAHtKISilfD2 xOzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721871727; x=1722476527; 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=J3BkpagibAeC9L5439+dc74m/9wSBtLTc3xOF6pYQEH7G8WJ+7N+Zv2sIyk+0ntGfj JsGHAdUCzwY/sLi964VYLBJ8jMmAuxMIzLY6TddBf/iApMI4GyAWWx1TNMnlSx1+unmU L3qvIYxGTr2GoqGP0t8wJQTJWH5YnY6UBX/ltpM2ajNi3ux4/njGQTaZwnnLpnoWKl9E ha2utkHOHJ5oOF4C6aKNmYNHM3aYaSNq/6mwUVcQKKEybwEjU2EvswUEq6OUwqB9WAJp TDlQVoF0mRbSRnlOT8dIr9+ogQxbGrYnuIqlDwiFNQQs9T9PAlUbeHV8tntp5X/9Vwha wlwA== X-Forwarded-Encrypted: i=1; AJvYcCXde6qGY5vGVf0WcwhZs/eBFuqt9hyhdj8vZZwWPS3kcWyT3eb0rBKAKPphyon+3rMOCuWeWURNq36rpVrOn1i8LEQ= X-Gm-Message-State: AOJu0YwQqI77hb9dCAojDyndGLPdodgTXMmcw2U2mj0fyEy/LxXt299a tiD2qDztH/hd3PDlznuczKRG979r0FttHDixn3QoaDkh21Un9elG X-Google-Smtp-Source: AGHT+IEy7VPRH+50Rz7NuDLtZ+hPCJhH/xa3LT9r5958MKX935u5/zkZSZMid0RK/z8aCFJ4d4++rA== X-Received: by 2002:a05:6402:34c3:b0:5a2:e34a:d63e with SMTP id 4fb4d7f45d1cf-5ac2c1c4887mr745587a12.28.1721871727305; Wed, 24 Jul 2024 18:42:07 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac64eb3a61sm239512a12.73.2024.07.24.18.42.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2024 18:42:06 -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 5/5] memblock test: fix implicit declaration of function 'strscpy' Date: Thu, 25 Jul 2024 01:41:57 +0000 Message-Id: <20240725014157.17707-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240725014157.17707-1-richard.weiyang@gmail.com> References: <20240725014157.17707-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: ABB251C0012 X-Stat-Signature: qs4y5i6jttmijkyjqknwboncy5ag4z6y X-HE-Tag: 1721871728-64136 X-HE-Meta: U2FsdGVkX18GxTujmW8wdZvSr+yFaviNXTO9vj/bDKM0u4KPWEg5ra5t/13VREVXD0MGfBRha4yudi+75I6BaJAKJNNdnkaKbD3BiPdJ0B96xJzniU7DkEm2S1N05Zt5s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VAhajH9flx2IcBRVzevVoYvCin3TZF1ct1rINVXY4zZlF1ojNRvHY5mCQjmQmsPcUJ1Z2QYPu41pPXIREhxe6zS9SLbDIssBQexALTIxdlffyFdf7TSEWt4Zc4IzMSViUD0dfNwy5yhP2+yhb4nFCoRVBeCy6F+tf8mnQ+gXgagjdbG2E1LoUhXyYyxs8lN1+Teyg8OchTqz 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