From nobody Mon Feb 9 04:08:40 2026 Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16B8E21CC60 for ; Fri, 14 Nov 2025 22:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=98.137.65.83 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763157892; cv=none; b=gNbGsUsog4VzIUaJGeYcS1/v/8UBxbMUds3rJPRWSfFRAy2iiiL2huIKNVrrmSnSwiJlqqgCTy/HoIoCucgWSaBwEk51pYX9v/Pc06zyK0pIFP5SYt/d9YYPWQ+xvviJ2q49R17MZJgIiLsZh+QgNyAOP2Ivcs2uF4fa4ryqHJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763157892; c=relaxed/simple; bh=W2SgFxPhfn7FIVRm8Z/uPyhX20wpv50j2FNrmNYD4s8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=n6GlBeCkNDk/zD8Nb8t2pK9Bkqze15K3qRTsb3aTY1SFsiXn6zc0nekL07zZ34j2B1HbVeOfmfIjBnQnFOyNLE5OsEq+Xkewr0Hs9t3IEUskAMTwpGc6M4ER/lTHQ4C36iAMbyQGATyCNqmRvssgUWOBjyv5/lYr7VU4YLsHaVw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=K6AGMy90; arc=none smtp.client-ip=98.137.65.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="K6AGMy90" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763157890; bh=TzmiFzUmkKs/zWi2LzadwLCGjRnCMk2O7lj6+RzqUwI=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=K6AGMy90jogjVcUBN+M63OKSxHLtwYvfAo4fBCBufiBbJ+f3tMJIQeB5oy3zrE48Zz1gYDAGA09PzXVK7VAV34UbkPIJ8u3nKOgantASJpWSEuyU0rJqz5LCkdsaDzra5J2Sp/qTwLVRS5n+wl+gPjIYq0P+SSq6mSkIYtYX2f9PuWC7pgtyTUhsRVNtu2j0RPurNLXULMJgHZ3mZ2rwCFjVYI8Ch17srHzuegfmrTl4a8X67cT6rYADv1uPuhUAjaNcZvHUeayX+CLtq6eLx67VqXkdIK2A83niJAhcTDJpNbKAqNFSZ1tcWmDQzH9iKfUuF1Y05tfrGNIm4eKn8A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763157890; bh=o3kA6kULFzmmhu/1NjJ03Z2zAFIMKU+9sSgfp3X2ypJ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=BYfRbzcXDB3DFCeNjqOw5hdVUFnXx6OEv+cGbsDKpO3c4sdM0CjERxrDQTJ2Uqp1mxUZKAwlh0v8HBVGEI67kXG28rAxrT2tLKPeRARi0WFUqjmVCvi5J9aME1uECCRbc+cjl3vOXZGIQcYeGjBkKL2YLsFV4H2ChvtoogsV7IKON04pE2Qy7VB8RcM4QL15vAw1WPd3WCxKm7XR/JAV1/vH1/fnAFd2VqxfFPOSv+Wx/wwYQ8utM21iGoODOTKtDpkKx8tvR/qMTFhmtc/Pw/Sg7o4gQn1W6zLAkD9EQGyZ2kHHBlATGCF1JUPLlM1/Q4ybyYTAK5jEm+pNpU+w9g== X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i1QivLcj5DLM3YUUbBVQl81gAqR6o8kTG91oLFZhGV6l6L9vm3O88y0GR3cZDH75EPm O0JkBJ8M05BekyjC5dcqWYRDWEkz9SRMHufXt6coc5uTkPUPk_b8sTUQCH4Byh9trcA6yr5kJsSL deJSUObery1_VuKkeMc_vXs9OidHeI18UKZo4KNq1_Aam1tkjID0pzr8keKMZye8TVEF.jBn1aXv MCkeU1qCvFTy0 X-Sonic-MF: X-Sonic-ID: 3c0a5b38-29bb-4cf5-9a34-ed7f599d05ff Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 14 Nov 2025 22:04:50 +0000 Received: by hermes--production-bf1-58477f5468-cg9f9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e7d9a9c0ed942aa3fd36f2c659798fae; Fri, 14 Nov 2025 22:04:48 +0000 (UTC) From: Sunday Adelodun To: "Rafael J . Wysocki" , Len Brown , Pavel Machek Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, Sunday Adelodun Subject: [PATCH v3] power: swap: Fix comment style and clean up outdated function headers Date: Fri, 14 Nov 2025 23:04:38 +0100 Message-ID: <20251114220438.52448-1-adelodunolaoluwa@yahoo.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable References: <20251114220438.52448-1-adelodunolaoluwa.ref@yahoo.com> Content-Type: text/plain; charset="utf-8" Several static functions in kernel/power/swap.c were written using the kernel-doc comment style (/** ... */) even though they are not exported or referenced by generated documentation. This led to kernel-doc warnings and stylistic inconsistencies. Convert these unnecessary kernel-doc blocks to regular C comments, remove comment blocks that are no longer useful, relocate comments to more appropriate positions where needed, and fix a few "Return:" descriptions that were either missing or incorrectly formatted. No functional changes. Signed-off-by: Sunday Adelodun --- changelog: Changes from v2: - Moved the swsusp_swap_check() comment inside the function as requested. - Dropped comment blocks that no longer provided meaningful value. - Removed unnecessary blank lines before function definitions. - Reformatted multi-line Return: descriptions into a single line where appr= opriate. - Kept only useful non-kernel-doc comments consistent with style guidelines. Changes from v1: - Converted /** */ kernel-doc style blocks to /* */ regular comments. - Cleaned up indentation and spacing. link to v2: https://lore.kernel.org/all/20251113110914.44223-1-adelodunolaoluwa@yahoo.c= om/ kernel/power/swap.c | 58 ++++++++++----------------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 0beff7eeaaba..cf5736aabb39 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -336,16 +336,14 @@ static int mark_swapfiles(struct swap_map_handle *han= dle, unsigned int flags) */ unsigned int swsusp_header_flags; =20 -/** - * swsusp_swap_check - check if the resume device is a swap device - * and get its index (if so) - * - * This is called before saving image - */ static int swsusp_swap_check(void) { int res; =20 + /* + * check if the resume device is a swap device and get its index (if so). + * This is called before saving image + */ if (swsusp_resume_device) res =3D swap_type_of(swsusp_resume_device, swsusp_resume_block); else @@ -362,13 +360,6 @@ static int swsusp_swap_check(void) return 0; } =20 -/** - * write_page - Write one page to given swap location. - * @buf: Address we're writing. - * @offset: Offset of the swap page we're writing to. - * @hb: bio completion batch - */ - static int write_page(void *buf, sector_t offset, struct hib_bio_batch *hb) { gfp_t gfp =3D GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY; @@ -526,10 +517,6 @@ static int swap_writer_finish(struct swap_map_handle *= handle, #define CMP_MIN_RD_PAGES 1024 #define CMP_MAX_RD_PAGES 8192 =20 -/** - * save_image - save the suspend image data - */ - static int save_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_write) @@ -671,12 +658,6 @@ static int compress_threadfn(void *data) return 0; } =20 -/** - * save_compressed_image - Save the suspend image data after compression. - * @handle: Swap map handle to use for saving the image. - * @snapshot: Image to read data from. - * @nr_to_write: Number of pages to save. - */ static int save_compressed_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_write) @@ -904,13 +885,6 @@ static int save_compressed_image(struct swap_map_handl= e *handle, return ret; } =20 -/** - * enough_swap - Make sure we have enough swap to save the image. - * - * Returns TRUE or FALSE after checking the total amount of swap - * space available from the resume partition. - */ - static int enough_swap(unsigned int nr_pages) { unsigned int free_swap =3D count_swap_pages(root_swap, 1); @@ -930,8 +904,9 @@ static int enough_swap(unsigned int nr_pages) * them synced (in case something goes wrong) but we DO not want to mark * filesystem clean: it is not. (And it does not matter, if we resume * correctly, we'll mark system clean, anyway.) + * + * Return: 0 on success, negative error code on failure. */ - int swsusp_write(unsigned int flags) { struct swap_map_handle handle; @@ -1077,12 +1052,6 @@ static int swap_reader_finish(struct swap_map_handle= *handle) return 0; } =20 -/** - * load_image - load the image using the swap map handle - * @handle and the snapshot handle @snapshot - * (assume there are @nr_pages pages to load) - */ - static int load_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_read) @@ -1190,12 +1159,6 @@ static int decompress_threadfn(void *data) return 0; } =20 -/** - * load_compressed_image - Load compressed image data and decompress it. - * @handle: Swap map handle to use for loading data. - * @snapshot: Image to copy uncompressed data into. - * @nr_to_read: Number of pages to load. - */ static int load_compressed_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_read) @@ -1529,8 +1492,9 @@ static int load_compressed_image(struct swap_map_hand= le *handle, * swsusp_read - read the hibernation image. * @flags_p: flags passed by the "frozen" kernel in the image header should * be written into this memory location + * + * Return: 0 on success, negative error code on failure. */ - int swsusp_read(unsigned int *flags_p) { int error; @@ -1567,8 +1531,9 @@ static void *swsusp_holder; /** * swsusp_check - Open the resume device and check for the swsusp signatur= e. * @exclusive: Open the resume device exclusively. + * + * Return: 0 if a valid hibernation image is found, negative error code on= failure. */ - int swsusp_check(bool exclusive) { void *holder =3D exclusive ? &swsusp_holder : NULL; @@ -1631,8 +1596,9 @@ void swsusp_close(void) =20 /** * swsusp_unmark - Unmark swsusp signature in the resume device + * + * Return: 0 on success, negative error code on failure. */ - #ifdef CONFIG_SUSPEND int swsusp_unmark(void) { --=20 2.43.0