Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2617170lqt; Mon, 22 Apr 2024 16:56:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBYhdr/R0qYeF9r5pLzkyZfKtIK8lM7awOzexflGgGLgIu+zzRUJ79RnuZza5YLgGs5Mcb0XL7tdXJrzEzXcVkGyVEZQmOOYmGF/bCYQ== X-Google-Smtp-Source: AGHT+IHzZEoXQcvzsLBRMa0R8o47Cy1DKEK61sbuk411GAohYbkAV8ce49erHBUPEQEDxEMblbxD X-Received: by 2002:a05:6a20:7f9a:b0:1a9:a32d:17cc with SMTP id d26-20020a056a207f9a00b001a9a32d17ccmr13215953pzj.18.1713830195982; Mon, 22 Apr 2024 16:56:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713830195; cv=pass; d=google.com; s=arc-20160816; b=l5aIXr0wDvi/8KXxhl4FEJdX40lERl9ubyTpTiYCSfEO00oMVqo+59gEXhxZCM2XGk /77nAuA4ZQOnelLu3lArU5oSzHrz8YYPUpuKW86Kwmt9+UfnAAdhpDLgkWQQmKvfsL3r RKpKEPETeSBgv00FBmxDXTTjOh8f0coJaoJoU5kZWoGzbCjhHzOJeXJ4nxwHZJAlxsku fz0N6hjQm2Elw6EG6bf+ejX8NqzHK0vTLbm1Cn3fbQ3Z2RVRmJUDaepVHY+EpAqnr+aF PTumic1/gYiEDgkVaeXupOFWQndTjxMJn0CahmysULWqllIPa66hZj+i0yDGTLayPHfR HDFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=av0Lv2HDM742UbhHNmeGM7GEozQMaIBWJmGhbI0pZpA=; fh=zmjdP0tXCGu7KWsW1ZI3SOd3rrco4YRKL0qhVIqjATs=; b=01hCN3MkcH5UgSLgddikP83x5rGG0Tm1134+HoC7q0aRO5QRcu5/OLKrXL5wqLcEpb 7dcpwaij3V+SIVyhxldwhYPwK5+1AFznm3XH0iiFf5321Nijnn7jwX3B6t1GqcGyV0Et hM2rPj1qm5jo7ecV4VchMbT2wPqV8HThc/MtoDhsG1q56BC1PzNrT9eg0eW90FKjurF6 R28Gb8Cbxb/dr7dIENquC6c1rydLXIOCoBt69SfA4qt0QYA4993iUCKo5wO99RWVUBig yg9YiUT4g2aksD4T0rp8VptKv1wXhM1CHkuulydQj6QGrcQMvkpm9ZmjlDB9RK9szTs6 LTCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HIb8cjSH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d17-20020a639911000000b005dcc8a3fdc5si8375972pge.485.2024.04.22.16.56.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 16:56:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154228-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=@kernel.org header.s=k20201202 header.b=HIb8cjSH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 C47CC287E69 for ; Mon, 22 Apr 2024 23:56:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C990156F25; Mon, 22 Apr 2024 23:54:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HIb8cjSH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93E37156C51; Mon, 22 Apr 2024 23:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713830060; cv=none; b=DEebrEsRt5F9KUhjdQfOVPO+zvDX1fensQ87Fq4n9GUmcNGRBri8eqwSm7Q2Tu8QIlgBkE3zlA09UjgpBZc7A0Fr/WhUemNv/u1juicVv0/LIBGk85h83nDbHMPhTwrUSuR2WmylR5Eq7ecCDYsfO1Pa0Y8MK333CYJouyHof6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713830060; c=relaxed/simple; bh=P27UnTmy6IWo4KqJtsg6h0+k3t/WMu6SHlGNvklgRtY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lw/VIDqjQ4Qwfd8aMxbeNOJAfcHnwb+8RsnltHvSu40DCYUn8vSpHsj3smVdMRov6cKlUFPi8mA+A9eFrDtfYa9AjGL87gYstSZnddGE4QMhpwuL4qWG3nmgOmiKwhHiWcS2TQ4F6pTK7rKlJ10eFYOasvDGyCfKpUWRD+uE4mo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HIb8cjSH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B459DC3277B; Mon, 22 Apr 2024 23:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713830060; bh=P27UnTmy6IWo4KqJtsg6h0+k3t/WMu6SHlGNvklgRtY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HIb8cjSHuOj6mPr0U/6lIUmG0OSFr4eZMJlk8TI/DEPxC1AmxqrahO/LxjAHuTdYq H72FwhRa/3JrrR2DbRwUcg/nLD1yaB7u+hC3H3k0km6U1Zu/bdiM3ofLled/PoY4mm XVewOV3oc9CYyjw0P/LFARbbfHVHuuMf57fOXBW/gNQaiFd1CIkOuwP8kF/xMY/cKN Gcil0/VOup8YaGb2DgUBl7Q3cSvvu95uk1/t0oyopU+HZBo++SH9bd/bumNwdJZhKI aMlwhmFfcEDV8uJuxrhazQImSrDpoUzsEUVfSOPMLNKqsINu6TpTyN+cfLYHqzz40J HBnAfk8O4kWhQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yang , Song Shuai , Mike Rapoport , Sasha Levin Subject: [PATCH AUTOSEL 6.8 11/43] memblock tests: fix undefined reference to `panic' Date: Mon, 22 Apr 2024 19:13:57 -0400 Message-ID: <20240422231521.1592991-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422231521.1592991-1-sashal@kernel.org> References: <20240422231521.1592991-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.7 Content-Transfer-Encoding: 8bit From: Wei Yang [ Upstream commit e0f5a8e74be88f2476e58b25d3b49a9521bdc4ec ] 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 Link: https://lore.kernel.org/r/20240402132701.29744-3-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) Signed-off-by: Sasha Levin --- 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 4b0673bf52c2e..07cfad817d539 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 0000000000000..9c8f17a41ce8e --- /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.43.0