From patchwork Thu Sep 14 07:56:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13384770 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 0813CEDE990 for ; Thu, 14 Sep 2023 07:56:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3F4E6B029D; Thu, 14 Sep 2023 03:56:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC5DF6B02A4; Thu, 14 Sep 2023 03:56:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3F846B02A6; Thu, 14 Sep 2023 03:56:50 -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 ABDF36B029D for ; Thu, 14 Sep 2023 03:56:50 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8156A1CAE83 for ; Thu, 14 Sep 2023 07:56:50 +0000 (UTC) X-FDA: 81234446580.22.5DD5786 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id CAACEA0022 for ; Thu, 14 Sep 2023 07:56:48 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=V3a1jkgx; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694678208; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Cfe0hDGbytL9liaKJu3LI5U5h3FSA+aUkj07C67WOO8=; b=GRcGKT5LoMhtBvy8JQYoNZqlBn45CmQvPGu5ZtrQxOZOfZCYerCbwSBXDFSiZeI6o5aT2n 6Sm3AIpnezhaUECHp60F3vE1jY1PAmDRGC3q39HRGdlSQwJJQ2nNZVF2le0cgzyanO4V1m WL0bWGXP4jKxrU6a2WrcXdwNy+zyRB4= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=V3a1jkgx; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694678208; a=rsa-sha256; cv=none; b=4C3pYvJqVE/eC1Zc2JXpTdKW9hM5XIU8MWNZ4m5piVf18JRcZ0oI2hrVBJBH5wPEVXMER+ KsolB/inEI+1D+GaOxu6B6dNFqfblGqEJ31+0piYY70hH2/mAy7PKErd7M0A+5AY/VU+Eu Ziq3nBysG4TlsF33dNbbMdowy0qdKFQ= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E82D761CAE; Thu, 14 Sep 2023 07:56:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11FECC433C8; Thu, 14 Sep 2023 07:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694678207; bh=9jZHF/WoDrDlTmD+rv+EN7tkrTG84HymGbe+Wx1tQBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V3a1jkgx9h+3UFijQVLP596H5NMlokw0rtDhGLa+6AnN9nFjHRxDbPK3jqxOSBkVe pNRkd3kQ8dKOVloME4WOpqPOZtj7QJ2lHRl1klNDehztjRoSsA86BxzBb5pNUWEYRd 4XagF7Pn5Kiam4qFc32kA40Gio4zdZsHdDXQ9BtrFWba3uIC9uvnyGfrO7vcTSxk5N P2mvhgAudOb02jT+O4Ez56iVMQjqXKq92Oe4z4DwrTGQfn7Cs2G79AVyQNs2pYKeMk SxlQFp4iOv06AAbeDOPHtHbk5kf7R/GpdFdOW5hBqTqyusOTLW+AHj7m4qQIyIq0RN aF1Pg56fqCHug== From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Mike Rapoport , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] =?utf-8?q?memblock_tests=3A_fix_warning_=E2=80=98struct?= =?utf-8?q?_seq=5Ffile=E2=80=99_declared_inside_parameter_list?= Date: Thu, 14 Sep 2023 10:56:32 +0300 Message-Id: <20230914075632.9515-3-rppt@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914075632.9515-1-rppt@kernel.org> References: <20230914075632.9515-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CAACEA0022 X-Stat-Signature: 9cmuqpwpkyijxfe5kmia1ws9jnxrs6a9 X-Rspam-User: X-HE-Tag: 1694678208-819154 X-HE-Meta: U2FsdGVkX1+l7sl3ToC37hlU8r/d6x3icFapADuhwIhokdi0veI7Y0cWVmi/uW65WLoF4FC30N8efXzBEYfwIDdTINpGrDEByeoK1CQTZca3myHmBu3nGyZ38glJdxesl9WpwST4SUTzWKtKkj8rV7IeGHv+BzKfbf/c6f2YHwmovxdGtgiySbWt7/6EscleYSU8/W1HmH/1NhMBrjmGyL1PpLvxKs4cGrASBWxwEm6n6X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s1Tk6jPr8R+j+9aDe1iHD1NOZNumQ8eg8ORUtc+3YsBMZ4BfqmdRPgwcyq/KWM0AKgtgsAyC4ZGG3dbDGLvdiXjvhsxK5gGFmNqQqV1/Wbq/DXhCueZSkb+ziFn+BJuWpmc1ldcSR52rSvy6GDgrbD4= X-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: From: "Mike Rapoport (IBM)" Building memblock tests produces the following warning: cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT -c -o main.o main.c In file included from tests/common.h:9, from tests/basic_api.h:5, from main.c:2: ./linux/memblock.h:601:50: warning: ‘struct seq_file’ declared inside parameter list will not be visible outside of this definition or declaration 601 | static inline void memtest_report_meminfo(struct seq_file *m) { } | ^~~~~~~~ Add declaration of 'struct seq_file' to tools/include/linux/seq_file.h to fix it. Signed-off-by: Mike Rapoport (IBM) --- tools/include/linux/seq_file.h | 2 ++ tools/testing/memblock/tests/basic_api.c | 2 +- tools/testing/memblock/tests/common.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/include/linux/seq_file.h b/tools/include/linux/seq_file.h index 102fd9217f1f..f6bc226af0c1 100644 --- a/tools/include/linux/seq_file.h +++ b/tools/include/linux/seq_file.h @@ -1,4 +1,6 @@ #ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H #define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H +struct seq_file; + #endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */ diff --git a/tools/testing/memblock/tests/basic_api.c b/tools/testing/memblock/tests/basic_api.c index 411647094cc3..57bf2688edfd 100644 --- a/tools/testing/memblock/tests/basic_api.c +++ b/tools/testing/memblock/tests/basic_api.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include "basic_api.h" #include #include -#include "basic_api.h" #define EXPECTED_MEMBLOCK_REGIONS 128 #define FUNC_ADD "memblock_add" diff --git a/tools/testing/memblock/tests/common.h b/tools/testing/memblock/tests/common.h index 4f23302ee677..b5ec59aa62d7 100644 --- a/tools/testing/memblock/tests/common.h +++ b/tools/testing/memblock/tests/common.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include