From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 090ACC1B08C for ; Thu, 15 Jul 2021 08:10:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE55260200 for ; Thu, 15 Jul 2021 08:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239787AbhGOINf (ORCPT ); Thu, 15 Jul 2021 04:13:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:42296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbhGOINe (ORCPT ); Thu, 15 Jul 2021 04:13:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 330B5610D1; Thu, 15 Jul 2021 08:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626336640; bh=rKCR00UG/qw5FUHKpBMFkLO1eC1tLjMCz6QzQc0jzfU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dMzQ/nK+v5/YHQsG39gOzjPIhC4/mL/kEO1MXg+9vj9NytAjO9JDdNom01GIirdBI NEoQMexS6QUh3UwWA2leXiSGrnkLGe2aLgp+JCBt3SdROWrF303aPngb5xQvoP59wt KrVmrqt+lx/GtyclskAIP5/LeIvw7XFGb4GnjJUU= Date: Thu, 15 Jul 2021 10:10:38 +0200 From: Greg Kroah-Hartman To: Jia He Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Christoph Hellwig , nd@arm.com, Felipe Balbi , "Gustavo A. R. Silva" , Chen Lin , linux-usb@vger.kernel.org Subject: Re: [PATCH RFC 10/13] usb: gadget: simplify the printing with '%pD' specifier Message-ID: References: <20210715031533.9553-1-justin.he@arm.com> <20210715031533.9553-11-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715031533.9553-11-justin.he@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Greg Kroah-Hartman > Cc: "Gustavo A. R. Silva" > Cc: Chen Lin > Cc: linux-usb@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Jia He > --- > drivers/usb/gadget/function/f_mass_storage.c | 28 ++++++++------------ > 1 file changed, 11 insertions(+), 17 deletions(-) Reviewed-by: Greg Kroah-Hartman