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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC0E3C433EF for ; Wed, 2 Mar 2022 14:20:26 +0000 (UTC) Received: from localhost ([::1]:56660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPPq5-0003ph-Qi for qemu-devel@archiver.kernel.org; Wed, 02 Mar 2022 09:20:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPPmb-00064t-Tr for qemu-devel@nongnu.org; Wed, 02 Mar 2022 09:16:50 -0500 Received: from kylie.crudebyte.com ([5.189.157.229]:47099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPPmZ-0007Io-P2 for qemu-devel@nongnu.org; Wed, 02 Mar 2022 09:16:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=kylie; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Content-ID:Content-Description; bh=xYGPc3RYY9rjYNGechpraAZCAYlUlS1v0KqhEU/UN6Q=; b=U+mnDDy+BGZeXiIT8mtm3vhzgG jcqc9XfmnY5Zlnuc3NFp16G4ov6jHneOj08PIap6rd8ZfRkHC2EJDipjo7yYtAwU/isUX3QZmeYw8 aSMkjrkf8Z1yvwVBsRHNZmJQ9uFr0YbNG71DIzITdqBMDVc7LFW/w6oNxfoWv07C22LM0JECsNGHs FPFB5C5khdFYM4O0LnOZdMVhzRSJhCMnkw/ISBy1a4pPAzI1T4FenBx3cY5NozkG1j99YrGN9T5uE CpbYKc+AUl2c1+YYqltuBxQPe5YInM4p7AxAM/jPkQu5OvCktKWt9U8VKWY1vDs6KT4TnBJTVoDB/ 8vni5uxc5X0CFznKqlr+hx3gWQJztHE1+3DRUEFDS2gJ5ogKHe08jczifTTlQgvq83vpXCQSxXbvw rFDZSBESBX3o++R4Gcz+ercLZTSV1wYU8DXnWW3lySAU/5pC92jf8ttU3CgtOWM6oh1/a8kRoosqg er/7NYUMWpZVK+GftHPlFUj2LC4FVI2EW+gY2pdTcj2sti7NGRk2SktsnGyc41H3WVUPQq4OXy+1F 2t1oC9iAa4TwL0QuxC4qBfWg2WylcE5Go9uKwrT/OwdQyGtY3Ar/qTPNa7jem/yF0yM9cgTcre7P5 7Sehn9La1jdytUu5Lmlf9/7NpwB1WTmMok+SyRPbI=; From: Christian Schoenebeck To: qemu-devel@nongnu.org Cc: Peter Maydell , Greg Kurz Subject: Re: [PATCH] 9pfs: move qemu_dirent_dup() from osdep -> 9p-util Date: Wed, 02 Mar 2022 15:16:43 +0100 Message-ID: <2106481.Hga0XrbuFZ@silver> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Received-SPF: pass client-ip=5.189.157.229; envelope-from=qemu_oss@crudebyte.com; helo=kylie.crudebyte.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Dienstag, 1. M=E4rz 2022 22:59:43 CET Peter Maydell wrote: > On Tue, 1 Mar 2022 at 20:47, Christian Schoenebeck >=20 > wrote: > > Function qemu_dirent_dup() is currently only used by 9pfs server, so mo= ve > > it from project global header osdep.h to 9pfs specific header 9p-util.h. > >=20 > > Link: > > https://lore.kernel.org/qemu-devel/CAFEAcA_=3DHAUNomKD2wurSVaAHa5mrk22A= 1oHK > > LWUDjk7v6Khmg@mail.gmail.com/ Based-on: > > <20220227223522.91937-12-wwcohen@gmail.com> > > Signed-off-by: Christian Schoenebeck > > --- > >=20 > > hw/9pfs/9p-util.h | 30 ++++++++++++++++++++++++++++++ > > include/qemu/osdep.h | 13 ------------- > > util/osdep.c | 21 --------------------- > > 3 files changed, 30 insertions(+), 34 deletions(-) > >=20 > > diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h > > index 1f74d37558..8b92614e6c 100644 > > --- a/hw/9pfs/9p-util.h > > +++ b/hw/9pfs/9p-util.h > > @@ -112,6 +112,36 @@ static inline off_t qemu_dirent_off(struct dirent > > *dent)>=20 > > #endif > > } > >=20 > > +/** > > + * Duplicate directory entry @dent. > > + * > > + * It is highly recommended to use this function instead of open coding > > + * duplication of @c dirent objects, because the actual @c struct @c > > dirent + * size may be bigger or shorter than @c sizeof(struct dirent) > > and correct + * handling is platform specific (see gitlab issue #841). > > + * > > + * @dent - original directory entry to be duplicated > > + * @returns duplicated directory entry which should be freed with > > g_free() > > + */ >=20 > Reviewed-by: Peter Maydell >=20 > since it's just code movement, but those "@c"s look a bit weird: > are they really valid kerneldoc comment markup? >=20 > thanks > -- PMM You are right, that's Doxygen format, not kerneldoc format. If you don't mind I send a separate, subsequent patch that just wipes the=20 "@c"s away, and leave this patch as-is (as this one is pure refactoring). Alternatively I could replace the "@c"s by kerneldoc's solution which=20 apparently is "::foo" I think ("foo" being the inlined C code). Best regards, Christian Schoenebeck