usb: gadget: configfs: Use memcpy_and_pad()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 2 Feb 2023 15:17:36 +0000 (17:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 12:46:41 +0000 (13:46 +0100)
commit9c0e6fbda803dfd66c05c1f683069b46bd4cbba0
tree71f4d2b2ac1aac3b1b6ecfe2d5fa8a9284ad75eb
parentbe308d68785b205e483b3a0c61ba3a82da468f2c
usb: gadget: configfs: Use memcpy_and_pad()

Instead of zeroing some memory and then copying data in part or all of it,
use memcpy_and_pad().
This avoids writing some memory twice and should save a few cycles.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230202151736.64552-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c