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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 16EBBC49EB7 for ; Mon, 28 Jun 2021 17:10:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3F28619B5 for ; Mon, 28 Jun 2021 17:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233055AbhF1RNF (ORCPT ); Mon, 28 Jun 2021 13:13:05 -0400 Received: from mga01.intel.com ([192.55.52.88]:58065 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbhF1RNE (ORCPT ); Mon, 28 Jun 2021 13:13:04 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10029"; a="229618165" X-IronPort-AV: E=Sophos;i="5.83,306,1616482800"; d="scan'208";a="229618165" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2021 10:10:21 -0700 X-IronPort-AV: E=Sophos;i="5.83,306,1616482800"; d="scan'208";a="557638784" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2021 10:10:15 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1lxulu-0065LO-Em; Mon, 28 Jun 2021 20:10:10 +0300 Date: Mon, 28 Jun 2021 20:10:10 +0300 From: Andy Shevchenko To: "Enrico Weigelt, metux IT consult" Cc: Justin He , Al Viro , Linus Torvalds , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Rasmus Villemoes , Jonathan Corbet , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "Eric W . Biederman" , "Darrick J. Wong" , "Peter Zijlstra (Intel)" , Ira Weiny , Eric Biggers , "Ahmed S. Darwish" , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-s390 , linux-fsdevel , nd Subject: Re: [PATCH 09/14] d_path: introduce struct prepend_buffer Message-ID: References: <20210519004901.3829541-1-viro@zeniv.linux.org.uk> <20210519004901.3829541-9-viro@zeniv.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 06:42:48PM +0200, Enrico Weigelt, metux IT consult wrote: > > > this smells like a generic enough thing to go into lib, doesn't it ? > > > > > Maybe, but the struct prepend_buffer also needs to be moved into lib. > > Is it necessary? Is there any other user of struct prepend_buffer? > > Don't have a specific use case right now, but it smells like a pretty > generic string function. Is already having more than one user a hard > requirement for putting something into lib ? Why it should be in the lib/? Do we have users of the same functionality already? The rule of thumb is to avoid generalization without need. -- With Best Regards, Andy Shevchenko