Re: [PATCH] memfd: fuse_mnt: remove unused macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
  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@xxxxxxxxx/
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




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux