From mboxrd@z Thu Jan 1 00:00:00 1970 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 E5D926EB4E; Tue, 14 May 2024 11:11:37 +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=1715685098; cv=none; b=ZMEPES/KUTkWBzVdc0TMJM3gUfrcLQOa2iA3jW6w3X/mC11nj/eC6ZDeyD7bPMhTYO0Mmt74x1KbLTofQRF1dbq/PHlWguUhPyFQi6StgfKuDaUu3dQFXvmyB+lAmPx4XZUInyAVrjvyoRJm2MP4QK8JR6SyKzaa7DU1WK96WF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715685098; c=relaxed/simple; bh=kmzKppDw83iLOABxIaeiYWuCjjC9Tex4uaJkHdzC99E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ysj6t+FUrto1YwTdJ/dBaLe2ZqmUpFjSVpKfW0BP6ztju+EcLb0bhO5W575BX5y7xx5Nz7tGgzvwdvXBJfZO8D2Cpr2S2UxNcbvS5OxI4Vnc9Is6kPXVvKmYP74NInwWCBsiJhM3oEjmdgoyweewdAgSzFMHkrUrwbQQ7HQqbJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zrzmuU37; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zrzmuU37" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44680C32781; Tue, 14 May 2024 11:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715685097; bh=kmzKppDw83iLOABxIaeiYWuCjjC9Tex4uaJkHdzC99E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zrzmuU37P+Fg7rdJTp9JYY4jMq5GIBNJrnfSg9XGvQz5QCzgApMqte4kOl/8DzD37 EPaOVG4MRAWxAx/mZ8u3PfRNe3F5Vj7je+UUYatP53UirMM/pHPdwkNLIAhQx5s7Y1 MwHz5NT8W3uEqJqk6HfYO6MroLTmx0QoAXVzCFlg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wei Yang , Song Shuai , Mike Rapoport , Sasha Levin Subject: [PATCH 6.6 137/301] memblock tests: fix undefined reference to `panic Date: Tue, 14 May 2024 12:16:48 +0200 Message-ID: <20240514101037.427415471@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101032.219857983@linuxfoundation.org> References: <20240514101032.219857983@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ 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