From patchwork Fri Aug 2 01:09: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: 13750998 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 860C6C3DA64 for ; Fri, 2 Aug 2024 01:09:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C74C06B008A; Thu, 1 Aug 2024 21:09:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C044C6B008C; Thu, 1 Aug 2024 21:09:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A50136B0092; Thu, 1 Aug 2024 21:09:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 84BFB6B008A for ; Thu, 1 Aug 2024 21:09:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0A773A57FA for ; Fri, 2 Aug 2024 01:09:42 +0000 (UTC) X-FDA: 82405523004.19.BF8A8B9 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by imf01.hostedemail.com (Postfix) with ESMTP id 3B2CA40017 for ; Fri, 2 Aug 2024 01:09:39 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GCgd2ElR; spf=pass (imf01.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=1722560951; 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=66yoHcBFJCqBwLMyGp8NqScfI/e5fu66YuyWQ0CGv0INsXBfzqjxbqGdI3D3jJO6kXt4Eh pcV6wpOs0CIy3MIA1gPJUIsnubuD1bt+iK0LtaMvweFSf/eEklIU7X2h4M3hWKiQnWfjbr xOLXlitV5esvYk5JoNd8VAf9QMDI9Tc= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=GCgd2ElR; spf=pass (imf01.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722560952; a=rsa-sha256; cv=none; b=Sd4E/iKupaLq5sVyOy24Ih8eZYy+unABCNhOg+fdXuM1QwQGr5x3aJOfNXbeLVtP3O8RBS 1MBBHnWCjQwzty9yHEndm3LjrU7FLaG1Lza3zdo1tm13MvhOjNYBb4qU0HYY8WcKGjvIYW nn7/mFkvNGVMvHnlQdnpgf3J3wamT1M= Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5b391c8abd7so6749544a12.2 for ; Thu, 01 Aug 2024 18:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722560979; x=1723165779; 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=GCgd2ElRVl/F1rPJGtSYQC5QXesCmDwo0VMxEeg0h1HXji1by+JvF7LEDGbY5BUPM8 hGfGHxP1FcFOVMawq+hgmwIALOqk7t41Io0qOeqPDxjV6h5Rh0FmQgGtJi3OCU9Yxks6 8qsBOyNU07ypnyokhCeP+ESiQ1JGxY8aG4QcTkShXATjRLrzfi0ojiHaT3IZuToCdGeB 2L775WtRy3b5IAI6YmTofiLfvMJW+kVdHbWS4PLBJ3sk3fM6Tg1jDG2DOTlG+c5xp61D KKshTGmR5slh8u1K7bqs8TchIjejx1ypW98Xn89tybhEJK83v1cOZujQSv4ILUoJ5NAT AK5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722560979; x=1723165779; 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=JaFdiFzMxk5Kv4qcBqPkyXZsjlJ3mr3oBivrLxb8VrDGm5XwEbomrp4MQXs/LTanqe Drw2cnXEFshpw1pUeRAkKmaYcfhbqO8qiV3nQoF6fjqEM7JlTUAR44EgzyzZ7y9ib6qh haesxCgK3Ow6cFyl/Cg6Wy0EBzgQi1GOLOrRCHuv0w1iJlElM6c7DPL8hQKH4R946EkJ T52b/6tt8hWRln/3G7vdc2qNrKmh8/FEdfsBsmjgty/Rq5Jim945q6U0zP2JfLXAgsaq St/rbQOwGLuoOFHfNDVVRsCAxcpeNA4xbXrqHdVw5iqAa6aEbDiIxcGqUI/ju1RBfg/7 2Qnw== X-Forwarded-Encrypted: i=1; AJvYcCXHJfy03zRa+NdRCqMr+Lfw4tWBWpwsGLAAvj0GObq7xZHTW2S/soBaN8tTEiNtE6reQLvaYV9Bwo2bUOPT/zqeeVs= X-Gm-Message-State: AOJu0YwUEkbvIXLGozoidOZEs/VeMVEpMRyt6k5qV26lTxXB+Jny8qZp cw8eLI+PwP7jVcojRw1C/ZjJtiLz3Ck94pFBs1ytu/EN290AN7Dd X-Google-Smtp-Source: AGHT+IE5ShbfZbDdd2LTvz66bL2KLfOUkM9NClobxGX5rHyYVvmXyG6VbQdGvzCZl64uSWIFNbkDuQ== X-Received: by 2002:a05:6402:8c7:b0:5a1:83c4:c5a8 with SMTP id 4fb4d7f45d1cf-5b7f3cc54f2mr1247625a12.14.1722560978637; Thu, 01 Aug 2024 18:09:38 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5b839705d44sm408708a12.11.2024.08.01.18.09.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Aug 2024 18:09:37 -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 v3 5/5] memblock test: fix implicit declaration of function 'strscpy' Date: Fri, 2 Aug 2024 01:09:23 +0000 Message-Id: <20240802010923.15577-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240802010923.15577-1-richard.weiyang@gmail.com> References: <20240802010923.15577-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 3B2CA40017 X-Stat-Signature: hh5jrdczfzjzywsmxs6qkryaw6wfd31d X-HE-Tag: 1722560979-35330 X-HE-Meta: U2FsdGVkX1/ojzdRhXgH9tOD7epFwxeHwGkgMB9oxGMT4v4yK8To49Mitnu4jyN0pOy0XPHwqA7UhLlrTLd6Wno9/xQ4Qq0nVaoyeo9l/TUfJuAKh3fzc9y4uyJEnNlwpsM9zj//aaW22YzMEfWmrsZYLM/nSIbeisQzCVODJut/8CvYwNpJOdLIyOR/OxloUABApEFOqF1SAICfk07OqB4x2TQcKBuorD9sfia8AlMpE2O816GlOBfHbL29EMTxA7VN5YwsaUYK/iD7QWKk/SjESrA3Z6eoOOnrX/yTt/iMDqWjLiYCXgP88wq5zV94NxNSQGiNbiKU5yTHnAt2a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-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