mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lightnvm: remove chnl_offset in nvme_nvm_identity
@ 2018-01-30 14:30 Matias Bjørling
  2018-01-31  1:55 ` Javier González
  0 siblings, 1 reply; 2+ messages in thread
From: Matias Bjørling @ 2018-01-30 14:30 UTC (permalink / raw)
  To: linux-block; +Cc: linux-kernel, Matias Bjørling

The identity structure is initialized to zero in the beginning of
the nvme_nvm_identity function. The chnl_offset is separately set to
zero. Since both the variable and assignment is never changed, remove
them.

Signed-off-by: Matias Bjørling <mb@lightnvm.io>
---
 drivers/nvme/host/lightnvm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index e5544806fb0e..dc0b1335c7c6 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -59,8 +59,7 @@ struct nvme_nvm_identity {
 	__u64			rsvd[2];
 	__le64			prp1;
 	__le64			prp2;
-	__le32			chnl_off;
-	__u32			rsvd11[5];
+	__u32			rsvd11[6];
 };
 
 struct nvme_nvm_getbbtbl {
@@ -268,7 +267,6 @@ static int nvme_nvm_identity(struct nvm_dev *nvmdev, struct nvm_id *nvm_id)
 
 	c.identity.opcode = nvme_nvm_admin_identity;
 	c.identity.nsid = cpu_to_le32(ns->head->ns_id);
-	c.identity.chnl_off = 0;
 
 	nvme_nvm_id = kmalloc(sizeof(struct nvme_nvm_id), GFP_KERNEL);
 	if (!nvme_nvm_id)
-- 
2.11.0

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

* Re: [PATCH] lightnvm: remove chnl_offset in nvme_nvm_identity
  2018-01-30 14:30 [PATCH] lightnvm: remove chnl_offset in nvme_nvm_identity Matias Bjørling
@ 2018-01-31  1:55 ` Javier González
  0 siblings, 0 replies; 2+ messages in thread
From: Javier González @ 2018-01-31  1:55 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: linux-block, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

> On 30 Jan 2018, at 22.30, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> The identity structure is initialized to zero in the beginning of
> the nvme_nvm_identity function. The chnl_offset is separately set to
> zero. Since both the variable and assignment is never changed, remove
> them.
> 
> Signed-off-by: Matias Bjørling <mb@lightnvm.io>
> ---
> drivers/nvme/host/lightnvm.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 

Looks good.

Reviewed-by: Javier González <javier@cnexlabs.com>


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2018-01-31  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 14:30 [PATCH] lightnvm: remove chnl_offset in nvme_nvm_identity Matias Bjørling
2018-01-31  1:55 ` Javier González

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®