linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tsacct: Remove unused macro definition
@ 2025-07-29  5:33 Suchit Karunakaran
  2025-07-29  5:52 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Suchit Karunakaran @ 2025-07-29  5:33 UTC (permalink / raw)
  To: skhan, gregkh, linux-kernel; +Cc: linux-kernel-mentees, Suchit Karunakaran

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.

Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
---
 kernel/tsacct.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/tsacct.c b/kernel/tsacct.c
index 16b283f9d831..0fd7ef291454 100644
--- a/kernel/tsacct.c
+++ b/kernel/tsacct.c
@@ -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 MB
 
 static void __acct_update_integrals(struct task_struct *tsk,
 				    u64 utime, u64 stime)
-- 
2.50.1


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

* Re: [PATCH] tsacct: Remove unused macro definition
  2025-07-29  5:33 [PATCH] tsacct: Remove unused macro definition Suchit Karunakaran
@ 2025-07-29  5:52 ` Greg KH
  2025-07-29  6:37   ` Suchit Karunakaran
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-07-29  5:52 UTC (permalink / raw)
  To: Suchit Karunakaran; +Cc: skhan, linux-kernel, linux-kernel-mentees

On Tue, Jul 29, 2025 at 11:03:59AM +0530, Suchit Karunakaran wrote:
> 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.

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

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

* Re: [PATCH] tsacct: Remove unused macro definition
  2025-07-29  5:52 ` Greg KH
@ 2025-07-29  6:37   ` Suchit Karunakaran
  0 siblings, 0 replies; 3+ messages in thread
From: Suchit Karunakaran @ 2025-07-29  6:37 UTC (permalink / raw)
  To: Greg KH; +Cc: skhan, linux-kernel, linux-kernel-mentees

On Tue, 29 Jul 2025 at 11:22, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jul 29, 2025 at 11:03:59AM +0530, Suchit Karunakaran wrote:
> > 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.
>
> 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.

> 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.

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

end of thread, other threads:[~2025-07-29  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29  5:33 [PATCH] tsacct: Remove unused macro definition Suchit Karunakaran
2025-07-29  5:52 ` Greg KH
2025-07-29  6:37   ` Suchit Karunakaran

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).