On Thu, Jul 15, 2021 at 11:15:30AM +0800, Jia He wrote: > After the behavior of '%pD' is changed to print the full path of file, > the log printing in fsg_common_create_lun() can be simplified. > > Given the space with proper length would be allocated in vprintk_store(), > it is worthy of dropping kmalloc()/kfree() to avoid additional space > allocation. The error case is well handled in d_path_unsafe(), the error > string would be copied in '%pD' buffer, no need to additionally handle > IS_ERR(). > > Cc: Felipe Balbi <balbi@xxxxxxxxxx> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > Cc: "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx> > Cc: Chen Lin <chen.lin5@xxxxxxxxxx> > Cc: linux-usb@xxxxxxxxxxxxxxx > Cc: linux-kernel@xxxxxxxxxxxxxxx > Signed-off-by: Jia He <justin.he@xxxxxxx> > --- > drivers/usb/gadget/function/f_mass_storage.c | 28 ++++++++------------ > 1 file changed, 11 insertions(+), 17 deletions(-) Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>