llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused
@ 2025-04-07  7:21 Andy Shevchenko
  2025-04-14 10:04 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-07  7:21 UTC (permalink / raw)
  To: Jens Axboe, dm-devel, linux-kernel, llvm
  Cc: Alasdair Kergon, Mike Snitzer, Mikulas Patocka, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Andy Shevchenko

The mempool_needs_integrity is unused. This, in particular, prevents
kernel builds with Clang, `make W=1` and CONFIG_WERROR=y:

drivers/md/dm-table.c:1052:7: error: variable 'mempool_needs_integrity' set but not used [-Werror,-Wunused-but-set-variable]
 1052 |         bool mempool_needs_integrity = t->integrity_supported;
      |              ^

Fix this by removing the leftover.

Fixes: 105ca2a2c2ff ("block: split struct bio_integrity_payload")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/md/dm-table.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 35100a435c88..53759dbbe9d6 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1049,7 +1049,6 @@ static int dm_table_alloc_md_mempools(struct dm_table *t, struct mapped_device *
 	unsigned int min_pool_size = 0, pool_size;
 	struct dm_md_mempools *pools;
 	unsigned int bioset_flags = 0;
-	bool mempool_needs_integrity = t->integrity_supported;
 
 	if (unlikely(type == DM_TYPE_NONE)) {
 		DMERR("no table type is set, can't allocate mempools");
@@ -1074,8 +1073,6 @@ static int dm_table_alloc_md_mempools(struct dm_table *t, struct mapped_device *
 
 		per_io_data_size = max(per_io_data_size, ti->per_io_data_size);
 		min_pool_size = max(min_pool_size, ti->num_flush_bios);
-
-		mempool_needs_integrity |= ti->mempool_needs_integrity;
 	}
 	pool_size = max(dm_get_reserved_bio_based_ios(), min_pool_size);
 	front_pad = roundup(per_io_data_size,
-- 
2.47.2


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

* Re: [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused
  2025-04-07  7:21 [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused Andy Shevchenko
@ 2025-04-14 10:04 ` Andy Shevchenko
  2025-04-14 10:05   ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-14 10:04 UTC (permalink / raw)
  To: Jens Axboe, dm-devel, linux-kernel, llvm
  Cc: Alasdair Kergon, Mike Snitzer, Mikulas Patocka, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt

On Mon, Apr 07, 2025 at 10:21:26AM +0300, Andy Shevchenko wrote:
> The mempool_needs_integrity is unused. This, in particular, prevents
> kernel builds with Clang, `make W=1` and CONFIG_WERROR=y:
> 
> drivers/md/dm-table.c:1052:7: error: variable 'mempool_needs_integrity' set but not used [-Werror,-Wunused-but-set-variable]
>  1052 |         bool mempool_needs_integrity = t->integrity_supported;
>       |              ^
> 
> Fix this by removing the leftover.

This issue is still present in v6.15-rc1.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused
  2025-04-14 10:04 ` Andy Shevchenko
@ 2025-04-14 10:05   ` Andy Shevchenko
  2025-04-14 12:13     ` Mikulas Patocka
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-14 10:05 UTC (permalink / raw)
  To: Jens Axboe, dm-devel, linux-kernel, llvm
  Cc: Alasdair Kergon, Mike Snitzer, Mikulas Patocka, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt

On Mon, Apr 14, 2025 at 01:04:49PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 07, 2025 at 10:21:26AM +0300, Andy Shevchenko wrote:
> > The mempool_needs_integrity is unused. This, in particular, prevents
> > kernel builds with Clang, `make W=1` and CONFIG_WERROR=y:
> > 
> > drivers/md/dm-table.c:1052:7: error: variable 'mempool_needs_integrity' set but not used [-Werror,-Wunused-but-set-variable]
> >  1052 |         bool mempool_needs_integrity = t->integrity_supported;
> >       |              ^
> > 
> > Fix this by removing the leftover.
> 
> This issue is still present in v6.15-rc1.

I meant v6.15-rc2, of course.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused
  2025-04-14 10:05   ` Andy Shevchenko
@ 2025-04-14 12:13     ` Mikulas Patocka
  2025-04-15  6:17       ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Mikulas Patocka @ 2025-04-14 12:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Jens Axboe, dm-devel, linux-kernel, llvm, Alasdair Kergon,
	Mike Snitzer, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
	Justin Stitt



On Mon, 14 Apr 2025, Andy Shevchenko wrote:

> On Mon, Apr 14, 2025 at 01:04:49PM +0300, Andy Shevchenko wrote:
> > On Mon, Apr 07, 2025 at 10:21:26AM +0300, Andy Shevchenko wrote:
> > > The mempool_needs_integrity is unused. This, in particular, prevents
> > > kernel builds with Clang, `make W=1` and CONFIG_WERROR=y:
> > > 
> > > drivers/md/dm-table.c:1052:7: error: variable 'mempool_needs_integrity' set but not used [-Werror,-Wunused-but-set-variable]
> > >  1052 |         bool mempool_needs_integrity = t->integrity_supported;
> > >       |              ^
> > > 
> > > Fix this by removing the leftover.
> > 
> > This issue is still present in v6.15-rc1.
> 
> I meant v6.15-rc2, of course.
> 
> -- 
> With Best Regards,
> Andy Shevchenko

I will send it to Linus (maybe with other changes) before 6.15 comes out.

Mikulas


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

* Re: [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused
  2025-04-14 12:13     ` Mikulas Patocka
@ 2025-04-15  6:17       ` Andy Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2025-04-15  6:17 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Jens Axboe, dm-devel, linux-kernel, llvm, Alasdair Kergon,
	Mike Snitzer, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
	Justin Stitt

On Mon, Apr 14, 2025 at 02:13:18PM +0200, Mikulas Patocka wrote:
> On Mon, 14 Apr 2025, Andy Shevchenko wrote:
> > On Mon, Apr 14, 2025 at 01:04:49PM +0300, Andy Shevchenko wrote:
> > > On Mon, Apr 07, 2025 at 10:21:26AM +0300, Andy Shevchenko wrote:
> > > > The mempool_needs_integrity is unused. This, in particular, prevents
> > > > kernel builds with Clang, `make W=1` and CONFIG_WERROR=y:
> > > > 
> > > > drivers/md/dm-table.c:1052:7: error: variable 'mempool_needs_integrity' set but not used [-Werror,-Wunused-but-set-variable]
> > > >  1052 |         bool mempool_needs_integrity = t->integrity_supported;
> > > >       |              ^
> > > > 
> > > > Fix this by removing the leftover.
> > > 
> > > This issue is still present in v6.15-rc1.
> > 
> > I meant v6.15-rc2, of course.
> 
> I will send it to Linus (maybe with other changes) before 6.15 comes out.

Thank you!

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2025-04-15  6:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  7:21 [PATCH v1 1/1] dm table: Fix W=1 build warning when mempool_needs_integrity is unused Andy Shevchenko
2025-04-14 10:04 ` Andy Shevchenko
2025-04-14 10:05   ` Andy Shevchenko
2025-04-14 12:13     ` Mikulas Patocka
2025-04-15  6:17       ` 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).