From patchwork Tue Aug 6 01:03:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13754293 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 4DB8AC3DA7F for ; Tue, 6 Aug 2024 01:03:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B968B6B007B; Mon, 5 Aug 2024 21:03:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B46646B0082; Mon, 5 Aug 2024 21:03:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0E836B0083; Mon, 5 Aug 2024 21:03:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8584D6B007B for ; Mon, 5 Aug 2024 21:03:35 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1005781C39 for ; Tue, 6 Aug 2024 01:03:35 +0000 (UTC) X-FDA: 82420022790.10.2418960 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by imf25.hostedemail.com (Postfix) with ESMTP id 5375BA001D for ; Tue, 6 Aug 2024 01:03:33 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hczX3Hlc; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.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=1722906164; 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=VlBLE24Vf8x82Lx7cHw6i6pfO3iWZul0LPn3B5Z/Ssg=; b=WrhZMlvzIZFvrNCXkBdu8x6Xh/HkcytGuhd8JemPm4DnKi4PdmE3LUQx4oI87pSE+wSnGp x+pelL3EZ3rK9X4/R6r6IKnD+PZn0DzejFd8uXz3ZLZuQOiDQvNMwnFZUXTX9980e4K43A m18zydWgwEpoKYyod8Jg/DSM+WX1/4M= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hczX3Hlc; spf=pass (imf25.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.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=1722906164; a=rsa-sha256; cv=none; b=1yzmUNlQl9FfDnA0ADcGHWr3t1unkagumBkupRenudqiuHDn4Dq2um5ZBq9s3jGdEQacO1 yp2dmQQi4o3qd+uNR1S89xnGaA+M2lNSA3R5Z7nEJfTO244GbP2cblhat7Nfz+Ws7tjsMP JjgFqJjtex10JHlPJBpAM7dVe8kqSsg= Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a7a9cf7d3f3so20418166b.1 for ; Mon, 05 Aug 2024 18:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722906212; x=1723511012; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VlBLE24Vf8x82Lx7cHw6i6pfO3iWZul0LPn3B5Z/Ssg=; b=hczX3HlcsLz3rtrekfxWxY69Akp1uBZlD9pBgIUbTShB1HNXSpxld8tAs7qznSVYhT /tEyK1UrlTUk16Uei4XhT/LbVmpqJdCgxYC33nVfR9Ul38pjuLxJCscqQnvElNVMy7Sn qbX0qZaUMTUYsbaREBihPyjgt+WtGWiHRzp4olumQnwIXb+HOoxPnazYuRux3Fu3VLDE B1uLRUIJ0nslMT9yvi8hTRLslS1x5RPm7m8dG/+VcWr28UJdyaDk441KNSsYbfxj1j7b u73rM1YX/9wa0fqNOLR8B7F11z+c28TQxrjmEEYIScab88RU8vmswdGRN2orRrqz6uLf EkOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722906212; x=1723511012; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VlBLE24Vf8x82Lx7cHw6i6pfO3iWZul0LPn3B5Z/Ssg=; b=j7dWunrXpRNpxuUPv6Cz4RnmfLzzT7fvdqRitEkFleZ1ZxVGxQvdP7G/UKTR+IqcC9 P0eZNkz8lQQXIMT+cge4cXh7Dp4faG6HIHPkT4I7oBpj+AI5/nkQwCpGSyp4aOKRJAFk e7Fimz3v8u1dvj1elIo50AxOzdjilbcfrJtmEwHoXXqP7rlXkXWtuo8StMYx+WfivXB4 Nuvjwx6JBPE24vTnVyMdbKmfeXgIfiUWfx0DUt95C91T2BhIZHgKEE36lV1lqoQL/Rt5 LpprFmmnklkOeawClBTs9kgiVeJfv0RUkhiFPgxLa4AohIvkhkyfw6BMvw8gx7ttSobi N9Cg== X-Forwarded-Encrypted: i=1; AJvYcCUa5tqw9WsLq8ViK7LkbGCFNG5ZHp6RE5ZeGQKxhw4bDmTJOGVLz1dr4SBIrbzbkC4+weXrAlFct5pFtBL8ngsABSI= X-Gm-Message-State: AOJu0YyTLxV5VvRFsnOLCHCJZiTkuWubF9gsRoiTTZUvfrV8vdrV4AMi zCh13i8J+VnzzoHNSqexgaDodhC7fHCxM2mHFQvwQJa7QCuOXH97 X-Google-Smtp-Source: AGHT+IFEb0c3XKnS+5AeW4mcUBerkQ0nLN/+crG/fVNCjco/xxVrkDP0BEGB53GnKBdJSL6aqOXrEQ== X-Received: by 2002:a17:906:6a13:b0:a72:5f9a:159a with SMTP id a640c23a62f3a-a7dc4db4952mr889243766b.2.1722906211430; Mon, 05 Aug 2024 18:03:31 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9bc9d95sm506859566b.10.2024.08.05.18.03.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 18:03:30 -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 v4 1/5] memblock test: fix implicit declaration of function 'virt_to_phys' Date: Tue, 6 Aug 2024 01:03:15 +0000 Message-Id: <20240806010319.29194-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: kypapqwttasmfn1wtuc66yin5wuzxpyd X-Rspam-User: X-Rspamd-Queue-Id: 5375BA001D X-Rspamd-Server: rspam02 X-HE-Tag: 1722906213-442364 X-HE-Meta: U2FsdGVkX1/3iLSwI/zeVbVPCrGj0Yrv95X3EdzrFhrL4ms6gTHB+bHn2arzpK+II0Y0kNYu4MhDNTt34JghdVaNyP9letnqh0Ccljm18M3+iUzvfxZwOSfHF9TUFPc3ZH6Df03oZtqJ2FRooIbx3EFx/QQCHMo7FLfeB3eh+jxIUG/HuF7ZwENw4bfNQOS+5y1fjK0eeo6/Hhf8a4lkJKH0wc7PUbBqD/FDu81/LVgQLi4M4kaGBsOjKDdLFbml2kK5KFZ/lIRbdK5nkyykTPjmgffig9BGvMT7VCvEgvIg0t0y7YL514Y63LXO3rG5aR/HOFfcDcW8lOUlEZ6hrqPDiHdmXol85WJfcnV/7+EohWy0qIa33XdWxy3e4VVDOz+QFXR0UJDOCwh9zO94XQ8sI8pAG0E3f06WQ+f0vsV8jqqTXFKYYXBfIGx8/s78Me5IpR0ON7NTmzNY0nV9oVuEI3eOsE3/d3zDtQ8/S6NY5eHGGvra3baHsTkcJpO6yUVumx2UA+oqsM3Apx4OxFyoeB5IOxH3bD5gU5sxiCDd0HxD9speX4oADWdnsolhQk4u0vGlIheQpu8inI2WwzquhoddAZHbe2zg46gArpx4xwUlufrRRZtYhwWQAWqtBkDr/TO2C5wA/E2ms8+MivtxdcrlcYj0JqAPFFg7yF0neDR+537YAc9/CJKBpirgNy4P4lgVmUuEAlWs0w+fIgTA6WGh2A/tbYjvmH5i9gKZD2sAvveV6VXqGb8AeMi581obGbayeZ6SAxr4sz59/bgqiEh93PnYSXF6b0Cjjjxd3B9PbchbMdci29yLBQXo9x+Car/Dx6FOiNwq72gHOym3tFtZbG0CmSidp8SJQo55x6jmVn3dTf2IU+fhKI1y5oxzoUGhxwdOughVle5QeC3AnZMM9gkZ2BOKnTuZwfjb5LanR1gT6Vja+8eAk1aHcNY40RiOej7zYYJVa35 zwXScPpb nDNMwkKOdYBtuMdywTBYkHRxA1wO1mT0YH0TpnwIIkYxM7h3JOHx9LP0tk/CmhgFnpmngMa2Z4GGMms7oXYJfjf6RLoaP0BqFGLmKiuIe/ar41dR1LTuFwRIqn4arUqftIJKPhIT1GDOZuHcKG/xC46EKBC8xqVJkhUzclqAl2q+4+3yVDSjkQab7tN4FdcOe95KT0Y9MNfrlgcj6ZPn1q5hJ2C110pu6oB4O8Mp6cHhJ8tRjH6qy74XZXfBzicYEqD7e462ZWhlGDJKYxf7MfhlRIihl4kBOvWUUQSz+qzLMeCw3sLQvfhw3rLhO/xqQ9lm5Dp/snPd8uqx1+Xk4FXyzsu1T/uHpUcmjX2n/3i35+TIKiX34SlYe+dlGwGZibuzr7Yszy4WE1/ocOBRddp1BQQ/CcLHXq+0VQuHEfJTvkom05Yz+brHPWO2nyBZ05WukbS7FkeHpF3M= X-Bogosity: Ham, tests=bogofilter, spamicity=0.008438, 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 --- v4: fix return type v3: use static inline as phys_to_virt v2: move definition to mm.h --- tools/include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index cad4f2927983..677c37e4a18c 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -25,6 +25,12 @@ static inline void *phys_to_virt(unsigned long address) return __va(address); } +#define virt_to_phys virt_to_phys +static inline phys_addr_t virt_to_phys(volatile void *address) +{ + return (phys_addr_t)address; +} + void reserve_bootmem_region(phys_addr_t start, phys_addr_t end, int nid); static inline void totalram_pages_inc(void) From patchwork Tue Aug 6 01:03:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13754294 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 7776EC52D6F for ; Tue, 6 Aug 2024 01:03:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09BA36B0082; Mon, 5 Aug 2024 21:03:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF1C56B0083; Mon, 5 Aug 2024 21:03:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D69916B0085; Mon, 5 Aug 2024 21:03:36 -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 B4A836B0082 for ; Mon, 5 Aug 2024 21:03:36 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4118EA8892 for ; Tue, 6 Aug 2024 01:03:36 +0000 (UTC) X-FDA: 82420022832.15.B51E770 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by imf12.hostedemail.com (Postfix) with ESMTP id 5F8A84000A for ; Tue, 6 Aug 2024 01:03:34 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EAL93hDf; spf=pass (imf12.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.50 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=1722906206; 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=WLxekeF74B6FYcgqHfthVlBvPK8TDcKHskmecqFm82j4N7ULnbQ4z+EuY1Et2mI6Hefit6 En6FCwO1LviWQMYiJ8QNwBwxoF3t4xqjyvaVGDL+M6vYPQYjq1lwBrKkQp0rz01TJhuYd7 A2nh8NWVLgUihm+NDm1sMSfo70P/YPM= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EAL93hDf; spf=pass (imf12.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.50 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=1722906206; a=rsa-sha256; cv=none; b=rONVN/ay2zGJ+dxbmXkeIHCMaFdDoP/HROTKXUr2ve+9j12z89b7c0KSwDWiQERa6Gx4xN fphaxjkYAt7MnZB4WToyUNN60bQZJ9eT0UF6gq28erkCdJJVJjr2MpXaO6KoQ9tqFyBFXv aXSbb9mrotf/W90Kq3eviFagcnanuWw= Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a7a94478a4eso1025419866b.1 for ; Mon, 05 Aug 2024 18:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722906213; x=1723511013; 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=EAL93hDfpuWLm+nmcIJ01Y36O1IqN1Mpvdv3ZaphGzuVPPQSsRgX2+RahufXl2gq4R h7+bTcQc1KFsm9vBdRlClmT2ao/W4C21PZJEF9Qykd5kxFDKSOagyzmILBRVJps3zSLy VD+qCrCva8JdHgFPyhUsJF0o9uby7AjbJeNpe3K7cE/87bZwtBkuSE+z5UhGuabHHH1Z XTdfI2zc7wUbvuAveAzXUn4F0JWfNyUKwq36NzlCKwfy0wLpufbnXoEUPFf3IbfZwitO aPySaVFoD7vloTpRUNRFUXcymeWJbs3PR5Flzs8VvXRlvr+oSSqBshMTCTUw/TCf7nPN OOXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722906213; x=1723511013; 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=wWARjw2LtHV3VPeh6Ylk6AaQWjQdXeKO7qxMII9cNp74E5h3m0okX1kLv0yA3Um9lO AcPn68U33+cMupmR+lIffSpeSdkIRNcTxoCpcGPhd2j3eAJEKflVQv2X8ua2O24ASqJN TNapgOpAQhTqx9AqDNfbCfNPotJ+1V5sd8tSkj3xgnlLT4G0edzfPnOYiQ8+zZ6LkzVi vPwY7b42SVl/I4f2YdkjWCM9SqDcwZsyNEDtDssbGrGH07aD6YC8P9Z90LjN93CVboht k4czSNRwxdn03ad85gCGhderkRKhh2MrtCI29jvAHDI5mE+yzHT9vQi/fvE9Xa2Xjb94 uBRQ== X-Forwarded-Encrypted: i=1; AJvYcCUQT2oFCLyX5WCgtJw5BHKqolbKleH/Lm2ZQN8Lzw+9v71rG1EiafRGDjmDJqQVH0uHZhykC5/C8tMDOWINLz0E3MY= X-Gm-Message-State: AOJu0YzZQ1ZcMXgROkMLLm4rgY9BZR0TPnP3KKiHJKIFxz9O6vD4/0y4 5x4DPUwobqg/yVFRB4s+5BNdLF8uuJM7xG+bCkliiOJH3ttI2K62 X-Google-Smtp-Source: AGHT+IGuTf/b4YdpgjtwBg1LhcMiQUU+y1pTk83h8KRO15nmAc7hlDjau/mLVdeNvR4tOYDUcVe/ow== X-Received: by 2002:a17:907:25c5:b0:a7a:acae:340b with SMTP id a640c23a62f3a-a7dc628bf8fmr1196681066b.31.1722906212844; Mon, 05 Aug 2024 18:03:32 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9bc3cbesm501271566b.5.2024.08.05.18.03.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 18:03:32 -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 v4 2/5] memblock test: add the definition of __setup() Date: Tue, 6 Aug 2024 01:03:16 +0000 Message-Id: <20240806010319.29194-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240806010319.29194-1-richard.weiyang@gmail.com> References: <20240806010319.29194-1-richard.weiyang@gmail.com> X-Rspam-User: X-Stat-Signature: 8boqxb4cd3gbkfck6kqw3z1b5ysh8rc9 X-Rspamd-Queue-Id: 5F8A84000A X-Rspamd-Server: rspam11 X-HE-Tag: 1722906214-263551 X-HE-Meta: U2FsdGVkX1/lLiDKojmFRlxsVjYMJQB/I83rqIfXqRaIayMEjweBlXcmnYiVi1rg/3Tci5iGwQKx0FaROlIbEGShy/EE5sNwwSIPQDKSlfWKCm5xFw0VseHAdtCYpiMrwykQ2TzeV9HOZtEgeDutHUYOKohOeNSSpldnTzlhBy8Qa+sANMfx1U0Ofuen/fhyyKRJ3VdiEd3dHuwUYJKI69PFQn7J+qg9e59JScNGMAm/9AYyHhkF+u7TzX15SJnCIpZYUd9EDWk0MNGNN97r6EcSINNWG/UxXTAyw+MjHfr+W2qigWFerl2FUDPwYgjwjyxNmYAkAXwTqF9iUxHZihCJPbAMDWu0AnR+o4w5Nmb66HPQZsG3CHMY5AfTZxEJayV4ndeOZG6WGtdXSgXqx8C8nzilH1L+cF/qwwv8uNIndmioTKrv8HMiGWLQ/XlH8O2N3CQfnZf6F80xBhRn1XzKYM5SBLVeC9RuB+B9xdDt2p9G7dAKitWevD6t7gPStzi2kjKGZMjE1XtFAI1m/CaePTKmmXCnUGOcb86kWbNuasrGkgYjOrwpt/B6yW/lLMhmZ80WOh5IL/IsjrFU2LV8gSpJEm+pb+IYTbNvFK0iIRdKqxja4+zBye5NLHa6ic8g9FC8LhbRIH+9qAOH/vFpLkGggD/UnIQCBSIHrcwiG3h9CK3ar35bh0XleDQlwV76eUMUiIhN8fFyEnsuRphUg9mPocCMhuuXLiHBhkjuF+gTD4QkvwqxvIKX4U7bn+S1zCWdGzm2Ti6MWxLv0dtRe+CQGyku9d4cRnQr9uTjH3LUi0AlKDGspbf6wroJEoVaylhnvCWi2JlGuUY5/o10IvpEHhcBAtQa2vjc0kPJXqzfZ6pJ7M19PonfpTeftf7GDWAIyD9Ur81CMGNFGYcgV68xDT6Ea7MKjH1z74R10f7PP2QZbKYJ7HnohN2XfcHGqpHQ0+Fhh4MWYr8 1kQ3yg6F m0yZKOm6FFlR++dG0lr8Wrln87cAZKXL3G7Yidwfa8mmEHPi+mQFq4Ydab2UEmKCUzzaoox+Dmhp/dM1xknfBP0qJw8gshuZSok2ybkpSOhqPkz09BB34ij15dIl0b68MqOTkoJckrRIgfrgZvgC0dbY9akri/Ma5N1HMIcgtP864aKctVJfi/RqRSdaIeHztLwFHnCIU8iPT+IzwNbJjWFhh3Vrh/L3Dq7aq4oEI/ge0/38Zib3ULRHIAW1lidIAbVs55Zz/5PiW9vEsemZVvDWW19FYzsMgieW8uocjM35/05YqjPwInCbqiYJyPA7wVw02ha2T/kCbmpr+Wq2BsIfnDs5YqIxVZSOxVupBrMCm7sjfYLdP+fCaAbqbZWURtaDNGvs+sWsFcWmdiQqAMpEyK2A6KHmrSkEi30yNHV2c7UP1PxRyg1ogVFUGuhcQxo6xwFWcinDroXVDheEJDclzvscpwBTyGQ5QaRkTe79VrpVLosdGH3gewqBEDEt9VxmggHiMuK+fXLbBlC4LN/vRFbvDCZpL7qHc 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 Tue Aug 6 01:03:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13754295 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 39B18C3DA7F for ; Tue, 6 Aug 2024 01:03:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 445346B0085; Mon, 5 Aug 2024 21:03:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 357046B0088; Mon, 5 Aug 2024 21:03:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B6046B0089; Mon, 5 Aug 2024 21:03:38 -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 E4DFA6B0085 for ; Mon, 5 Aug 2024 21:03:37 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9E11F12088D for ; Tue, 6 Aug 2024 01:03:37 +0000 (UTC) X-FDA: 82420022874.20.80552FE Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by imf07.hostedemail.com (Postfix) with ESMTP id D824640002 for ; Tue, 6 Aug 2024 01:03:35 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SrIRv6xy; spf=pass (imf07.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.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=1722906167; 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=CmGbALZpVE74Pa5Rw5VvSTllmCd7Qc+k5GQGREaFuVRiI82Y0kqsEzXXrYCeWDkSl2Kb7b E+tITFTYeQiLDyJ5UJGzbQXglGlCKOhJIKuJ9mm4QvcdqHeF1Gxl59oEs3Pry9Q6a6Wn0W kxDRnO1ta3racxIAAWIj9XEsNorVXDM= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SrIRv6xy; spf=pass (imf07.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.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=1722906167; a=rsa-sha256; cv=none; b=NDW0Zf9buiF8Df4fRTXK0niFqWhl37/+JyLHQdWkQOvO7O6DdMomPeHGhe6GqorUV6YWSG MaUbR9N+QZMS9ABzuxhHD4l3hwzyWaLm5f9duW8gHfD2JNd3ef/2ETvubtE/W7UQoA8imd rl3EMUltge2nRhli2a9UpNDs1k1564w= Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a7a94478a4eso1025422166b.1 for ; Mon, 05 Aug 2024 18:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722906214; x=1723511014; 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=SrIRv6xyTYDmtOhJDypwpv9sMFGshkN2LZmL0Zk4oKeVqIdKrXANmjB3hgUMyHyo4U Vkuhb4lJ5u6ZanJS8pfWQkeCqJf7i2WP1FDMreLrgKLZMYjW063yB1J17x+DDRRkxPFU WqE5W6tmwoEi4xfissOliYz4DT3uw2fKViUacKNpi8VjMNz7eB7M+OtZhzOVllfXr6KF RZs7NRpGxY3CGOE5Ok+LY7vXst2L8USsP+UMf0WNV9PaZbI6aVQ18ImyWF4n9MFkxDg6 6b9m216ALcj0ocJGRL2YTMLYQCUXg/gZzfefaHyRiUFWzpK/Yco7u4LwSGagMPaqCf6/ Z8nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722906214; x=1723511014; 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=SXfAv5fkji5PY5S2wfCH1kLQMA3OLj85gzrW0fm4Zs/oiBjfq+mg/oDN8bMAHJR95O M5mL4/9BPA4V/j7t5v03esITKcHDUkKzV57OWBbuaetYJORtTpeVyM9DmzX6rPXV4Wqm FpCwCyKevj6VEcTlRDjiE4HyimGBx3uzqQM/YobASvYZlCaz2lKLQnPH4YYZjFN5CX7k VrHYaOyQOQOitXeQAHHcUMICF+3oaXYO5GFEB9YeHNWKPfFdN4c+75sZPca8iqmoNITA pyWmcr/1DoaT1uaprybYginXxtlqXjqYj9hGk+5S6pn+SF59escOphuxh7OPZgKc+guU znQA== X-Forwarded-Encrypted: i=1; AJvYcCWTdeqNGQJeai3OvnJv4QUzs9OIumWoDuz9hH0zOGCoBbNqT77/S/XCpHNuBhucYsWTzkXr9u4u3HJNa8Esj2QVzgA= X-Gm-Message-State: AOJu0YzNF3X4rPLqWfgn/z5uaQeClUVOjmC9i+j4lnmd8uC5/11JtLmL OAhrsktgKl0399JPuy2auByx3Y/AonCZdSJdrC66UJjLHthcoh2m X-Google-Smtp-Source: AGHT+IHqAXbyPKmlhIkOspU9uqm8KIkjo9T7iVX7QCIWp5S/2DklXoQj3Aa3giIsvCG/CqJlwiGi9w== X-Received: by 2002:a17:907:6d12:b0:a7a:8a38:9d99 with SMTP id a640c23a62f3a-a7dc628ea90mr901339766b.35.1722906214345; Mon, 05 Aug 2024 18:03:34 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e7fe2fsm504877666b.178.2024.08.05.18.03.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 18:03:33 -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 v4 3/5] memblock test: fix implicit declaration of function 'memparse' Date: Tue, 6 Aug 2024 01:03:17 +0000 Message-Id: <20240806010319.29194-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240806010319.29194-1-richard.weiyang@gmail.com> References: <20240806010319.29194-1-richard.weiyang@gmail.com> X-Stat-Signature: bepyftu7jgh3iz3b69sgehdy8y8db14d X-Rspam-User: X-Rspamd-Queue-Id: D824640002 X-Rspamd-Server: rspam02 X-HE-Tag: 1722906215-204401 X-HE-Meta: U2FsdGVkX18UzF4ExzGN11hKhTPrJVh9SgRxKsXVBAaodnsmLJGSk2TXX8AL5kNmbHcwxCj3tAXpts2Om7uVbjVMtSVZiM++r7WXHoncpVRfvXWFlwmfIcnS0PYQmQkp3Xp/SDLB+Ct8nCZLITSouqk+98bbUm/VW9AE5cg5XZ0mJoxilW2dv0XKWWiXY77ZXzA4g1XdiS2KMWpCp48k1VlidFf6mLZiWtXZNaQYVb70Zv622LF02RZZHzW0+DCvIovdas8e4+C0mP39SPW2htvcF9Gh7Wt3aR7iAOUONc4upVp4GtSr3NmTRpyX+UCHrV+RMd1nPGwpvP9eC2ClM9qxt6kcy+A6SGmwgiD4YA5M5ibtVsLrI6stRgac3SrkRfIVEOMY0L6Dg2HAX3QkhfLwbTe2GbJQitqZ9IKDZUd3XCKdrecnp2MVjE4oMtrGiv4SCgdU3FA79Wx+R0NrcpjHd1+7zkj81B9jcYmWZgSHb+OQZ34N1o3TyJ9K7ZPk9yp4x/2j0WnimTAO/ghi/IAY47mlvHE1Dx6rXCElE/gQQFQ/sqREBCIQJJ/x8USdHOTzqLT2F3IMfa3KWiznxYbhKHcq4iA0tbLonKZl5zcOfwNDxdh++aGT1jNyLmT8w15lh7Sdc/uMeKLiU0spAoPCavL8Q5Vgu4bd3rEQMO900wipUsKGYNFQNlQP4Tw5A+uN9cjrzTE7TRS+AOIwII61POqqgowOZifLmVf/j5ZlBY40/hg8UqGWp9dwBXN1jmfxhxDSXR1jHGIXZfuK++/lmt5Dp0nFCe24b3t95sC4QLLD7VKyVGp0dWoZPEHrG6E4sVnKBXZ3hvfBSL+BAf0r1+B7QIWIjiaLlVnq2rmexhMdDUcdbws+6/YUqgT9X4kIvwpCwZT2l0Qe96w6cXfCGN/9dIBbCKlZvzi2CiDjx/NEvcDXfWWGR9kydHxRAmU+3/7DxdPGR98150p ZEpb+88W kgKHYdM2n3XKu4oI+mpieutLuYFCq8HLcqPbo0syc7NVjzNHSVnTvthBR7K8fIF2rE/k92hOvb1jEhhXYDiVm3281Avvl6HvCxGmqH/DOTxISCzRhgPWFUMO9CGXomLnEc/qoFFpQkk82x/QBVU0AtIHCusGIcR9m2bIbZEFe7EKCFO7k53uEakoOV1FNYr4XKo6eRprkZljWyurGFAiA5nuJ17JVL6yau84iBVRyUuxJCvlHcXGCQcYBiCWyYpnSDn+61BBgzcmn0BxrD0G1ONLUGp3Fmx8CKgx1guVFphOexk6AiL35sCUN6A0gbxvEjFQ2zfNFJzJm1i9UnA6Eq4ZwyH18dlkzUn1dGxHx+mmzeR0nY40LqJEJTVOCAmBn/hlWaRrgT5Cf2iT8qSauF55ClcnTqUZEiPf1 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 Tue Aug 6 01:03:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13754296 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 E1931C3DA7F for ; Tue, 6 Aug 2024 01:03:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D6F26B0088; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 138F56B0089; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF1276B008C; Mon, 5 Aug 2024 21:03:39 -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 BAA7A6B0088 for ; Mon, 5 Aug 2024 21:03:39 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 62466A04C0 for ; Tue, 6 Aug 2024 01:03:39 +0000 (UTC) X-FDA: 82420022958.12.7CE6EEF Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf11.hostedemail.com (Postfix) with ESMTP id 963AE40004 for ; Tue, 6 Aug 2024 01:03:37 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kA6IHb9i; spf=pass (imf11.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=1722906156; 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=QpWwd5pwcUw0T39m1uCy2xam2JFdXMweUKG3gzu+scMdQyMS6QQJRKmRi1nVNXdRXgoRwB DqykNsNAGe5KVpy6T7L6jkF7hsT84LOKVKjMqt14vFgtQTQv456tte/EuqxNptfd/Oh0Dy cUDQFBRDYWC1a6CiLQuc19Zd/pWCw5w= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722906156; a=rsa-sha256; cv=none; b=r3aVSCrmKhisHf5pCilkKRKzqv6u1hsD2PTifHQtacPcd711gXbWpmdOWek8fzudp5MGi5 1Xw4s6jR9dI8xXrAzECsj1cfuf8PHMrPVlZ6Oj9OYvIoYvyN3tJ48Jg/d5dC46R4tb7y1x IKaukbGM1CT2FckAp9/cPvIyHEy5T/0= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kA6IHb9i; spf=pass (imf11.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 Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-530c2e5f4feso119355e87.0 for ; Mon, 05 Aug 2024 18:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722906216; x=1723511016; 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=kA6IHb9idwdxvPx/IMy4T2j9w/ZEx7vjj8vajlqhX1gd+lDWeLe/NLHKhsyAHXYxeq WbwTGHy/3PrwwFzMUAtm+NYV3+2tTU6lCkoM+TiKMIn7jRBn9clKaSNzAkOSHqq9lbdh 7dR/bafMp0Z6LoxRu38jeJmtkPxrVEkvYng9R+s4biFszZXS/32bnKQjSzqTnVPKl3dP 4Irh1SMblyjS76xEywYuLdlu5HnZojN5gB5CMqRP0VswG3Alwb109+LW2S52cg0vY02I EnN3nTuCCgi8lx+gMbkVadxmEmtPwEcg7wa7kGBfqY8k3Hwor05PF63dAOE0pnir5j1b EHDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722906216; x=1723511016; 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=KHt0Xz5aYB0Do3b2jl52v9bht0pvGItA5qoIqG2PDAB0LHxp/rNKK8/xWXymFQmDjW WX0sybxLhZ09CZYYEii1nCmTcpIc3gfOFt+sONh9OVyVEV6reljQyIuh2d19PkDZfqaz ed++a7kihx1/tYeCEDYcbPZB75F4Fufp3VTwC+OCcEsBPM2sMXmKGhEXnnUCNXY31aYo wAR4k2J4dRp/hV4Ok5rQhDykeZ8iaKBrE9/tv6fBb+OKVhjjmQZrb3T1bth+qGnEZBfu Plgg68QEHOs+xVdS7ToLRP3SmTt/NvUorr6JnL4VGYaGehF43Fm0aaEzXTVDGUqrvXVl Px/A== X-Forwarded-Encrypted: i=1; AJvYcCXWQQBmfZUjFycC1cN6u02wooL5a6QPAKDTj8P+7ZF3YXTFSHHNKVolcYT0ITCqOQZJem1cD6j2NRHwnwfVtLLPH+s= X-Gm-Message-State: AOJu0YzRH9wiNABhEIGVR7HeWv9+NPauaHyM1syKkw2W477kiKmbjNCX Z0rOpv34ipbPtsc0mkks9F/XGI8kRInq/rtOul9ddwXkc5J489Td X-Google-Smtp-Source: AGHT+IE/q26foaVdZOAAgEyB1LRSKN7pTHr9KjgvgXh7B+nLaKPXZvk3iKr5A0UKZz5QZmH2IbT23A== X-Received: by 2002:a05:6512:220d:b0:52e:a60e:3a08 with SMTP id 2adb3069b0e04-530bb3663f1mr9106692e87.11.1722906215561; Mon, 05 Aug 2024 18:03:35 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9d42825sm505488766b.123.2024.08.05.18.03.34 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 18:03:34 -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 v4 4/5] memblock test: fix implicit declaration of function 'isspace' Date: Tue, 6 Aug 2024 01:03:18 +0000 Message-Id: <20240806010319.29194-4-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240806010319.29194-1-richard.weiyang@gmail.com> References: <20240806010319.29194-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: 963AE40004 X-Stat-Signature: ygjgyz4szk3snj171knbsujeu4mhfj1w X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1722906217-298239 X-HE-Meta: U2FsdGVkX18BEeKK8epsbFmtpvtIAkZUUODGfkvQWNZ2qiWDFJ38zUEBw1Kdj7X0g59v5AW7v8tnvUJlefqGkOIIWk30/E9EjUjKkUIO79qE2tTTH2uYbTiAoLrUSnh/P9DTNEnLq2Yf4Ur79Dbm2cHBLHOFS7utTmLb1Q6oNJgu5ulBdw0qKbdqlj0XUMviOeZWfbk4H8tRoQ8RD13uWh4HduXs8foRrKagQJVARCoQpOGxHETBIYOHer2FmhaosEsrp5Jk06FY20nrMC5Ym6L1eWPJem8H9Dkys7QaKmrrfy8pebIm3Mz/40YHPWgzmwV3bQtT8Ne8Dp+3eoyw6yYiZ+9wb7qjNAceMLsoEoGjKEYOl67c1E9mHz50q0YySG2KcmmwCUCXG1c9vMmmv+HeRlvyZp44s7m95doZe4OqE15r++6tFBR9mPxwjJQHjYdSvlw8HjZIi1j6oR13jFhy1JUkeLwCHjn6KIXhxj01RttVz4FCYdWNedU8PJk+yuynbWZtRZDWEgzRogwWkC73AYYTRlRsW0OtTmcWQmyPKPRTGNIZxrYf+6ibEbqjoVVcmgo/cYIMsQ5Mu8kwMsINSlBl2Ts236TsMdMQ1Y2Eh79vALvb81Ls3kRJKj5aZWFl2cLhpWO9vHVTmy3iuUhJlKKdBRC8QOkgH25O0TY65ku6HKRgfznrnkHKXibNJ1aZuO/Pd029fkku4rytuT4UbNWP2a7n5R4E7YxknjkEiq/SEp7VS070SEznujhpFresC0f3/gacnSTK5IVCWpeXrDv5ma5fFkvJZAsGp7wiTQhVXNHPbZkelDxiibdWRb7P5nzER1Xa+O4eLJlcabNQZ2u2D32eApb1ACKAi2ICQnlhtqRvJNAQbAOov3E4FOA7zCNJ1D3CVazdVaDZL651yoQpT069sc+0t7h7mP3X4nQa8N/8mpYBO4D1j0FK+PyuR/ZVOG4+UMjhYBD YzYhGXHZ 0acx+z3g00EAYsBY1/oJ5iBGdX0yMk5jW8DytGlOLkgJljAAFmkjDVUCFM9Qt/OBGzdMGZLqxbU+rpu2QZq6cI/BoTEWMyNQKCQnPYOSVAgA1BSkVQp9sEJmVyj9GWsIUqLUSnH38JYylCBngi0j74b+DT8qX93niVCGskN+gqOVU46oEim9+Jgrd1fIM3zmG/52Ivc3igT8tydzX/phM5z9/S5Jtb5zpr28UPGJZhaRdBd+kg/oa1RH5W3YLJuW/BY66ZzgiluyOECTHEVwgVHekhZZuvYyEhaGSH+PVUj0VGkEtObcn0eJRtCLuNfjgqhg745i87kHWa+cYECOKgEOh/z213Ahuit6orhC9DEppM5UIkX0vP+LM2EfdI9cG5PpniY66sNXIhwX7y/H9SMA2Sw3AhxVhlKX5o+YJs9q0PJlu+WS+zIhgPlPuwrv3jbXdQBWGFDZhjZk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000022, 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 Tue Aug 6 01:03:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13754297 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 B9762C3DA4A for ; Tue, 6 Aug 2024 01:03:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8BD576B0089; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83A5D6B008C; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DABE6B0092; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4938D6B008C for ; Mon, 5 Aug 2024 21:03:40 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 05404A04C0 for ; Tue, 6 Aug 2024 01:03:40 +0000 (UTC) X-FDA: 82420023000.27.4DE9C25 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by imf11.hostedemail.com (Postfix) with ESMTP id 47AB84001B for ; Tue, 6 Aug 2024 01:03:38 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZKR5+gz9; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.221.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=1722906156; 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=JGJ4IA/MiZ2PRAlbVlDf3Kouv76PWEvFVnlfW5DnCxMfotuHEkYHzfOzVkVpCQeYBQUHUT ct3wa9Mox273/ychU6V1hnjkOyzajePoPm2kXP/DS3R4xtssd6tUWAGXCdaVH2MwyUiW6w uvjgf036qTPM2fAF259+9LLxvRCVA8c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722906156; a=rsa-sha256; cv=none; b=H7CAwygeOuHo3YhQHG1eRxD6POlfus7MJy4qL+iJczC1wcmcbY68RhlOIbkaoDcoBeGSPN fjeCk4+zNu/qsPzwxmLj4Fvt+WAbEyJ3u+N59FpHbFVuCISKaMJYgLy7vSfgZVMagL1aCs uGpHudowhdsIRaRMm2mzAZZ7bpeOjcs= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZKR5+gz9; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.221.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3687ea0521cso47339f8f.1 for ; Mon, 05 Aug 2024 18:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722906217; x=1723511017; 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=ZKR5+gz92TtNJL5vY01YBEUXHiu3ZnooWY8Pq6IMm6ZqtQ3vLONGEvXgeH18K2JawP xXRg5k3GfENplnID2W9lQryqdRg1pNIFVaArCOrWdUHPhijv+Dkb7kHLNtpMnLHi7HSu AcNc+8zVvaNVzPgO6VeSg1JhinapGMi7qoLrCzUDWZlPq5Ia0DM9Sqh3uIpTouI0fvN7 vjksYyjOVVFHnd8JPLHL/iVFSy/xtVf5dUSBG88i9NQAh1EC/1ZTl3tuzC1TyOsZUXOp K0oPmpuTEviQaW+N8TOADrKH3UL8LmbKojbIZbK/PCEedhW5gWvsQEy5dXgaRM5Re7Vs SelQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722906217; x=1723511017; 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=NbxP6ohalEO53bKjlYTkDAYKOZTrjReeNyLhDTJy1obSBh1LvD7MmTjm3HhwdoBrZr yCdJsDYWq2QE2OVjMAIX/8fKhmBvHZ7nf4tmSv/8GHy8QeSCBRnh9nDONgmFBkDQE7O/ ynMF4+RmNyhUjO1jeH/X1rKxR9ZLyvmhRyaIlVKehRlEcianJsPWvdjf5cvpABP7Qw3o YZ6+6LRvkuubUrqI0MTsxKLVO6mE3dIUC/JOD4h3SpSvTrLT7cfpJ+JhYqHy1khr1k9P fhpOR5AYO9OJKU8JdftV1pdGxpe8s+rSRmk53rBVm/x2Sho5PewCvFK1dFnoJ/q42tau SgGA== X-Forwarded-Encrypted: i=1; AJvYcCUG9fOKnXaBor5xJYuiC4LK9zEpdnGQav6Xz+6UAKH4kxLSwYoGZMAJPORl2Hea8HFqSpQ+hA+ODrZaQ1FPB+6E8L0= X-Gm-Message-State: AOJu0Yw/P8EytDZ36AJyCG+vGCeU6sNUcQSpdlYbTBvYE9TiUNg0K7Wr wQky7spqXyg+OZY45g+iyj4kXNOKmrEtwub+XjsMQgvQGKayKpDn X-Google-Smtp-Source: AGHT+IFOjaD0QRaWTraWGT8ewzbBmgOZWO2WZvbgW373+/rfGS0vP9WSqHSco9kNwtVcIvWjJ653GA== X-Received: by 2002:a05:6000:8:b0:366:ec30:adcd with SMTP id ffacd0b85a97d-36bbc0e09d3mr10399765f8f.7.1722906216631; Mon, 05 Aug 2024 18:03:36 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9ec755bsm503344466b.200.2024.08.05.18.03.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 18:03:36 -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 v4 5/5] memblock test: fix implicit declaration of function 'strscpy' Date: Tue, 6 Aug 2024 01:03:19 +0000 Message-Id: <20240806010319.29194-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240806010319.29194-1-richard.weiyang@gmail.com> References: <20240806010319.29194-1-richard.weiyang@gmail.com> X-Stat-Signature: oj6m3mksdd8tb95w8qjfbe7fwbh3xek8 X-Rspamd-Queue-Id: 47AB84001B X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1722906218-96957 X-HE-Meta: U2FsdGVkX18hNPqdL12k9mytmETc4A3JyIW1IGICP3jH/P6cabiVyDIOqmQM7hNxI00mHG9n2NJb970iN5KnH/K0DtU7tM6YduzV0lT2qJ4bwoLiD9b1bSLCtSChyTCGE2MZgTzdByeQdkht+cVJ91ezSvJd3fdlklJYgmn34/hltDhKbUIvjC8ceykzgQi2J0ClhatHDRCR5t/6GKFkfOvNTHmFV7nw/yscR+biOo4hznMuCeCcIz5FfzXU3DCJDsKY7L5IaFr8aoj7fLQy02F/UX8mxpBMU2IZ32838bbk7h+KWb0ifAaTG+1R/+1RFVMbKdow6XHZsbBNPXzdKpEgZHU74FhiZ+Ce6pSaLsz8M3bx/csmHqR1vxNRvoHASsjX6NXJE318BxZ1CzbscqGDy1f0q4Y9Yzwp3riHd2Fkh7NgNdkYMs1OCmgIU7Gn7T6O3jG6AGVpDPggjVzVXBEbbNu8OXBnzF/wpYuFydSM/awKGzbOn+NqjykWN1VSdRZrj34oppsCclFsaYzugabjSwyjD6rOTt1/0jgZclZb3Wk8PAiDpFfHbCNaqlpQp5yJp2+vcdD2wPBOV9iGMLBHv3DSTqBu9qkZ54bsTFrV4Q3gRjBBlJx70yxEwUvEHecJtq1o0W6tmXUxJCzTHzzD/OIOADdyfdMa8zoAikhRDyIKYB3/gT7GpolM/FDmJQ2/oLrvEPhYUV1GkIv6jt/XtlAtPccAM4hKxtaOfsbgXu2oPnK70LubSNxm83GW2ak6lycwr/O2QAvrNuDNUBDq5j/qCMvgNPedTVsGWaC6EM4h9brF//dRZ0xayEOxAvwQ+18vgTam2GJ+vwZUxodtEsAGi+zSqhmnaIxtz7XY0ASdDS5yX2ITGFFK2F7USf1eq05JpsiQN5EE2AXC68ia+arcM37ypv7GP7CUQdGaAjhvJNWA/Y4vIlq097yo+wFdw04uFcK12onprfC UOc37JOv Jds9KMcn3740WnS9nEIJGSvmChkH0vVMLbKZ3sZSYZ2WSZOniNHFGZzJU1ZQRfsSqqGAQZUR4hkCQVRSjfELMVeuyBmUXC/tkbEMnheuY3wbELT4fhig7uRzTrXnNsD1S/I0nL0Va/gQUR98OM2H35ZRJaTriRdgv5DIbkb0DWlgHZJxhWsEA+AbVPopdc/leBmuEOR/ARZ9UE/qUqddAgpU3ravfhXvKYOjJEkhUzHS5Ff0OVCQ487BtxnYjUIJNFqsQzpedF5vNvdeVcY9TBqQaWJZN2LvqUoKe6o9LyiGH3MNPywTcwdWEnn9cmDTAakC0TaQ5h4AHMqV2sulZIqTs/5CUc5olJ6AV5cnGg47jrhZfsLfuU+j/Jdm+xm3u1mcGt2lKf++hJq8pOg0dwO7tOgwM7AaT+5ZqvaVxCALtF0/R+VMb0izD+FYJ3C0d6wWww6xEIYwPmYZmdBNHzhpQfZUI8TonWT+0b1ST0doQnHA= 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