Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3127295pxk; Mon, 28 Sep 2020 09:00:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKk4plLhe/HRvXxO1+OpTgMQHP9yCy7cNRq4H8l60+VH/sVUG74mmn5Liv1WLUZUbiRJiV X-Received: by 2002:a50:9fa5:: with SMTP id c34mr2493224edf.2.1601308836005; Mon, 28 Sep 2020 09:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601308835; cv=none; d=google.com; s=arc-20160816; b=SxpEKjaxMJRszmGoSxs4ZTug4HuolP8LBiRJlclgJKx0mQyNLdyvUkkrgWnK816eHA niDIIBxZo3bBvoonSKLhARIu0qgCYRLVnOBxEqHUlmDo4WkeUTUEIZ0CF9dcPg6swba2 0NqppQju+8pQWPaEjgEpZ9HK5iSsS8uDP9iCv+0giDDZFoICAefOWwmUDRnl8Wf4/fCf qGBAOFZeLjtydgqHopJE4FQLwhWbfkM2kakXdoGh53o8zH9J346bYc0F87iWpu0kTHkl 7kKx9DOlp3LSvEiIhD1oFFbQmLcQBHPDKhqLH0Nyew6Ea2RtqoitA+9+DKreGEncw4gj NjIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=F+YiQByZaPQzebUAZwJDg5dLTXVyoE2tV52RXpHz91Q=; b=xz0AybYdfg7jYmz3EwhvZH0n6fD2wbt/OQbR5ssDq3qY3t2BoTlZXbIyMS0JOXnShG Ki/0kADIdUI3RaGjFru3lRGxwWuQ4Jqg7MEHBCty8RoDEABXLQo54P+FeZaED7WRdPn+ dieyg+dwmuhUQb5LoPxkKg0RiM3Q1f7gFUj+KATwVtsYdqosQcFMokSj8gA3pkBtuI/H xiKkZGL1duUa+03LbWxGxQGHYdKvkqFSEi+7FH8uAfLYDW8IW6buLsFZinyZc3zhLc6c pzx3X1ww0H2shrzdSBuuo6EKnEhgTxjiFp4fjt0r05WxR8fecxDvFV7w2AG8Ooid71BH tzag== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy19si886373edb.313.2020.09.28.09.00.09; Mon, 28 Sep 2020 09:00:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbgI1P7H (ORCPT + 99 others); Mon, 28 Sep 2020 11:59:07 -0400 Received: from smtprelay0219.hostedemail.com ([216.40.44.219]:51130 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726513AbgI1P7H (ORCPT ); Mon, 28 Sep 2020 11:59:07 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 31E7945A3; Mon, 28 Sep 2020 15:59:06 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:965:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1538:1567:1593:1594:1711:1714:1730:1747:1777:1792:2196:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3622:3866:3867:3868:3870:4321:4385:4390:4395:5007:6119:7576:8660:10004:10400:10848:11232:11658:11914:12048:12297:12740:12760:12895:13069:13148:13230:13311:13357:13439:14181:14659:14721:21080:21451:21627:21939:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: base25_4208bb927182 X-Filterd-Recvd-Size: 1482 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Mon, 28 Sep 2020 15:59:04 +0000 (UTC) Message-ID: <2fcfd81f62ec87d9b75cca32468d8b9583faec47.camel@perches.com> Subject: Re: [PATCH v2 1/9] lib: string_helpers: provide kfree_strarray() From: Joe Perches To: Bartosz Golaszewski , Linus Walleij , Jonathan Corbet , Andy Shevchenko , Kent Gibson Cc: linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Date: Mon, 28 Sep 2020 08:59:03 -0700 In-Reply-To: <20200928104155.7385-2-brgl@bgdev.pl> References: <20200928104155.7385-1-brgl@bgdev.pl> <20200928104155.7385-2-brgl@bgdev.pl> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-09-28 at 12:41 +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > There's a common pattern of dynamically allocating an array of char > pointers and then also dynamically allocating each string in this > array. Provide a helper for freeing such a string array with one call. Isn't this also common for things like ring buffers? Why limit this to char *[]?