linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/hfs: remove unused macro to tame gcc
@ 2020-11-06  3:47 Alex Shi
  2020-11-06 17:56 ` Viacheslav Dubeyko
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2020-11-06  3:47 UTC (permalink / raw)
  Cc: linux-fsdevel, linux-kernel

Couple macro are duplicated defined and they are not used. So
to tame gcc, let's remove them.

fs/hfsplus/part_tbl.c:26:0: warning: macro "HFS_DRVR_DESC_MAGIC" is not
used [-Wunused-macros]
fs/hfsplus/part_tbl.c:30:0: warning: macro "HFS_MFS_SUPER_MAGIC" is not
used [-Wunused-macros]
fs/hfsplus/part_tbl.c:21:0: warning: macro "HFS_DD_BLK" is not used
[-Wunused-macros]
net/l2tp/l2tp_core.c:73:0: warning: macro "L2TP_HDRFLAG_P" is not used
[-Wunused-macros]

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: linux-fsdevel@vger.kernel.org 
Cc: linux-kernel@vger.kernel.org 
---
 fs/hfs/hfs.h          | 2 --
 fs/hfsplus/part_tbl.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h
index 6f194d0768b6..12a807d9dbc0 100644
--- a/fs/hfs/hfs.h
+++ b/fs/hfs/hfs.h
@@ -15,11 +15,9 @@
 #define HFS_MDB_BLK		2 /* Block (w/i partition) of MDB */
 
 /* magic numbers for various disk blocks */
-#define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
 #define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /* various FIXED size parameters */
 #define HFS_SECTOR_SIZE		512    /* size of an HFS sector */
diff --git a/fs/hfsplus/part_tbl.c b/fs/hfsplus/part_tbl.c
index 63164ebc52fa..ecda671d56a8 100644
--- a/fs/hfsplus/part_tbl.c
+++ b/fs/hfsplus/part_tbl.c
@@ -23,11 +23,9 @@
 #define HFS_MDB_BLK		2 /* Block (w/i partition) of MDB */
 
 /* magic numbers for various disk blocks */
-#define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
 #define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /*
  * The new style Mac partition map
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/hfs: remove unused macro to tame gcc
  2020-11-06  3:47 [PATCH] fs/hfs: remove unused macro to tame gcc Alex Shi
@ 2020-11-06 17:56 ` Viacheslav Dubeyko
  0 siblings, 0 replies; 2+ messages in thread
From: Viacheslav Dubeyko @ 2020-11-06 17:56 UTC (permalink / raw)
  To: Alex Shi; +Cc: Linux FS devel list, LKML



> On Nov 5, 2020, at 7:47 PM, Alex Shi <alex.shi@linux.alibaba.com> wrote:
> 
> Couple macro are duplicated defined and they are not used. So
> to tame gcc, let's remove them.
> 
> fs/hfsplus/part_tbl.c:26:0: warning: macro "HFS_DRVR_DESC_MAGIC" is not
> used [-Wunused-macros]
> fs/hfsplus/part_tbl.c:30:0: warning: macro "HFS_MFS_SUPER_MAGIC" is not
> used [-Wunused-macros]
> fs/hfsplus/part_tbl.c:21:0: warning: macro "HFS_DD_BLK" is not used
> [-Wunused-macros]
> net/l2tp/l2tp_core.c:73:0: warning: macro "L2TP_HDRFLAG_P" is not used
> [-Wunused-macros]
> 


Sorry, but this patch doesn’t make sense at all, from my point of view.
It is the declaration of magics that could take place on the volume.
Even if these declarations haven’t been used in the code, then
it is important to be aware about this. I don’t think that it make sense
to follow to the compiler’s complains in this case. I believe that
it needs to keep these declarations.

Thanks,
Viacheslav Dubeyko. 


> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: linux-fsdevel@vger.kernel.org 
> Cc: linux-kernel@vger.kernel.org 
> ---
> fs/hfs/hfs.h          | 2 --
> fs/hfsplus/part_tbl.c | 2 --
> 2 files changed, 4 deletions(-)
> 
> diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h
> index 6f194d0768b6..12a807d9dbc0 100644
> --- a/fs/hfs/hfs.h
> +++ b/fs/hfs/hfs.h
> @@ -15,11 +15,9 @@
> #define HFS_MDB_BLK		2 /* Block (w/i partition) of MDB */
> 
> /* magic numbers for various disk blocks */
> -#define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
> #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
> #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
> #define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
> -#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
> 
> /* various FIXED size parameters */
> #define HFS_SECTOR_SIZE		512    /* size of an HFS sector */
> diff --git a/fs/hfsplus/part_tbl.c b/fs/hfsplus/part_tbl.c
> index 63164ebc52fa..ecda671d56a8 100644
> --- a/fs/hfsplus/part_tbl.c
> +++ b/fs/hfsplus/part_tbl.c
> @@ -23,11 +23,9 @@
> #define HFS_MDB_BLK		2 /* Block (w/i partition) of MDB */
> 
> /* magic numbers for various disk blocks */
> -#define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
> #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
> #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
> #define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
> -#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
> 
> /*
>  * The new style Mac partition map
> -- 
> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-06 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  3:47 [PATCH] fs/hfs: remove unused macro to tame gcc Alex Shi
2020-11-06 17:56 ` Viacheslav Dubeyko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).