Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3918981pxv; Mon, 28 Jun 2021 16:39:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX3zNM1zFvQw/1Tn+O/Mn5DhOMbCSaOARcMhiSsxkvBLY5LFz9tGhITz6o19Kdr54pSu2y X-Received: by 2002:a92:d9c1:: with SMTP id n1mr19047353ilq.70.1624923570393; Mon, 28 Jun 2021 16:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624923570; cv=none; d=google.com; s=arc-20160816; b=ESk59KrBH3mygUXu/s6jlg/QbbxCPTiSk4XXsRiXDq4//a65tbxfZKHiXbfjmA2AT5 qtv9ue8yUiUd8vsrz1Fhvd6bAvjaoqCFW+zlsa+dkQdH6i3n7q0GZgYzykqHjIzrphn+ qMdVP8RPNM2+xUVv5GD4/LXX76y0QknMiBhGFnovsczdvYO8DASjCShOzlcGaZuOd+V5 Lv4yrP+JRuq3aK+ThX2IUUEVVquZT5O0Ll8L3HH+crhCD9viYqL57JzgyFu97O9p7wEj iuzyl2ihfcyfIrGhb/DhD+s8ykfObb+i+sxyrmE1zxFjTsFBURjeg5jmPa8ltKGWnSYG xaYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rJ21vuAW8FVC7WEIlYAO3huZcjQlevJ3GasDQthmPtM=; b=lUbrIbOVa/PsqsE0pGJNubWy5NVuoK3D82+ah5G9EvhLwmxrvWpeeguh14VK5Mr/hX NJlQHvWTauvX4WMJ6j8VDc77jiMf8HfcNVmMAiPIp2HET/NRT0vtU9qoeG1b7Blj0z7H Q+loOJbMsqdSITZmE2tI+GtXLw8302crz950JYIXMraymImpVUZMHGo0HxKV4RC6Rn3F jwWoCYoaxx86mCPK8t8v52x6bhrtNj4AC+EmtVYW6mcnQylaOaRw9fuPX+HwkEdimRGD XkZIAWVm0NyI8HSS1v38xBhrh9dNYdpm51iNuNBIFtbSYCeOSF+lOh0rdFLHCoWaT1Ld Taog== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si18728410jaj.93.2021.06.28.16.39.17; Mon, 28 Jun 2021 16:39:30 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232099AbhF1RNE (ORCPT + 99 others); Mon, 28 Jun 2021 13:13:04 -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