From: Shuah Khan <skhan@linuxfoundation.org>
To: Ba Jing <bajing@cmss.chinamobile.com>, shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] memfd: fuse_mnt: remove unused macro
Date: Wed, 25 Sep 2024 09:29:10 -0600 [thread overview]
Message-ID: <7c7f42ec-8d9d-40b6-b275-ef139bcc4b79@linuxfoundation.org> (raw)
In-Reply-To: <20240903044455.11268-1-bajing@cmss.chinamobile.com>
On 9/2/24 22:44, Ba Jing wrote:
> The macro FUSE_USE_VERSION is never referenced in the code,
> just remove it.
>
How did you find this problem and how did you test this change?
This patch is incorrect - please see below.
When you find unused defines, do check first if they are indeed
unused checking tree wide to see what happens if you remove it.
> Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com>
> ---
> tools/testing/selftests/memfd/fuse_mnt.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tools/testing/selftests/memfd/fuse_mnt.c b/tools/testing/selftests/memfd/fuse_mnt.c
> index 6936f2a001f3..f9f06fd43c5f 100644
> --- a/tools/testing/selftests/memfd/fuse_mnt.c
> +++ b/tools/testing/selftests/memfd/fuse_mnt.c
> @@ -12,8 +12,6 @@
> * file-system.
> */
>
> -#define FUSE_USE_VERSION 26
> -
> #include <fuse.h>
> #include <stdio.h>
> #include <string.h>
You probably noticed https://lore.kernel.org/all/202409241613.KyXs9fiF-lkp@intel.com/
found build problems with this change.
Also you have to define this to pick up the new API from fuse.h
Removing #define FUSE_USE_VERSION 26 from this source file causes
the version 21 API to be used, hence the build errors.
/usr/include/fuse/fuse.h
/** @file
*
* This file defines the library interface of FUSE
*
* IMPORTANT: you should define FUSE_USE_VERSION before including this
* header. To use the newest API define it to 26 (recommended for any
* new application), to use the old API define it to 21 (default) 22
* or 25, to use the even older 1.X API define it to 11.
*/
#ifndef FUSE_USE_VERSION
#define FUSE_USE_VERSION 21
#endif
thanks,
-- Shuah
prev parent reply other threads:[~2024-09-25 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 4:44 [PATCH] memfd: fuse_mnt: remove unused macro Ba Jing
2024-09-24 9:11 ` kernel test robot
2024-09-25 15:29 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c7f42ec-8d9d-40b6-b275-ef139bcc4b79@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=bajing@cmss.chinamobile.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox