Skip to contentSkip to conversation

bcachefs: some cleanups and fix about macro

PATCH In review Julian Sun 2 participants 4 messages Jul 21, 2024 – Jul 22, 2024

lore
Share & tools
lore

Julian Sun

author
#0 lore raw

cover bcachefs: some cleanups and fix about macro

In the macro definition detection tool I developed, several issues were identified, including unused parameters and unused macro definitions. Let us address these issues.

Julian Sun (4):
bcachefs: remove unused macro definition
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: remove the unused parameter in macro bkey_crc_next

 fs/bcachefs/btree_iter.h | 4 ++--
 fs/bcachefs/clock.h      | 9 ---------
 fs/bcachefs/extents.h    | 4 ++--
 3 files changed, 4 insertions(+), 13 deletions(-)
Signature · 1 line
2.39.2
author
#1 lore raw

Apologies, the title of patch2 should be ‘fix macro definition allocate_dropping_locks_errcode’; But it is correct in the actual patch.

Quoted 11 lines · Julian Sun <[email protected]> 于2024年7月21日周日 08:39写道:

In the macro definition detection tool I developed, several issues were identified, including unused parameters and unused macro definitions. Let us address these issues.

Julian Sun (4):
bcachefs: remove unused macro definition
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: remove the unused parameter in macro bkey_crc_next

Quoted 8 lines
 fs/bcachefs/btree_iter.h | 4 ++--
 fs/bcachefs/clock.h      | 9 ---------
 fs/bcachefs/extents.h    | 4 ++--
 3 files changed, 4 insertions(+), 13 deletions(-)

--
2.39.2

--
Julian Sun <[email protected]>

#2 lore raw
In reply to Julian Sun
Quoted 1 line · Julian Sun

In the macro definition detection tool I developed,

Is it commonly used in the kernel?

Thanks,
Hongbo

Quoted 14 lines

several issues were identified, including unused parameters and unused macro definitions. Let us address these issues.

Julian Sun (4):
bcachefs: remove unused macro definition
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: remove the unused parameter in macro bkey_crc_next

  fs/bcachefs/btree_iter.h | 4 ++--
  fs/bcachefs/clock.h      | 9 ---------
  fs/bcachefs/extents.h    | 4 ++--
  3 files changed, 4 insertions(+), 13 deletions(-)
author
#3 lore raw
Quoted 7 lines · Hongbo Li <[email protected]> 于2024年7月21日周日 23:24写道:
Quoted 3 lines · Julian Sun

In the macro definition detection tool I developed,

Is it commonly used in the kernel?

Not yet. Currently, it is still quite rough and its functionality is not fully developed, resulting in some false positives. I am planning to refine it further before integrating it into the kernel.

Quoted 18 lines

Thanks,
Hongbo

Quoted 14 lines

several issues were identified, including unused parameters and unused macro definitions. Let us address these issues.

Julian Sun (4):
bcachefs: remove unused macro definition
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: fix macro definition allocate_dropping_locks
bcachefs: remove the unused parameter in macro bkey_crc_next

  fs/bcachefs/btree_iter.h | 4 ++--
  fs/bcachefs/clock.h      | 9 ---------
  fs/bcachefs/extents.h    | 4 ++--
  3 files changed, 4 insertions(+), 13 deletions(-)

Best regards,

Signature · 1 line
Julian Sun <[email protected]>