Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp190319pxv; Thu, 15 Jul 2021 02:00:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2PTIA0iaiNbN1RrNhV5AfHtKVRVsxoxkhgLYq9VNpwG7eDNnI+QQxTWzKtktEnm5VZ2q2 X-Received: by 2002:a17:906:2413:: with SMTP id z19mr4293667eja.215.1626339614331; Thu, 15 Jul 2021 02:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626339614; cv=none; d=google.com; s=arc-20160816; b=WB0I1c1PCReug/4rVp8+bYuzbwKEhYKipiW+rK70Y16++DxveP+SH1rRfKCfIWiiml ITjRckirZvmH+/DJcz9XTqnBbR7nNlX1oYc/pkpXe6aXNCCnWU6AP4dvZrwE6qAf9Orm eu6mGwPErgzGeNtMny7GxLgNTh1MmK4iNY+bAcykq7KiEGkSuNWf5rXKWn5kamcQB/Tg 33FRusmZnh592bkzwcgZ33x5dUAgOMwg/iX6hAVOVsuGfrZo+0pXZb+8v617+wLpdrI9 6p6WvFgdabBeX2p4lp9W6sQ+/wGeG7CePdglDX93kMSP0mF1wfd4j2vSTwgmUMErcNIW u2aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9LiF1HqwUJh2euUtCJB2ful4sY65DcX9RYwgh3+y+hM=; b=EP7pMsYd3rhKmm6Mv49IUUH1skmukY1gGWIknk8PNf8KvNoHedMqU090HD5ARkIw74 C0jWUcK3IcTjnrfKg8/Ba4Ue9DSV6Ah6QnUyZrQ39H0RvWo2jf/54bxkiRLsvWWm5Wla H7OzTs1v+6UaU3e8XF63XxqLihwc7Re0vpl6pavSZ7wOys9qMUzOhcizABcC0i6PhXPU qSGYUyBHnKVIRHBz3cDepg12QeyUz/iRPuepPcc/RrpuUBjtOijWQxFZRIiNUZP73ZcG ZMAzkC4QTNSd/Xoax+ME1YuWeN5ODwxbYee7SziOPa8ZQmovitndKFe/7O/fKSbm2TMO Y6mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dMzQ/nK+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q5si6754397edh.492.2021.07.15.01.59.51; Thu, 15 Jul 2021 02:00:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dMzQ/nK+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234691AbhGOINf (ORCPT + 99 others); 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