From nobody Fri Jan 2 20:51:18 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8103BE95A80 for ; Sun, 8 Oct 2023 06:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344421AbjJHGCC (ORCPT ); Sun, 8 Oct 2023 02:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344363AbjJHGCA (ORCPT ); Sun, 8 Oct 2023 02:02:00 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 04D08BD; Sat, 7 Oct 2023 23:01:58 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 11702604A87F2; Sun, 8 Oct 2023 14:01:48 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: ericvh@kernel.org, lucho@ionkov.net, asmadeus@codewreck.org, linux_oss@crudebyte.com Cc: Su Hui , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] fs/9p/xattr.c: avoid format-overflow warning Date: Sun, 8 Oct 2023 14:01:39 +0800 Message-Id: <20231008060138.517057-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org with gcc and W=3D1 option, there's a warning like this: In file included from fs/9p/xattr.c:12: In function =E2=80=98v9fs_xattr_get=E2=80=99, inlined from =E2=80=98v9fs_listxattr=E2=80=99 at fs/9p/xattr.c:142:9: include/net/9p/9p.h:55:2: error: =E2=80=98%s=E2=80=99 directive argument is= null [-Werror=3Dformat-overflow=3D] 55 | _p9_debug(level, __func__, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ use "" replace NULL to silence this warning. Signed-off-by: Su Hui --- fs/9p/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index e00cf8109b3f..d995ee080835 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c @@ -139,7 +139,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *= name, =20 ssize_t v9fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_= size) { - return v9fs_xattr_get(dentry, NULL, buffer, buffer_size); + return v9fs_xattr_get(dentry, "", buffer, buffer_size); } =20 static int v9fs_xattr_handler_get(const struct xattr_handler *handler, --=20 2.30.2