Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3810542rdb; Thu, 14 Sep 2023 03:29:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6SFseVGeqix4fNX3WKnbkfxm/USNlaou5AOIexzwQD+x98CollbumfVgyV9/K7GjyRxjT X-Received: by 2002:a17:903:1cb:b0:1c2:c60:8387 with SMTP id e11-20020a17090301cb00b001c20c608387mr5561851plh.0.1694687376206; Thu, 14 Sep 2023 03:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694687376; cv=none; d=google.com; s=arc-20160816; b=fG3afy3AP7imGIDLnpVTF1n3DD1/IWHUZVAmAx9hWM8AfkXIhFIUxp7dfnd/umICQY YnD5olg+hn+KUyVwYnDQKCGxR3CQYBnftxf6DmRVrp5Jo6+CaDYeTfX5KZSaXajvBWte VOJYZbsHXySOK9UTmunGL8Mk3ouTQ/jVNMnamcMPdlMYZJMiTGbffVCw0kCYFoR1MVnu NNQ/bH7hKr1kfydk1pwYBJhK9vZbXFWsUcYI+kw1X2h3/tFI/CqITH0dNUIZnCOkzgiv Cp4PDRhl1E6ev2+UEy/GZi7NO2zzWbxpSw23rI8E2jOLA0I7xXL4FAo7naKFZkRSkZ9s 2rPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cfe0hDGbytL9liaKJu3LI5U5h3FSA+aUkj07C67WOO8=; fh=fwStCqjhUX7M3xSS+y9hGH2Aj4Ysyh0lvKOLTCiQ8J0=; b=Tg5Mmpo58+QrqkXezBqOLCL59dqaD6K8DK4CprwEwUcUoQQQUk8eQjO6B/49WsC8uO engB7HeMqK0JuzQb4v7auPePRlCH44TkQmwpbGXESGankxNrB4bPG6q2G4DJeRv6PcHc jUNhDT263lAGwi80pXcx+10aEflEX+Vvz4V6ocD3NeCKSXxIy/eHc8+Dgakjxoc2bjJd C8k+U8PNWw1wFou0J0vFByf1GPMcujynCbnsu9l7HGTjCo+FLBBYS03lAY9F0oOFugmY HFaSeacr3hpMtr9ChZJ8GnbHhDMM3KGkEXVn7Bmd/79ZY1cCDsswKjvaStRdgkA3An8/ 02hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V3a1jkgx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id i17-20020a170902e49100b001bdd1f48f91si1308216ple.564.2023.09.14.03.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 03:29:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V3a1jkgx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 78C2F8093725; Thu, 14 Sep 2023 00:57:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236131AbjINH45 (ORCPT + 99 others); Thu, 14 Sep 2023 03:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235969AbjINH4x (ORCPT ); Thu, 14 Sep 2023 03:56:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABCFA1FC6 for ; Thu, 14 Sep 2023 00:56:47 -0700 (PDT) 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=20tests:=20fix=20warning=20?= =?UTF-8?q?=E2=80=98struct=20seq=5Ffile=E2=80=99=20declared=20inside=20par?= =?UTF-8?q?ameter=20list?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 00:57:04 -0700 (PDT) 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 -- 2.39.2