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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FC43C636D6 for ; Wed, 8 Feb 2023 04:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230423AbjBHEak (ORCPT ); Tue, 7 Feb 2023 23:30:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbjBHEaL (ORCPT ); Tue, 7 Feb 2023 23:30:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE1BB442E3; Tue, 7 Feb 2023 20:29:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 31F69614AA; Wed, 8 Feb 2023 04:29:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AE12C433EF; Wed, 8 Feb 2023 04:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675830586; bh=a/+VYkPZb//IP5f1kx1v9iTH/S8V5BsO5GiI3+WJsFQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WBUgN+eL2ov9xOAASRBcvbDJyw6cauMy/FZPUP+SWXXM7FavUxTuBP/jhszz+qG+I yttAv2RKCmF7SMNGAJs6UXvrP4Cq+wSVNip7cgHEkThriBZC6XJvhxTPpIeQ+9pBAg nzQ03JIf5xrjD0K6TFO8nW6XZOf2BVCfHLK8D4YJubqVTsxwsfM6Wm/oC+rfMnsfa2 RHeWQaJtFiipnscII8Wzvd1aDydch5mnS4BjXc/OLD0JPLQbp7og5P4fX57OLw+Qi2 hEq6NWfc+QewcKkzGY0eYhoY3FmdJHEcnobOJE90FBFJ47G9D6SyRZjhXj08KwioCB amw42+blQD3CA== Date: Tue, 7 Feb 2023 20:29:45 -0800 From: Jakub Kicinski To: Andy Shevchenko Cc: Xin Long , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, dev@openvswitch.org, tipc-discussion@lists.sourceforge.net, Andy Shevchenko , "David S. Miller" , Eric Dumazet , Paolo Abeni , Pravin B Shelar , Jon Maloy , Ying Xue , Simon Horman Subject: Re: [PATCH net-next v2 1/3] string_helpers: Move string_is_valid() to the header Message-ID: <20230207202945.155c6608@kernel.org> In-Reply-To: <20230206161314.15667-1-andriy.shevchenko@linux.intel.com> References: <20230206161314.15667-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Feb 2023 18:13:12 +0200 Andy Shevchenko wrote: > +static inline bool string_is_valid(const char *s, int len) > +{ > + return memchr(s, '\0', len) ? true : false; > +} I was tempted to suggest adding a kdoc, but perhaps the function doesn't have an obvious enough name? Maybe we should call the helper string_is_terminated(), instead?