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+75I6BaJAKJNNdnkaKbD3BiPdJ0B96xJzniU7DkEm2S1N05Zt5sHaL3tRJMo2+YHuLpX4AxxESfIrIPM1Vxd3yYjBQBY49MYJOcr7t1Lg4qR0RgTWDvIj9JrkRQsPYxq/0dSXQ7O1KFUWDnZEzggYaNnSqNORx8t4O4koj/Z/HXLWRCV7Rzht58/zBDMAEs+rnZrzmpy02WyoCqLRN4epB7NAJbO8gU0PlxmEB4k+PyCUk+X9ZxceMLkVT1cJUx+p3taV5xKXuBQ6Wnf4rWgncus/5WkXV8VbFyUq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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