From: Heiko Carstens Date: Thu, 3 Feb 2022 09:56:07 +0000 (+0100) Subject: s390/lgr: use simple assignment instead of memcpy X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ba2d394c60ad4b5d70cd449b9e6f6380c2e36a50;p=linux.git s390/lgr: use simple assignment instead of memcpy It is quite pointless to use memcpy to copy two bytes, besides that this construct will also partially remove type and size sanity checks. Therefore simply use an assignment. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index 3b895971c3d05..6652e54cf3db9 100644 --- a/arch/s390/kernel/lgr.c +++ b/arch/s390/kernel/lgr.c @@ -88,8 +88,7 @@ static void lgr_stsi_2_2_2(struct lgr_info *lgr_info) if (stsi(si, 2, 2, 2)) return; cpascii(lgr_info->name, si->name, sizeof(si->name)); - memcpy(&lgr_info->lpar_number, &si->lpar_number, - sizeof(lgr_info->lpar_number)); + lgr_info->lpar_number = si->lpar_number; } /*