linux-next: build warning after merge of the block tree
Subsystems (4)
Hi all,
After merging the block tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:
drivers/nvdimm/pmem.c: In function 'pmem_pagemap_cleanup':drivers/nvdimm/pmem.c:338:24: warning: unused variable 'q' [-Wunused-variable]
338 | struct request_queue *q =
| ^
Introduced by commit
80b58f4e9f4a ("libnvdimm/pmem: Fix blk_cleanup_disk() usage")
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 11 lines · Stephen Rothwell
Hi all,
After merging the block tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
drivers/nvdimm/pmem.c: In function 'pmem_pagemap_cleanup':drivers/nvdimm/pmem.c:338:24: warning: unused variable 'q' [-Wunused-variable]
338 | structrequest_queue*q =
| ^
Ugh, I should have caught this... fix incoming.
Quoted 7 lines
Introduced by commit
80b58f4e9f4a("libnvdimm/pmem: Fixblk_cleanup_disk()usage")--
Cheers,
Stephen Rothwell
PATCH 1/1 libnvdimm/pmem: Fix pmem_pagemap_cleanup compile warning
In reply to Stephen RothwellThe recent fix to pmem_pagemap_cleanup() to solve a NULL pointer dereference with the queue_to_disk() helper neglected to remove the @q variable when queue_to_disk() was replaced.
Drop the conversion of @pgmap to its containing 'struct request_queue' since pgmap->owner supersedes the need to reference @q.
--- drivers/nvdimm/pmem.c | 2 -- 1 file changed, 2 deletions(-)
drivers/nvdimm/pmem.c +0 -2
@@ -335,8 +335,6 @@ static const struct attribute_group *pmem_attribute_groups[] = {static void pmem_pagemap_cleanup (struct dev_pagemap *pgmap) { -struct request_queue *q = - container_of(pgmap->ref, struct request_queue, q_usage_counter);struct pmem_device *pmem = pgmap->owner;blk_cleanup_disk (pmem->disk);
Jens Axboe
maintainerRe: [PATCH] libnvdimm/pmem: Fix pmem_pagemap_cleanup compile warning
Quoted 6 lines · Dan Williams
The recent fix to
pmem_pagemap_cleanup()to solve a NULL pointer dereference with thequeue_to_disk()helper neglected to remove the @q variable whenqueue_to_disk()was replaced.Drop the conversion of @pgmap to its containing 'struct
request_queue' sincepgmap->ownersupersedes the need to reference @q.
I folded this in.
Signature · 1 line
Jens Axboe