Skip to content

Commit

Permalink
nvmet: don't use uuid_le type
Browse files Browse the repository at this point in the history
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@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Andy Shevchenko authored and Christoph Hellwig committed Jul 24, 2018
1 parent 9c891c1 commit 1b0d274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/target/admin-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,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;

Expand Down

0 comments on commit 1b0d274

Please sign in to comment.