powerpc: Use sizeof(*foo) rather than sizeof(struct foo)
It's slightly less error prone to use sizeof(*foo) rather than specifying the type. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> [mpe: Consolidate into one patch, rewrite change log] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

کامیت شده توسط
Michael Ellerman

والد
31513207ce
کامیت
a0828cf57a
@@ -314,7 +314,7 @@ static int opal_handle_hmi_event(struct notifier_block *nb,
|
||||
pr_err("HMI: out of memory, Opal message event not handled\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(&msg_node->hmi_evt, hmi_evt, sizeof(struct OpalHMIEvent));
|
||||
memcpy(&msg_node->hmi_evt, hmi_evt, sizeof(*hmi_evt));
|
||||
|
||||
spin_lock_irqsave(&opal_hmi_evt_lock, flags);
|
||||
list_add(&msg_node->list, &opal_hmi_evt_list);
|
||||
|
مرجع در شماره جدید
Block a user