linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/bitmap: remove expect_eq_u32_array
@ 2020-01-21  8:33 Alex Shi
  2020-01-21 13:20 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Shi @ 2020-01-21  8:33 UTC (permalink / raw)
  Cc: Andrew Morton, Andy Shevchenko, Linus Walleij, Yury Norov,
	William Breathitt Gray, Tobin C. Harding, linux-kernel

expect_eq_u32_array isn't used from commit 3aa56885e516 ("bitmap:
replace bitmap_{from,to}_u32array").
And EXP2_IN_BITS are never used. so better to remove them.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org> 
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 
Cc: Linus Walleij <linus.walleij@linaro.org> 
Cc: Yury Norov <yury.norov@gmail.com> 
Cc: William Breathitt Gray <vilhelm.gray@gmail.com> 
Cc: "Tobin C. Harding" <tobin@kernel.org> 
Cc: linux-kernel@vger.kernel.org 
---
 lib/test_bitmap.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index e14a15ac250b..0d344ae494a9 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -170,7 +170,6 @@ static bool __init __check_eq_clump8(const char *srcfile, unsigned int line,
 #define expect_eq_uint(...)		__expect_eq(uint, ##__VA_ARGS__)
 #define expect_eq_bitmap(...)		__expect_eq(bitmap, ##__VA_ARGS__)
 #define expect_eq_pbl(...)		__expect_eq(pbl, ##__VA_ARGS__)
-#define expect_eq_u32_array(...)	__expect_eq(u32_array, ##__VA_ARGS__)
 #define expect_eq_clump8(...)		__expect_eq(clump8, ##__VA_ARGS__)
 
 static void __init test_zero_clear(void)
@@ -270,8 +269,6 @@ static void __init test_copy(void)
 	expect_eq_pbl("0-108,128-1023", bmap2, 1024);
 }
 
-#define EXP2_IN_BITS	(sizeof(exp2) * 8)
-
 static void __init test_replace(void)
 {
 	unsigned int nbits = 64;
-- 
1.8.3.1


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

* Re: [PATCH] lib/bitmap: remove expect_eq_u32_array
  2020-01-21  8:33 [PATCH] lib/bitmap: remove expect_eq_u32_array Alex Shi
@ 2020-01-21 13:20 ` Andy Shevchenko
  2020-01-22  1:10   ` Yury Norov
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2020-01-21 13:20 UTC (permalink / raw)
  To: Alex Shi
  Cc: Andrew Morton, Linus Walleij, Yury Norov, William Breathitt Gray,
	Tobin C. Harding, linux-kernel

On Tue, Jan 21, 2020 at 04:33:45PM +0800, Alex Shi wrote:
> expect_eq_u32_array isn't used from commit 3aa56885e516 ("bitmap:
> replace bitmap_{from,to}_u32array").
> And EXP2_IN_BITS are never used. so better to remove them.

I think better "fix" will be to add test cases.
See the commit message in the

commit 3aa56885e51683a19c8aa71739fd279b3f501cd7
Author: Yury Norov <ynorov@caviumnetworks.com>
Date:   Tue Feb 6 15:38:06 2018 -0800

    bitmap: replace bitmap_{from,to}_u32array

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] lib/bitmap: remove expect_eq_u32_array
  2020-01-21 13:20 ` Andy Shevchenko
@ 2020-01-22  1:10   ` Yury Norov
  2020-01-22  8:31     ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Yury Norov @ 2020-01-22  1:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Alex Shi, Andrew Morton, Linus Walleij, William Breathitt Gray,
	Tobin C. Harding, linux-kernel

On Tue, Jan 21, 2020 at 03:20:50PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 21, 2020 at 04:33:45PM +0800, Alex Shi wrote:
> > expect_eq_u32_array isn't used from commit 3aa56885e516 ("bitmap:
> > replace bitmap_{from,to}_u32array").
> > And EXP2_IN_BITS are never used. so better to remove them.
> 
> I think better "fix" will be to add test cases.
> See the commit message in the
> 
> commit 3aa56885e51683a19c8aa71739fd279b3f501cd7
> Author: Yury Norov <ynorov@caviumnetworks.com>
> Date:   Tue Feb 6 15:38:06 2018 -0800
> 
>     bitmap: replace bitmap_{from,to}_u32array
> 
> -- 
> With Best Regards,
> Andy Shevchenko
 
On the other hand, it's almost 2 years gone since the commit you
mentioned, and nobody used the check_eq_u32_array(). So I think
it's long enough to consider the function useless.

This function is the last example of 2 lengths in input, so I'd
prefer to remove it. However, removing check_eq_u32_array() should
be synchronized with underlying __check_eq_u32_array().

Yury

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

* Re: [PATCH] lib/bitmap: remove expect_eq_u32_array
  2020-01-22  1:10   ` Yury Norov
@ 2020-01-22  8:31     ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2020-01-22  8:31 UTC (permalink / raw)
  To: Yury Norov
  Cc: Alex Shi, Andrew Morton, Linus Walleij, William Breathitt Gray,
	Tobin C. Harding, linux-kernel

On Tue, Jan 21, 2020 at 05:10:18PM -0800, Yury Norov wrote:
> On Tue, Jan 21, 2020 at 03:20:50PM +0200, Andy Shevchenko wrote:
> > On Tue, Jan 21, 2020 at 04:33:45PM +0800, Alex Shi wrote:
> > > expect_eq_u32_array isn't used from commit 3aa56885e516 ("bitmap:
> > > replace bitmap_{from,to}_u32array").
> > > And EXP2_IN_BITS are never used. so better to remove them.
> > 
> > I think better "fix" will be to add test cases.
> > See the commit message in the
> > 
> > commit 3aa56885e51683a19c8aa71739fd279b3f501cd7
> > Author: Yury Norov <ynorov@caviumnetworks.com>
> > Date:   Tue Feb 6 15:38:06 2018 -0800
> > 
> >     bitmap: replace bitmap_{from,to}_u32array

> On the other hand, it's almost 2 years gone since the commit you
> mentioned, and nobody used the check_eq_u32_array(). So I think
> it's long enough to consider the function useless.
> 
> This function is the last example of 2 lengths in input, so I'd
> prefer to remove it. However, removing check_eq_u32_array() should
> be synchronized with underlying __check_eq_u32_array().

Thanks for elaboration.
No objection from my side!

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2020-01-22  8:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  8:33 [PATCH] lib/bitmap: remove expect_eq_u32_array Alex Shi
2020-01-21 13:20 ` Andy Shevchenko
2020-01-22  1:10   ` Yury Norov
2020-01-22  8:31     ` Andy Shevchenko

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