public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: Clear a couple of W=1 warnings
@ 2024-04-25 12:08 John Garry
  2024-04-25 12:08 ` [PATCH 1/2] xfs: Clear W=1 warning in xfs_iwalk_run_callbacks(): John Garry
  2024-04-25 12:08 ` [PATCH 2/2] xfs: Clear W=1 warning in xfs_trans_unreserve_and_mod_sb(): John Garry
  0 siblings, 2 replies; 14+ messages in thread
From: John Garry @ 2024-04-25 12:08 UTC (permalink / raw)
  To: chandan.babu, djwong; +Cc: linux-xfs, John Garry

For configs XFS_DEBUG and XFS_WARN disabled, there are a couple of W=1
warnings for unused variables. I have attempted to clear these here by
simply marking the unused variables as __maybe_unused.

I suppose that another solution would be to change the ASSERT() statement
relevant to this config from:
#define ASSERT(expr) ((void)0)
to:
#define ASSERT(expr) ((void)(expr))

Then the problem is that some local variables need to lose the
#ifdef XFS_DEBUG guards, as those variables are now referenced in
ASSERT(). This means that the objcode grows ever so slightly. I
assume that this has all been considered previously...

Based on v6.9-rc5

John Garry (2):
  xfs: Clear W=1 warning in xfs_iwalk_run_callbacks():
  xfs: Clear W=1 warning in xfs_trans_unreserve_and_mod_sb():

 fs/xfs/xfs_iwalk.c | 2 +-
 fs/xfs/xfs_trans.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2024-05-01  8:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-25 12:08 [PATCH 0/2] xfs: Clear a couple of W=1 warnings John Garry
2024-04-25 12:08 ` [PATCH 1/2] xfs: Clear W=1 warning in xfs_iwalk_run_callbacks(): John Garry
2024-04-25 12:17   ` Christoph Hellwig
2024-04-25 13:24     ` John Garry
2024-04-25 13:30       ` Christoph Hellwig
2024-04-25 13:33         ` John Garry
2024-04-25 15:37           ` John Garry
2024-04-25 16:17             ` Darrick J. Wong
2024-04-25 23:30             ` Dave Chinner
2024-04-26  6:09               ` Christoph Hellwig
2024-05-01  8:10               ` John Garry
2024-04-25 12:08 ` [PATCH 2/2] xfs: Clear W=1 warning in xfs_trans_unreserve_and_mod_sb(): John Garry
2024-04-25 12:18   ` Christoph Hellwig
2024-04-25 13:35     ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox