Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp37149rdb; Sun, 14 Jan 2024 05:43:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGijPAUQiOFJhhrFQvLrwq73vPq8J9WRu0Jt5bUyO5DoP16jIALoG5xawMBNHZ+qJHucR6g X-Received: by 2002:a9d:7d16:0:b0:6db:fe06:6004 with SMTP id v22-20020a9d7d16000000b006dbfe066004mr4796057otn.53.1705239784263; Sun, 14 Jan 2024 05:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705239784; cv=none; d=google.com; s=arc-20160816; b=xcmWxfRQFGLWW36SZ0FoCs8UshQ2JC4i7hBjLJon840x/l88xXRe/kZnrtc2tj0bqY KJd+S2/JpPLFZDGRaImIWe9ydoQ+0FPmQEdsKNEqSyv5hd8xXxDKzjGUfNcKa3qK9YgQ vUJtMXFUFZnwV96WE1mAXmmi59UtqBlN5dSkAQhyuVkVVhL+LhflSmJc963SrBxSmmb4 qEKmQZX6HIOA2TX+YD9KaUHEEEy2FxghVg/2BOGIuHHLbjRVnu1XnR4e10KE07YSznAw 87rQg4FPZ9n3VMIRVR78FXXly/QtlTR4Gxi8Ow+RS8F2N9h/qzU0tdyviIySZ+IJoMu/ bBNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=CLPQtvgyGHc4j8pwm/37iRy2KucXEtLotANgtx0ChVg=; fh=4gdT3/dpkxzs2ELRj3VTpL49DkeSgYojngZ1o2ojEwc=; b=rufK/hPClS0YvhkBsyydK10KXVEaIvXiE8A7L+yRBPyKzBBJ9xJrNNgEdoZ8bboPqm /sPIH6zuKp3mjUnELevNS6tGWzWmZLmyap8pfnjXKFH1ut45GGJE28d+2M8ZXIt4nWd3 qFtSV13/hVeHGDNn2cYnZhgPLQrmuhpnm275mZ151h47e1y0sjilTbR+SIf2wCD9ENoa KFg17DDKqQ/tfP7ktVTytRztiZNQBNVDmLgvO5a3hZZJwgEpxZIXY9jl2AF9y12wYvRS dnvCZ8IFaSusGOIZMFGd9V5CXBKtx47oUDy//ARFDrXtYQDOg5aq18h02k++zWnmPBgt aulQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=oAZCHPLz; spf=pass (google.com: domain of linux-kernel+bounces-25470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i62-20020a62c141000000b006d941d5ca2csi6733974pfg.6.2024.01.14.05.43.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 05:43:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=oAZCHPLz; spf=pass (google.com: domain of linux-kernel+bounces-25470-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D7404B217CF for ; Sun, 14 Jan 2024 13:42:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71D4E23CA; Sun, 14 Jan 2024 13:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oAZCHPLz" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 207C12100; Sun, 14 Jan 2024 13:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705239766; x=1736775766; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0SdNNY8cR3/JqcCcTMz3H6BUbuomCCtkQgHAbuevA64=; b=oAZCHPLzKIuuAoJEJpHIkybBTh5WJZncEApPe3H7nhJdd/i346hBy51K bAhg0y0JwpTKSmL1KTZMF+tazZPXkFVeVUA/gd3kfmM52zHhHQ6muuYoh oZl/WLBEBIvmnn7yC7nRyX30572LadsGqC1szTcRibH7MU4dfrsY7IVPw Gn/dURF+hd10mjZPj/IV17qDmOgQC6kHUKr5VN7SRvpRCRi/FHD13Z4tz Bqsq9Gt/d+EqX20RIw8haj15NLDMyuxFWJlm1h3e7HCJt7Db+109go78r 4Ml/PUrQAA/CV/1EdtFlFi6UL20J089nfxXeKMRZOeqyL8c2pMkTHKxwk w==; X-IronPort-AV: E=McAfee;i="6600,9927,10952"; a="465841160" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="465841160" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 05:42:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10952"; a="817567764" X-IronPort-AV: E=Sophos;i="6.04,194,1695711600"; d="scan'208";a="817567764" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2024 05:42:43 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rP0l5-0000000Dtxx-47nJ; Sun, 14 Jan 2024 15:42:39 +0200 Date: Sun, 14 Jan 2024 15:42:39 +0200 From: Andy Shevchenko To: Qu Wenruo Cc: Qu Wenruo , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, christophe.jaillet@wanadoo.fr, David.Laight@aculab.com, ddiss@suse.de, geert@linux-m68k.org Subject: Re: [PATCH v3 0/4] kstrtox: introduce memparse_safe() Message-ID: References: <7708fc8b-738c-4d58-b89e-801ce6a4832a@gmx.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7708fc8b-738c-4d58-b89e-801ce6a4832a@gmx.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sun, Jan 07, 2024 at 07:28:27AM +1030, Qu Wenruo wrote: > On 2024/1/7 01:04, Andy Shevchenko wrote: > > On Thu, Jan 04, 2024 at 09:57:47AM +1030, Qu Wenruo wrote: .. > > Having test cases is quite good, thanks! > > But as I understood what Alexey wanted, is not using the kstrtox files for this. > > You can introduce it in the cmdline.c, correct? Just include local "kstrtox.h". > > Not really possible, all the needed parsing helpers are internal inside > kstrtox.c. I'm not sure I follow. The functions are available to other library (built-in) modules. > Furthermore, this also means memparse() can not be enhanced due to: > > - Lack of ways to return errors What does this mean? > - Unable to call the parsing helpers inside cmdline.c ??? (see above) -- With Best Regards, Andy Shevchenko