tsacct: Remove unused macro definition
PATCH 1/1 tsacct: Remove unused macro definition
The MB macro was defined in tsacct.c but never used, leading to a compiler warning. This patch removes the unused definition to clean up the code and suppress the warning.
--- kernel/tsacct.c | 2 -- 1 file changed, 2 deletions(-)
kernel/tsacct.c +0 -2
@@ -83,7 +83,6 @@ void bacct_add_tsk(struct user_namespace *user_ns,#ifdef CONFIG_TASK_XACCT #define KB 1024 -#define MB (1024*KB)#define KB_MASK (~(KB-1))/* * fill in extended accounting fields
@@ -119,7 +118,6 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)#endif }#undef KB -#undef MBstatic void __acct_update_integrals (struct task_struct *tsk,u64 utime,u64 stime)
Signature · 1 line
2.50.1
Quoted 3 lines · Suchit Karunakaran
The MB macro was defined in
tsacct.cbut never used, leading to a compiler warning. This patch removes the unused definition to clean up the code and suppress the warning.
What compiler warning shows this? As part of a normal build?
We have loads of defines that are not used, especially in drivers, are we now going to start deleting them all?
thanks,
greg k-h
Quoted 8 lines · Greg KH
Quoted 3 lines · Suchit Karunakaran
The MB macro was defined in
tsacct.cbut never used, leading to a compiler warning. This patch removes the unused definition to clean up the code and suppress the warning.What compiler warning shows this? As part of a normal build?
It's not part of the normal build. I built the kernel with C=1 and V=1 flags.
Quoted 3 lines
We have loads of defines that are not used, especially in drivers, are we now going to start deleting them all?
Agreed, sorry for the inconvenience.