* [PATCH] dm-pcache: cleanup: fix coding style report by checkpatch.pl
@ 2025-09-01 5:42 Dongsheng Yang
0 siblings, 0 replies; only message in thread
From: Dongsheng Yang @ 2025-09-01 5:42 UTC (permalink / raw)
To: mpatocka, agk, snitzer; +Cc: dm-devel, Dongsheng Yang
A patch from a few days ago fixed the division issue on 32-bit machines,
but it introduced a coding style problem.
WARNING: Missing a blank line after declarations
+ u32 rem;
+ div_u64_rem(off >> PCACHE_CACHE_SUBTREE_SIZE_SHIFT,
cache->n_ksets, &rem);
total: 0 errors, 1 warnings, 634 lines checked
Signed-off-by: Dongsheng Yang <dongsheng.yang@linux.dev>
---
drivers/md/dm-pcache/cache.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-pcache/cache.h b/drivers/md/dm-pcache/cache.h
index b10e721ab1b7..f005c9d9a7aa 100644
--- a/drivers/md/dm-pcache/cache.h
+++ b/drivers/md/dm-pcache/cache.h
@@ -373,9 +373,11 @@ static inline void *get_key_head_addr(struct pcache_cache *cache)
static inline u32 get_kset_id(struct pcache_cache *cache, u64 off)
{
- u32 rem;
- div_u64_rem(off >> PCACHE_CACHE_SUBTREE_SIZE_SHIFT, cache->n_ksets, &rem);
- return rem;
+ u32 kset_id;
+
+ div_u64_rem(off >> PCACHE_CACHE_SUBTREE_SIZE_SHIFT, cache->n_ksets, &kset_id);
+
+ return kset_id;
}
static inline struct pcache_cache_kset *get_kset(struct pcache_cache *cache, u32 kset_id)
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-01 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 5:42 [PATCH] dm-pcache: cleanup: fix coding style report by checkpatch.pl Dongsheng Yang
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).