From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 E389633F8C7 for ; Fri, 20 Feb 2026 12:42:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771591371; cv=none; b=CPv1idEsOBEGxm6qf2ISO2d0DMkl4ddZi0gbapW5lXNkhBqteoVeJhkEGVqzM+5kfVvbjAdHeFk5Uc2o/RJc+2kooKE15dMcEhnjxldj5RF06ohyNFs4MaVZ+VNi1hyo1XLzaq0fYaA7bmsGmaJC7rB51bAVyFDOI1UG/dCZy1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771591371; c=relaxed/simple; bh=k0aios3yz5eF3OD3N/CNMPpxYUWKTV/WEZSZxGfC9ng=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=b8y2lWHBEi3CgUKrAj++DPObGXV1X0+o73SwGS7JpomSPR32pWaRsvAvaja2T6ot701cTLSVDcEaUjjWtajV7ueVk/fnKdMrxd4KK6KRrWW9MF+DIYHYGqT1tf9URDhENkFwbPmzrzbensC5wOs51o2eEw+iSlwaKqef2WxcS64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DlLTTWjv; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DlLTTWjv" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-352dda4a34eso868540a91.1 for ; Fri, 20 Feb 2026 04:42:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771591369; x=1772196169; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YUKllnwoQidCF+8PfJZeXrieG2MX2j2TwvAmx1Ac+no=; b=DlLTTWjvh6aT5rmEJ+ErlXJb9RDl1n/08DqLMsBHTKXTd3hiAbtw3THarJTm4QgjBo YNzbkSAHhmY5E2TnMZIvRERJuh/66966H8KqGtp9BOTDe4yqwBTkMEZPfNv7JBcQquOw BcWxKaB/keYrHg8gs6V5l7xgLlLF6Egg5OAfDO40YoVlLWkJWSojcdUK7H0smZNJ8Zww RZ60uBx/7z07IKUTu/vqO3uPs+2xBQi/3VnEsjJW9PcG7q7Tt7emFrfQS1LBq0gOAGID XVfqKrMxl+PQvcxuo37CgkPQeBQqXunekmKzYIwOx+8HaRCV0nz2OmFVCcTkNrbB9V3R zNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771591369; x=1772196169; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YUKllnwoQidCF+8PfJZeXrieG2MX2j2TwvAmx1Ac+no=; b=R+zDdpazzZsiR45Ki9dtMI2mS+6sAl9o1UbsY2lDYMJgYOZEmE4ZbPpkcxS+N4bVnv OlmSlHOC/oRD/iuhf+CEeh2lp8u4iFPupmNQTWg0m9EGlIAlcU5wEWkXXr2/3PUBGJGd AvyemHvHJyU2GTMGeXU5YDfusv19JTyC4fG+XCLB6XA1sO0YOpX2c0SP0BvZGFLG2BAV ZVjeDu44ekDwGRRtrsRCGAX8i5VK9JB2u42HpFIzSNxlpOqLwLc1ky5uF1raodNmGE6O 5dnYXu4sytYjcNwst8MODy2wgMPlXLw60nAddj4z7x3JZE8eyDMpdABG7f+n0kEy0W/Q TMhg== X-Forwarded-Encrypted: i=1; AJvYcCX2NIKmpup5/4i52+SY0D74Mgm3oKeUSwvTl5o0t/IdT7/X+e1sg3m85k/M+0a4/ipoGgpS1wkzfRw38Rk=@vger.kernel.org X-Gm-Message-State: AOJu0YzdYxUDjRixDCAckiMSXPJokjAYXPtBgPKEzn/Yl4Crf5p7cE6b xozM7QLFFtBkTi8AOfdrGMESy85SQCHPe+7Y3j4eyIOLiezhArGIQqAE X-Gm-Gg: AZuq6aLlNPd/cmj14SOQn4ESlu/lpvOPionOsdFfIbpjzqjucJhCPKc6liyIbRbPSgj cGmvLVtX37Gu2mqxQZ73KlxLs+RgXW7Dubqx+9NHq+KbTdqRvOqEdOmyqomOTXL49zTl2UsLWFW 5w8MKogJUsik0FSOoIPsV8aVqK+O59watj+GfZCW8bxe8IMKAfSgyUOEx90QdVCsqzFKU1cEgMd R0AlyyCaStjA8GVesWlRLu9A36g3qNG7IbdtTCZEokVsTFCaQe0ks3OlbX4EVtXc3p8Pk8yxHaT 7o2KU3Z+04PSZQNySoLSIGmXUQt7dgv023ZsaJCL44VZStXSjfl1kzLYXJAW0jTkgi3zSudgguw C8LR7+uySXTNp/7+tZSCghlc9no1EH0jthLfAkaJXUaN/A7W2C9AB11goNM5/nbhrftquQ4Do28 qD8O3Y/iUGgE66mGyqMtfSMbX4UQWgWNxGkyRflOBvMuhjdFdv X-Received: by 2002:a17:90b:28ce:b0:341:2150:4856 with SMTP id 98e67ed59e1d1-358891302f8mr8246072a91.17.1771591369225; Fri, 20 Feb 2026 04:42:49 -0800 (PST) Received: from hu-ckantibh-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3589d8e3e73sm3001661a91.15.2026.02.20.04.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 04:42:48 -0800 (PST) From: Sanjay Chitroda X-Google-Original-From: Sanjay Chitroda To: Vlastimil Babka , Andrew Morton Cc: Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sanjay Chitroda Subject: [PATCH] mm/slub: drop duplicate kernel-doc for ksize() Date: Fri, 20 Feb 2026 18:12:43 +0530 Message-Id: <20260220124243.3264133-1-sanjayembedded@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Sanjay Chitroda The ksize() API is already documented in the public header, and Documentation/core-api/mm-api.rst pulls that canonical doc into the book. The kernel-doc block added to mm/slub.c by commit fab0694646d7 ("mm/slab: move [__]ksize and slab_ksize() to mm/slub.c") introduced a second definition for the same symbol in the generated docs, which makes Sphinx emit: WARNING: Duplicate C declaration, also defined at core-api/mm-api:521 Declaration is '.. c:function:: size_t ksize(const void *objp)' Remove the redundant kernel-doc comment from slub.c so only the header-provided documentation is emitted. This keeps the user-visible API documentation intact while eliminating the duplicate-declaration warning during `make htmldocs`. No functional change. Fixes: fab0694646d7 ("mm/slab: move [__]ksize and slab_ksize() to mm/slub.c") Signed-off-by: Sanjay Chitroda --- mm/slub.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 865bc050f654..3f58a485e95e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -6309,18 +6309,6 @@ static size_t __ksize(const void *object) return slab_ksize(slab); } -/** - * ksize -- Report full size of underlying allocation - * @objp: pointer to the object - * - * This should only be used internally to query the true size of allocations. - * It is not meant to be a way to discover the usable size of an allocation - * after the fact. Instead, use kmalloc_size_roundup(). Using memory beyond - * the originally requested allocation size may trigger KASAN, UBSAN_BOUNDS, - * and/or FORTIFY_SOURCE. - * - * Return: size of the actual memory used by @objp in bytes - */ size_t ksize(const void *objp) { /* -- 2.34.1