linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] nvmet: Don't use uuid_le type
@ 2018-07-17 14:17 Andy Shevchenko
  2018-07-17 14:27 ` Johannes Thumshirn
  2018-07-17 14:34 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2018-07-17 14:17 UTC (permalink / raw)


Don't use sizeof(uuid_le) where none of the parameters is type of uuid_le.
Since both arguments are u8 [16], use size of destination there.

Moreover, uuid_le is a deprecated type, and nvmet is using uuid_t
already.

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---

- use sizeof(dest)

 drivers/nvme/target/admin-cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 38803576d5e1..51a35faa88e3 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -308,7 +308,7 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)
 	 */
 	id->nmic = (1 << 0);
 
-	memcpy(&id->nguid, &ns->nguid, sizeof(uuid_le));
+	memcpy(&id->nguid, &ns->nguid, sizeof(id->nguid));
 
 	id->lbaf[0].ds = ns->blksize_shift;
 
-- 
2.18.0

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

* [PATCH v2] nvmet: Don't use uuid_le type
  2018-07-17 14:17 [PATCH v2] nvmet: Don't use uuid_le type Andy Shevchenko
@ 2018-07-17 14:27 ` Johannes Thumshirn
  2018-07-17 14:34 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2018-07-17 14:27 UTC (permalink / raw)


Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* [PATCH v2] nvmet: Don't use uuid_le type
  2018-07-17 14:17 [PATCH v2] nvmet: Don't use uuid_le type Andy Shevchenko
  2018-07-17 14:27 ` Johannes Thumshirn
@ 2018-07-17 14:34 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-07-17 14:34 UTC (permalink / raw)


Thanks, applied to nvme-4.19.

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

end of thread, other threads:[~2018-07-17 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 14:17 [PATCH v2] nvmet: Don't use uuid_le type Andy Shevchenko
2018-07-17 14:27 ` Johannes Thumshirn
2018-07-17 14:34 ` Christoph Hellwig

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