From nobody Mon Feb 9 01:06:47 2026 Received: from cmccmta2.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 515242D5C86 for ; Mon, 27 Oct 2025 09:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.22.67.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761556577; cv=none; b=Psb7SoIZMlqrefXrYA+SXGB37nKv/18ilP8qw2BGs6Kg64HON0Cz58J0uS7KkC9LbpVWGZbocjrp241m3fb+VAJIbI15JYOb7tXmCsKzMQuegquQnzqNKUBQpDlnkbdd58NDNxFkRdskLx5LQ8gUrQjONqnO4nmLmFSnRPpUQM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761556577; c=relaxed/simple; bh=Z/1f0wqqdsWhc2FSgLRDK6PtcCsAzviHQ3OZUvR0lNY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=D8E1fOHA36KKqfC+IBQ16ucjpkDtAGqRDPHkMeFOuLIn4lvx9hUARz33xyF+nrTth3ukafjDxibPjdYxvKlBv8Z8lPpAJz3Wx+o9BapkMaRqBbm2zFz4nS/V2unIsE+6lggLIIJ1IM7vpvPxrWuNpE5l9ucwDMfzs4hXneA1vp0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=none smtp.client-ip=111.22.67.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee668ff379e6d4-1a077; Mon, 27 Oct 2025 17:13:03 +0800 (CST) X-RM-TRANSID: 2ee668ff379e6d4-1a077 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from FHA-W4100033 (unknown[36.137.216.17]) by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee868ff37855ca-a4e75; Mon, 27 Oct 2025 17:13:02 +0800 (CST) X-RM-TRANSID: 2ee868ff37855ca-a4e75 From: bajing To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, bajing Subject: [PATCH] Fix the problem that kunit cannot run Date: Mon, 27 Oct 2025 17:12:30 +0800 Message-ID: <20251027091231.1770-1-bajing@cmss.chinamobile.com> X-Mailer: git-send-email 2.50.1.windows.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable When running ./tools/testing/kunit/kunit.py run,the error for mm/swap.h is as follows: ERROR:root:In file included from ../mm/shmem.c:43: ../mm/swap.h: In function =E2=80=98non_swapcache_batch=E2=80=99: ../mm/swap.h:66:19: error: implicit declaration of function =E2=80=98swp_of= fset=E2=80=99; did you mean =E2=80=98pud_offset=E2=80=99? [-Werror=3Dimplicit-function-dec= laration] 66 | pgoff_t offset =3D swp_offset(entry); | ^~~~~~~~~~ | pud_offset In file included from ../mm/shmem.c:68: ../include/linux/swapops.h: At top level: ../include/linux/swapops.h:107:23: error: conflicting types for =E2=80=98sw= p_offset=E2=80=99 107 | static inline pgoff_t swp_offset(swp_entry_t entry) | ^~~~~~~~~~ In file included from ../mm/shmem.c:43: ../mm/swap.h:66:19: note: previous implicit declaration of =E2=80=98swp_off= set=E2=80=99 was here 66 | pgoff_t offset =3D swp_offset(entry); | ^~~~~~~~~~ cc1: some warnings being treated as errors make[4]: *** [../scripts/Makefile.build:243: mm/shmem.o] Error 1 make[3]: *** [../scripts/Makefile.build:480: mm] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/home/openeuler/kernel/Makefile:1924: .] Error 2 make[1]: *** [/home/openeuler/kernel/Makefile:234: __sub-make] Error 2 make: *** [Makefile:234: __sub-make] Error 2 Signed-off-by: bajing --- mm/swap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/swap.h b/mm/swap.h index 26fa536a8947..04695e1af068 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -4,6 +4,7 @@ =20 #ifdef CONFIG_SWAP #include /* for bio_end_io_t */ +#include =20 /* linux/mm/page_io.c */ int sio_pool_init(void); --=20 2.50.1.windows.1