Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2071883lqz; Tue, 2 Apr 2024 06:37:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMggE+PGty1e+g91Z6AzsCL8RgT1fRTpK3CWgymVXVadppyIs9ETbz08zs5TeGPiLa3n+vs2xpKlDBptVhNTJj/fEzGgSwSzEVA8qHFA== X-Google-Smtp-Source: AGHT+IGqqwO3+alfpSAr/3pAKQu3yazm8v/BSEMtVz1Pes4vnyh+QXWeycPTiVFVPSaLYEhq8uCm X-Received: by 2002:a17:90b:1bc6:b0:2a2:686d:8282 with SMTP id oa6-20020a17090b1bc600b002a2686d8282mr1082891pjb.23.1712065047096; Tue, 02 Apr 2024 06:37:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712065047; cv=pass; d=google.com; s=arc-20160816; b=TWOYA+hmN5rmZZVE0dqfd7Zj0WB+BZ3E0TtddHdKqT1jbw9RNOLdwmwRQpKssc4T5D X/ct/ERHlLSgGA7XEstyO+pf34MFEAKACxa6tH4gw5rS4OSkgF80i7abBhPORObiNsFZ xkNGau12HJ4K7apW5gLGT+zqAwCb2P2fTW8GGzXIfGbKWfJnKzuvCIPUM5r4gMbERZBU 91PtKeGSsAgOZ2B9NxcwbuWJvEDyWaRd3Ry1WB1Dcno8c43vB3XYc+LUx83kh4d7HCsF J7qEE+v8oqcN6eejm0LBzceB8L8vsw8Gi5+uM41t9sJ9wm86p/Pp3ldf+u8UlbKLXfqK R1+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; fh=HuV9oJdKJVV9b/pdGLSc8hyYJCYzIcYApL6nigpxxBY=; b=q+H2VYNPMvcvDKRcEAPCUw2bjpOgGEutgOZ5nwm+mUL+f+Pj2ELL4Yy14aYnBS4dnV 74GlK4dHZwnaOiFoTAEKpSEoPNxm/gZPWtGeznRd4gbZBn6++dIi7na7e99A1kKEThg8 zOZHUzSaPdays4udyiTwC4/odFxhV41hqshRyljxs5J1c1eQC8FuSv6r8wkvrVEil3A9 BAo7OS5wLU/qXw2NyVRUgQtNOS6OjqWblpe7gvU5Fa9RLJuo0LDDqh5Wwu2AnAP2zOZM pJwfXVnarYpCu4pFYf7kP+VHyJJwQOMy3kmMNTZ+9X9CnrV3tKvBK6zdNMoieYoWIO+F UVuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WCUsq5we; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-128046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j17-20020a17090a589100b002a08f7aad5dsi11067968pji.53.2024.04.02.06.37.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 06:37:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WCUsq5we; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-128046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CBBA628F02E for ; Tue, 2 Apr 2024 13:28:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA5C186251; Tue, 2 Apr 2024 13:27:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WCUsq5we" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 271C585287 for ; Tue, 2 Apr 2024 13:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712064443; cv=none; b=Har6gf8ALHKuBhehdJofqwfQeoj6CmolmSA42iHtbZmxMJzoT2IzQw8rg8R+9xpFUhoVijbZea4Aa/26p2QfV/ExVVOrkGFXkTwRuinlXVHetJjL2nCu6EQkO88+0AyQ335Kws67/2KYZd0M9YCsznnKnW6ChM9fgYKvtJ2duQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712064443; c=relaxed/simple; bh=6dR3J0upXNj+1tYs1ts63PbosqZuz2MTKGiOBpIl+K4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=PG8ljtn+Kopzb8S74eOC3NacmDgSKrc2sMPCo4Ff/wWv7UiQmgitd6NbYPavspYy8tTltYJLY4upSMm6+KclYFcQbVF5tprJtDnYHV97Hg0ZMWa4khhAfysrA5I/GBZ1qB2gXitwEK4AzHUQL8wHym990Ws9fHpYKbrPYETNRJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WCUsq5we; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a4702457ccbso643648866b.3 for ; Tue, 02 Apr 2024 06:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712064440; x=1712669240; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; b=WCUsq5we3oU1fuxwA7iPLrwHQYjEqLzCa5TskvzfQ/oENr8+Es1TCi8l0Gtxf/Jt4Q ICg7rNH9jbuE9jlMDQT4wHsweE//m0lacd9xj+ucBxSLC8Vz0wEElcdmncDJzSWHklNt 9ofc4VnlVsL4r1C2by6dg2qy9NP5UNkWUc4wmbe1PHT9NxzjhaTTLXwQcbOZoM33D6LF aR5xNfJ+boh4qhmKwKNk6/NIkoB07RHt/OaAgvvXwQJ5xESMQdtaUkn92TwgSkdl/bWU Ui2iJY9o/yGvv+w0cerOztoNZ5lvcpOgu5Lfz7FYv3xaFZfBTvsQHlyhri9Et6nCYtF9 wEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712064440; x=1712669240; 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=6plq+jc/VvBXS+aNpltaWsMql6tEJfjJ+CETBOykAR0=; b=XNZXNbYOtsjleFPUxKAu8WOzKHx06GQczScQsadQi2xJ/H/EtNImkpDCUaG1qLUNe6 3uHbcqaRNFZKbVGkOAK9GguaHPXlm34kKykEljkobYwUINyuoJULqSSDXbdfnBCxeVh1 yYuIMzBR4S+6YLnZa40oOaExY1jRLdhPccnvXLF0vnyyEPUMUDtT4lHdzV6+hVbWXxAT Q0mVBlzomN950x5RCfBo74qwV5+hT95qndfsXYUYfJArpMXJMAATCRXqHvm7EIbpPPRH kdHBW0OaxOS1CMkWi4Pp/1UFBrHo1GOVGsl23b/qKH30gsFnhWM5FZFF7341fAKEqRM6 pS2A== X-Gm-Message-State: AOJu0YxcphQPsaoXPgEjaRyyAWC0kBXoG1fA2zh1CvSvDVIXYGUB4vmr MV57MkSbu4GZYI0kHk6yU3vKyIsuFjLfEtk4E+UhKs89pe70Xna2 X-Received: by 2002:a17:906:b1c5:b0:a46:cee9:e412 with SMTP id bv5-20020a170906b1c500b00a46cee9e412mr7005460ejb.15.1712064440404; Tue, 02 Apr 2024 06:27:20 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id q27-20020a17090622db00b00a46a9425fe5sm6499992eja.212.2024.04.02.06.27.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 06:27:19 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, rppt@kernel.org, rongtao@cestc.cn Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wei Yang , Song Shuai Subject: [PATCH 2/3] memblock tests: fix undefined reference to `panic' Date: Tue, 2 Apr 2024 13:27:00 +0000 Message-Id: <20240402132701.29744-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240402132701.29744-1-richard.weiyang@gmail.com> References: <20240402132701.29744-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: commit e96c6b8f212a ("memblock: report failures when memblock_can_resize is not set") introduced the usage of panic, which is not defined in memblock test. Let's define it directly in panic.h to fix it. Signed-off-by: Wei Yang CC: Song Shuai CC: Mike Rapoport --- tools/include/linux/kernel.h | 1 + tools/include/linux/panic.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tools/include/linux/panic.h diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h index 4b0673bf52c2..07cfad817d53 100644 --- a/tools/include/linux/kernel.h +++ b/tools/include/linux/kernel.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/tools/include/linux/panic.h b/tools/include/linux/panic.h new file mode 100644 index 000000000000..9c8f17a41ce8 --- /dev/null +++ b/tools/include/linux/panic.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _TOOLS_LINUX_PANIC_H +#define _TOOLS_LINUX_PANIC_H + +#include +#include +#include + +static inline void panic(const char *fmt, ...) +{ + va_list argp; + + va_start(argp, fmt); + vfprintf(stderr, fmt, argp); + va_end(argp); + exit(-1); +} + +#endif -- 2.34.1