ipmi: Use dedicated API for copying a UUID
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 24 Jan 2019 20:22:20 +0000 (22:22 +0200)
committerCorey Minyard <cminyard@mvista.com>
Sun, 10 Feb 2019 01:48:43 +0000 (19:48 -0600)
Use guid_copy() instead of memcpy() to hide guid_t implementation details and
to show we expect guid_t in a raw buffer.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c

index 7991191..e8ba678 100644 (file)
@@ -3156,7 +3156,7 @@ static void guid_handler(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
                goto out;
        }
 
-       memcpy(bmc->fetch_guid.b, msg->msg.data + 1, 16);
+       guid_copy(&bmc->fetch_guid, (guid_t *)(msg->msg.data + 1));
        /*
         * Make sure the guid data is available before setting
         * dyn_guid_set.