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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 2781AC43219 for ; Sun, 28 Apr 2019 19:23:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F120D206A3 for ; Sun, 28 Apr 2019 19:22:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727202AbfD1TW6 (ORCPT ); Sun, 28 Apr 2019 15:22:58 -0400 Received: from mga17.intel.com ([192.55.52.151]:51442 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfD1TW6 (ORCPT ); Sun, 28 Apr 2019 15:22:58 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Apr 2019 12:22:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,406,1549958400"; d="scan'208";a="146485676" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga003.jf.intel.com with ESMTP; 28 Apr 2019 12:22:52 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hKpNy-0007qK-A4; Sun, 28 Apr 2019 22:22:50 +0300 Date: Sun, 28 Apr 2019 22:22:50 +0300 From: Andy Shevchenko To: Yury Norov Cc: Andrew Morton , Rasmus Villemoes , Dmitry Torokhov , "David S . Miller" , Stephen Rothwell , Amritha Nambiar , Willem de Bruijn , Kees Cook , Matthew Wilcox , "Tobin C . Harding" , Will Deacon , Miklos Szeredi , Vineet Gupta , Chris Wilson , Arnaldo Carvalho de Melo , Yury Norov , linux-kernel@vger.kernel.org, Jens Axboe , Steffen Klassert Subject: Re: [PATCH 1/6] lib/string: add strnchrnul() Message-ID: <20190428192250.GY9224@smile.fi.intel.com> References: <20190428032936.1317-1-ynorov@marvell.com> <20190428032936.1317-2-ynorov@marvell.com> <20190428160400.GV9224@smile.fi.intel.com> <20190428182612.GA3150@yury-thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190428182612.GA3150@yury-thinkpad> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 28, 2019 at 11:26:12AM -0700, Yury Norov wrote: > On Sun, Apr 28, 2019 at 07:04:00PM +0300, Andy Shevchenko wrote: > > On Sat, Apr 27, 2019 at 08:29:31PM -0700, Yury Norov wrote: > > > New function works like strchrnul() with a length limited strings. > > > > The prototype better to be consistent with strchrnul() and memchr(), i.e. > > the size parameter to go last. > > But if so it would be inconsistent with strnchr(). I'm OK to do the change, > but I'm not sure if this version better than that. Forgot to check it. In this case, yes, strnchr() + size. -- With Best Regards, Andy Shevchenko