From nobody Tue Dec 2 02:33:05 2025 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 689A02D8372 for ; Tue, 18 Nov 2025 18:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763491825; cv=none; b=mqFzzzy7jM9B3faPwu+BuMG57toA6SvUZIyDHoAfN06TElhNPkiktOoVu/oaP0YbpN+oOxdgCwKcv+DtBHvorIDZaAo5f/eryk0SWgTtJI/raWntyOqSigV/I/7M06c3cA+2DwGzh8l2qQEdDIX4YzDtVUaIQAc3cJWwwJvR2dY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763491825; c=relaxed/simple; bh=AYPrrrYZBTxt5Qn9qGRaZZ1p1f5BM3fWOXxV3cGpShM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GOT3n8mhpTCyW3ay4u9AwfKGy9gTx9cHPWCR9cOTL0rNlMcGaQAKma+kz5ZL1o50PEmzECY1ZKdRR01+N7m4PxqQeVbCL+ZaewKB5S6nyWKmzu4s6m4kj4l13iy8HCGZw4lsnQOMEochBncCAsCxYEe/vFYXBLopAWzbePeFiJg= 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=S9LHAjAt; arc=none smtp.client-ip=209.85.210.181 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="S9LHAjAt" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-7b75e366866so3096603b3a.2 for ; Tue, 18 Nov 2025 10:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763491824; x=1764096624; 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=YoGkWLSjBjO1ypEJKf7VcOJ66Mr7RGgnB+IVecGlhdQ=; b=S9LHAjAtgU8vZGmuA+TnGihg82KRT7vKDld224XwtymMn4ATRS8EbfzqMG0R96a+j+ J1az/Bf1rUsJCCdUuUXdBGoI8tEilXwICEyVlJlz6VVjSbYNQq5D8F0P1iKmegW1nX9C S4mVBZziCDH5FMafM/93OjFq13vMvnh1lUu+CZIUZ5zt+uY6MUCLGvLRD8PirWjzvBv9 aeqLifT3HBr1QYJzeIb3gXOkGvu/hL1jSzzl2UGJzlUVt0zwwXjbY3g7VRrIYO+5/SZx CLyqB8NGqtJZn0pNSTag7UZI+UVABL31PVWTKFddLYPZz8i+9ACLbXaS0TbRFpot9+mo UNsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763491824; x=1764096624; 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=YoGkWLSjBjO1ypEJKf7VcOJ66Mr7RGgnB+IVecGlhdQ=; b=wVNVekHFeOGxz+z/6+uC1e5APi8i2PMn+1PhRFUFLA5O0XGAGad/XyyJFXipLKhyCs 23oQ3jujNRCCzCPOh3+NcUsXOi36oW5hWlttkKPrpAtnpU+VJTs88P3vZzg12lSRECL1 xC6l0c/BikM7tAQJZXjnc//fB6JnlLmZRWhlEerke9ZSo/99mi/W4bhOKyqj2XanWil0 zk4Nczd+3wkyI0U9Nla1XcY+kVGfSuqaL0AimWL2lZgszGkreYxfAngEEBSfXMEN+r8V Mn+j2muLHE5JGHEabusNZAROCfEPjyTXvWDHkMLxJFoPhFaz4SDZhxmDfpNw5pBp8A4A TZEQ== X-Forwarded-Encrypted: i=1; AJvYcCXRjrOiBFs33nQ2tvujsxd6kDO6rmadK7pggZco7I0aLiQ6GDKz4TdF9OhsKHqiWVSdN/MQFvXS1ThWNaE=@vger.kernel.org X-Gm-Message-State: AOJu0Yz7j25HFgP/CNHGqTLjcFAw3nRUlnqD/4E8meBXOiNuxKcqjVo1 O9bb6WxfGocGOekrJhshRHQSNu5uPO0JtmskIG9prlEOXyTFt3V5/XCq X-Gm-Gg: ASbGnct5zA2lL1TtnOJDEJba3ufPakjyX66jpXRJlnY8DHq7CMDHLfiQGxsV2Wiky7R Nv6eSa8v5J8flFSmZZREDU4IfP/BcDagu+jNOHD9s4gKNFGpJIrt7njOrN/ZawkXLeJ5wru8KDg C4y/WKwiH+7nZI0dfdltsbCxY8fx2baKOKwCeUBPkdDl7mL7npt8U1zW+gDejQ8tBx/xVVZxLq7 tWowVkfzJMGvdaLKQsHxMpmlRm0Mg93tOQgJNFPy7wVa9F3Zr57cccZ001PZW7sehYwcdhreRrA ryey9TRrkjlYrEYiwWIRCLAnTPLDRuYIpjuS2CtknasISA53GGmB90xJyNtp/RpJ+J5rbklJBP7 4ZCuVfttDdKtI2N7lkAtQlJnfeivDDjRALows9Yh4GU9CywhhJxTC+HL/80GQjg0NvZn5q+8h4i YhiKvYGb/wwya82javiMO7Iuxi17U= X-Google-Smtp-Source: AGHT+IHKj0xN/ffzmo6eAaRuWy5yIRvqqs8XkJI07UqY7rBxfV+ZFN/LfvyZUCo2LwYW4KHQCYFyXg== X-Received: by 2002:a05:6a21:3381:b0:35d:ce99:cc23 with SMTP id adf61e73a8af0-35dce99ccc2mr14545942637.49.1763491823564; Tue, 18 Nov 2025 10:50:23 -0800 (PST) Received: from crl-3.node2.local ([125.63.65.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7b9250d24b9sm17197966b3a.17.2025.11.18.10.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 10:50:23 -0800 (PST) From: Kriish Sharma To: kees@kernel.org, andy@kernel.org Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Kriish Sharma Subject: [PATCH v2] string: Add missing kernel-doc return descriptions Date: Tue, 18 Nov 2025 18:48:28 +0000 Message-Id: <20251118184828.2621595-1-kriish.sharma2006@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: quoted-printable Content-Type: text/plain; charset="utf-8" While running kernel-doc validation on linux-next, warnings were emitted for functions in include/linux/string.h due to missing return value documentation: Warning: include/linux/string.h:375 No description found for return val= ue of 'kbasename' Warning: include/linux/string.h:560 No description found for return val= ue of 'strstarts' This patch adds the missing return value descriptions for both functions and clears the related kernel-doc warnings. Signed-off-by: Kriish Sharma Reviewed-by: Andy Shevchenko --- v2: - Drop strends() changes. v1: https://lore.kernel.org/all/20251118180008.2620929-1-kriish.sharma2006@= gmail.com include/linux/string.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 929d05d1247c..0eba937f441c 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -371,6 +371,10 @@ static inline void memzero_explicit(void *s, size_t co= unt) * kbasename - return the last part of a pathname. * * @path: path to extract the filename from. + * + * Returns: + * Pointer to the filename portion inside @path. If no '/' exists, + * returns @path unchanged. */ static inline const char *kbasename(const char *path) { @@ -556,6 +560,9 @@ static __always_inline size_t str_has_prefix(const char= *str, const char *prefix * strstarts - does @str start with @prefix? * @str: string to examine * @prefix: prefix to look for. + * + * Returns: + * True if @str begins with @prefix. False in all other cases. */ static inline bool strstarts(const char *str, const char *prefix) { --=20 2.34.1