* [PATCH] nvme: remove unused parameter
@ 2020-04-03 16:24 Keith Busch
2020-04-04 7:14 ` Christoph Hellwig
0 siblings, 1 reply; 13+ messages in thread
From: Keith Busch @ 2020-04-03 16:24 UTC (permalink / raw)
To: linux-nvme, hch, sagi; +Cc: Keith Busch
nvme_alloc_ns_head() doesn't use the 'struct nvme_id_ns' parameter.
Remove it, and update caller accordingly.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d219a531ba4f..05aa3525ef06 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3410,8 +3410,7 @@ static int __nvme_check_ids(struct nvme_subsystem *subsys,
}
static struct nvme_ns_head *nvme_alloc_ns_head(struct nvme_ctrl *ctrl,
- unsigned nsid, struct nvme_id_ns *id,
- struct nvme_ns_ids *ids)
+ unsigned nsid, struct nvme_ns_ids *ids)
{
struct nvme_ns_head *head;
size_t size = sizeof(*head);
@@ -3482,7 +3481,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
if (is_shared)
head = nvme_find_ns_head(ctrl->subsys, nsid);
if (!head) {
- head = nvme_alloc_ns_head(ctrl, nsid, id, &ids);
+ head = nvme_alloc_ns_head(ctrl, nsid, &ids);
if (IS_ERR(head)) {
ret = PTR_ERR(head);
goto out_unlock;
--
2.24.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: remove unused parameter
2020-04-03 16:24 [PATCH] nvme: remove unused parameter Keith Busch
@ 2020-04-04 7:14 ` Christoph Hellwig
0 siblings, 0 replies; 13+ messages in thread
From: Christoph Hellwig @ 2020-04-04 7:14 UTC (permalink / raw)
To: Keith Busch; +Cc: hch, linux-nvme, sagi
On Fri, Apr 03, 2020 at 09:24:09AM -0700, Keith Busch wrote:
> nvme_alloc_ns_head() doesn't use the 'struct nvme_id_ns' parameter.
> Remove it, and update caller accordingly.
applied to nvme-5.8.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] nvme: remove unused parameter
[not found] <CGME20240729063922epcas5p35577196a5bb929f1fdf60306987d134d@epcas5p3.samsung.com>
@ 2024-07-29 6:31 ` Kanchan Joshi
2024-07-29 6:42 ` Sagi Grimberg
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Kanchan Joshi @ 2024-07-29 6:31 UTC (permalink / raw)
To: kbusch, hch, sagi; +Cc: linux-nvme, Kanchan Joshi
First parameter of nvme_init_integrity() is unused.
Remove it, and modify the callers.
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
drivers/nvme/host/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index e78ef31eeef0..d7f5b24ce003 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1756,7 +1756,7 @@ int nvme_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}
-static bool nvme_init_integrity(struct gendisk *disk, struct nvme_ns_head *head,
+static bool nvme_init_integrity(struct nvme_ns_head *head,
struct queue_limits *lim)
{
struct blk_integrity *bi = &lim->integrity;
@@ -2175,7 +2175,7 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
* I/O to namespaces with metadata except when the namespace supports
* PI, as it can strip/insert in that case.
*/
- if (!nvme_init_integrity(ns->disk, ns->head, &lim))
+ if (!nvme_init_integrity(ns->head, &lim))
capacity = 0;
ret = queue_limits_commit_update(ns->disk->queue, &lim);
@@ -2279,7 +2279,7 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_ns_info *info)
if (unsupported)
ns->head->disk->flags |= GENHD_FL_HIDDEN;
else
- nvme_init_integrity(ns->head->disk, ns->head, &lim);
+ nvme_init_integrity(ns->head, &lim);
ret = queue_limits_commit_update(ns->head->disk->queue, &lim);
set_capacity_and_notify(ns->head->disk, get_capacity(ns->disk));
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: remove unused parameter
2024-07-29 6:31 ` Kanchan Joshi
@ 2024-07-29 6:42 ` Sagi Grimberg
2024-07-29 14:15 ` Christoph Hellwig
2024-07-29 14:34 ` Keith Busch
2 siblings, 0 replies; 13+ messages in thread
From: Sagi Grimberg @ 2024-07-29 6:42 UTC (permalink / raw)
To: Kanchan Joshi, kbusch, hch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: remove unused parameter
2024-07-29 6:31 ` Kanchan Joshi
2024-07-29 6:42 ` Sagi Grimberg
@ 2024-07-29 14:15 ` Christoph Hellwig
2024-07-29 14:34 ` Keith Busch
2 siblings, 0 replies; 13+ messages in thread
From: Christoph Hellwig @ 2024-07-29 14:15 UTC (permalink / raw)
To: Kanchan Joshi; +Cc: kbusch, hch, sagi, linux-nvme
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: remove unused parameter
2024-07-29 6:31 ` Kanchan Joshi
2024-07-29 6:42 ` Sagi Grimberg
2024-07-29 14:15 ` Christoph Hellwig
@ 2024-07-29 14:34 ` Keith Busch
2 siblings, 0 replies; 13+ messages in thread
From: Keith Busch @ 2024-07-29 14:34 UTC (permalink / raw)
To: Kanchan Joshi; +Cc: hch, sagi, linux-nvme
Thanks, applied to nvme-6.11.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] nvme: Remove unused parameter
@ 2024-08-14 13:56 ` Nilay Shroff
2024-08-16 5:31 ` Kanchan Joshi
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Nilay Shroff @ 2024-08-14 13:56 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, kbusch, sagi, axboe, gjoyce, Nilay Shroff
The "name" field in struct nvme_ctrl is unsued so removing it.
This would help save 12 bytes of space for each nvme_ctrl instance
created.
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
drivers/nvme/host/nvme.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index ae5314d32943..da57947130cc 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -301,7 +301,6 @@ struct nvme_ctrl {
struct opal_dev *opal_dev;
- char name[12];
u16 cntlid;
u16 mtfa;
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-14 13:56 ` [PATCH] nvme: Remove " Nilay Shroff
@ 2024-08-16 5:31 ` Kanchan Joshi
2024-08-16 5:41 ` Christoph Hellwig
2024-08-20 14:44 ` Keith Busch
2 siblings, 0 replies; 13+ messages in thread
From: Kanchan Joshi @ 2024-08-16 5:31 UTC (permalink / raw)
To: Nilay Shroff, linux-nvme; +Cc: hch, kbusch, sagi, axboe, gjoyce
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-14 13:56 ` [PATCH] nvme: Remove " Nilay Shroff
2024-08-16 5:31 ` Kanchan Joshi
@ 2024-08-16 5:41 ` Christoph Hellwig
2024-08-16 7:00 ` Nilay Shroff
2024-08-20 14:44 ` Keith Busch
2 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2024-08-16 5:41 UTC (permalink / raw)
To: Nilay Shroff; +Cc: linux-nvme, hch, kbusch, sagi, axboe, gjoyce
On Wed, Aug 14, 2024 at 07:26:50PM +0530, Nilay Shroff wrote:
> The "name" field in struct nvme_ctrl is unsued so removing it.
> This would help save 12 bytes of space for each nvme_ctrl instance
> created.
name is a structure member, not a parameter.
The code change itself look fine, though.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-16 5:41 ` Christoph Hellwig
@ 2024-08-16 7:00 ` Nilay Shroff
2024-08-16 7:59 ` Christoph Hellwig
0 siblings, 1 reply; 13+ messages in thread
From: Nilay Shroff @ 2024-08-16 7:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme, kbusch, sagi, axboe, gjoyce
Hi Christoph,
On 8/16/24 11:11, Christoph Hellwig wrote:
> On Wed, Aug 14, 2024 at 07:26:50PM +0530, Nilay Shroff wrote:
>> The "name" field in struct nvme_ctrl is unsued so removing it.
>> This would help save 12 bytes of space for each nvme_ctrl instance
>> created.
>
> name is a structure member, not a parameter.
>
> The code change itself look fine, though.
>
>
Yeah ok, if you prefer, shall I update the patch subject line and
resend the patch?
Thanks,
--Nilay
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-16 7:00 ` Nilay Shroff
@ 2024-08-16 7:59 ` Christoph Hellwig
2024-08-16 8:01 ` Nilay Shroff
0 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2024-08-16 7:59 UTC (permalink / raw)
To: Nilay Shroff; +Cc: Christoph Hellwig, linux-nvme, kbusch, sagi, axboe, gjoyce
On Fri, Aug 16, 2024 at 12:30:45PM +0530, Nilay Shroff wrote:
> Yeah ok, if you prefer, shall I update the patch subject line and
> resend the patch?
Maybe Keith can just fix it up.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-16 7:59 ` Christoph Hellwig
@ 2024-08-16 8:01 ` Nilay Shroff
0 siblings, 0 replies; 13+ messages in thread
From: Nilay Shroff @ 2024-08-16 8:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme, kbusch, sagi, axboe, gjoyce
On 8/16/24 13:29, Christoph Hellwig wrote:
> On Fri, Aug 16, 2024 at 12:30:45PM +0530, Nilay Shroff wrote:
>> Yeah ok, if you prefer, shall I update the patch subject line and
>> resend the patch?
>
> Maybe Keith can just fix it up.
>
OK thanks!
--Nilay
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] nvme: Remove unused parameter
2024-08-14 13:56 ` [PATCH] nvme: Remove " Nilay Shroff
2024-08-16 5:31 ` Kanchan Joshi
2024-08-16 5:41 ` Christoph Hellwig
@ 2024-08-20 14:44 ` Keith Busch
2 siblings, 0 replies; 13+ messages in thread
From: Keith Busch @ 2024-08-20 14:44 UTC (permalink / raw)
To: Nilay Shroff; +Cc: linux-nvme, hch, sagi, axboe, gjoyce
Thanks, applied to nvme-6.11 with subject change "parameter" to "field".
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-08-20 16:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 16:24 [PATCH] nvme: remove unused parameter Keith Busch
2020-04-04 7:14 ` Christoph Hellwig
[not found] <CGME20240729063922epcas5p35577196a5bb929f1fdf60306987d134d@epcas5p3.samsung.com>
2024-07-29 6:31 ` Kanchan Joshi
2024-07-29 6:42 ` Sagi Grimberg
2024-07-29 14:15 ` Christoph Hellwig
2024-07-29 14:34 ` Keith Busch
[not found] <CGME20240814135805epcas5p319d7763f641ae4aeac6b4f39fba0072f@epcas5p3.samsung.com>
2024-08-14 13:56 ` [PATCH] nvme: Remove " Nilay Shroff
2024-08-16 5:31 ` Kanchan Joshi
2024-08-16 5:41 ` Christoph Hellwig
2024-08-16 7:00 ` Nilay Shroff
2024-08-16 7:59 ` Christoph Hellwig
2024-08-16 8:01 ` Nilay Shroff
2024-08-20 14:44 ` Keith Busch
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).