Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1030793pxk; Fri, 25 Sep 2020 04:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSjo8evE23mdgRT0AbKUO/3emUupDDT6dJ3Rrowxwm6rF/M7HVG0VGxGaJ+hRpJhZIpaXN X-Received: by 2002:a17:906:3a0e:: with SMTP id z14mr2231238eje.192.1601033645390; Fri, 25 Sep 2020 04:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601033645; cv=none; d=google.com; s=arc-20160816; b=0TM6I9IVH87C0NIuNj+I4MCqKv9yZEfZV3dDRkD4dogdZu1ypwFpRmGFO2bfek4KXG EyQR8xBnbm89DPYRr5nLAzfEPC5tJTRBi6VkH+uR/zzuzt+TA3k+VXDo0PevIQKvwVNF 1Sze40ffSeJ3OYlUZ995xYg1gOeTz3nSYuGvrTDyDBzLNr1wk30ZhUNPzMGRJz/nDRvW L4bOaNQEpSMJIbWczMsE/bUWOEoQNYfZKlWjRpfOUy6T24AwcD1pMXfEb8Nvsu6C2OLZ 62VUgOJcmH2JbVOSZx3fShKWlbSlP8yeT9+gvNCQnC7rSraeAVZeF2lX8D1XkkwW9TmT QnGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z//erykWYqUAgc8g2m7BJrgknwO6GLezCOz32OeFgSU=; b=Bz1E3SMQbFufAPWwT7W0XYKwoQIh226PvcWkBvgfKBj2LW8sdMHTDgnpqtUDnsSY0i ZlSmG4yFU7PcomtC1Zjhn+gqdjwXKV7iVtnHWQfHhA55VnkQ7TsDDVOxy58zj8YM4Szt 6+aCoMQqK6iw/QCS6txMazDn76FAdqVc5Jsb8ONMniPkRaXec1EOsiInHK8LvleJX9Op cG1XczsUDV8Z7qZeop3XeJutSfqS5ncL4oqIwqMpR/NSuKihq0VlCJTD42m1Ai4QEFrd rz1Sc55znhPsbIndiKeK6QwO4qehkK5QF2sfRJFidTtNeL/QAOU/9/AWYri6O0meOqHy XHcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Yf8hpASt; 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 c16si1665963ejs.573.2020.09.25.04.33.42; Fri, 25 Sep 2020 04:34:05 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Yf8hpASt; 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 S1728274AbgIYLc3 (ORCPT + 99 others); Fri, 25 Sep 2020 07:32:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728159AbgIYLcP (ORCPT ); Fri, 25 Sep 2020 07:32:15 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C98FC0613D9 for ; Fri, 25 Sep 2020 04:32:14 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id gr14so3200424ejb.1 for ; Fri, 25 Sep 2020 04:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z//erykWYqUAgc8g2m7BJrgknwO6GLezCOz32OeFgSU=; b=Yf8hpAStoVbx0mRIg2vS79bkSzSxftSLxoGoEplviNGsiBvYHf8KBPdOzjK42CqVlQ +hBydWVKA8Qu2bXBchGo+iHRUal8CKSeDZWNlXY7K2Yl0DNd03LWUWHRwNJe4xqedNfk AhWmM2cSkZVGx3UadmgdltJTsUSvDf9YzcieRhmwFHLFi2rlaSPQUbKWRdPWZlvRR/3/ WlvhTQjThDN4ZBeh8yIfxbFQGQq+KoayEBQyhz2GRGtIXvDpnP17g9AMljhXH2QOnxSW piKLlBlTo/lFYia1Z9DoYlx8rl6KpTXcOxB3jVD6O0oeCrdbWUzYkKR6haFxTzKYPtF2 UypA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z//erykWYqUAgc8g2m7BJrgknwO6GLezCOz32OeFgSU=; b=BikGGEMvtV+mBbK9+qCy7vXO+yq9r+5UGKpffHdAzQITCoAoaPDFmF8O1XciEgK8/0 jIeNTQb7vdqxaIHATorBd98pMJC82aioPDTnG/RZRlni8HPWKbVSBZ5hNzF8oKY/vRG7 id196C+Oxnv75jM6SI++wdBhCAQ+esc4k9JDNui8Xle+Hw8t49sfESRkM5yQztrws+YU MpaFvlZTZxu0vzTcibm9MGolkuLgI6oXQZajrIUkVEl5QXFLQ24ZMv4Wv+FUNHlXqCak y2X9j/Y4MY7KlQTjtXBCpkPaGtI3uI26zly0x66jbI0TFYmm3heKcjBaWcMp7RSmg5Pz DTOw== X-Gm-Message-State: AOAM532izvCoOialdyIcu/kqIWSSxM99AfhYWIKeiuU3VyaPHXz9o3C+ YljwfgfRJBIYp57mPdBLKX4rll06aQEl+KkO3vmerA== X-Received: by 2002:a17:906:e4f:: with SMTP id q15mr2350988eji.155.1601033532589; Fri, 25 Sep 2020 04:32:12 -0700 (PDT) MIME-Version: 1.0 References: <20200924113842.11670-1-brgl@bgdev.pl> <20200924113842.11670-2-brgl@bgdev.pl> <20200925084804.GX3956970@smile.fi.intel.com> In-Reply-To: <20200925084804.GX3956970@smile.fi.intel.com> From: Bartosz Golaszewski Date: Fri, 25 Sep 2020 13:32:01 +0200 Message-ID: Subject: Re: [PATCH 1/9] lib: string_helpers: provide kfree_strarray() To: Andy Shevchenko Cc: Bartosz Golaszewski , Linus Walleij , Jonathan Corbet , Kent Gibson , linux-gpio , linux-doc , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 11:01 AM Andy Shevchenko wrote: > > On Thu, Sep 24, 2020 at 01:38:34PM +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. > > For consistency I would like to provide kalloc_strarray(), but it seems a bit > ambiguous. So I'm fine with this going alone. > But how would it even work - you can allocate strings in so many ways? Also: let's not introduce functions without users. Bart [snip]