Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3370875pxk; Mon, 7 Sep 2020 10:56:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF8hUc7qFZ3rdy+oCt29vIl5Mdl86W9qHgxnxYmnwFeRO0y6UEj8xMYKHAFU8y/WGzxsgk X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr22201761eds.191.1599501394883; Mon, 07 Sep 2020 10:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599501394; cv=none; d=google.com; s=arc-20160816; b=RqoFSOsYDVWXMnUP2yDttsxlGB/sRQEZrAIwI2TNjaPzOzvN0s091CCHhZ5fZvU0t0 4ws0g+hsRdMceRKjMOtaF2M6LJ9onuTpyvfE+gZKOKwUpzpIuhUGgI7zzm5kbX3r9O6e M61HCBvLhdluq471fac4hkP56IOsFQoRc13o6+9BWRwL+EBmY/2SJnGtmf0MaFfrFZ5V IZbmyQwqgxgIjfP5UroXd3iOf63vetCPYobg8tY7Bbr1FcL3BQjDH24R6WSJ62yYWUsC lIIFMkhvXvS1JJtMvMyIcUC8Y5PyVXVPFXj9cohbCEObA/OxeQj/yBFNgg49FfMVkft7 +Kxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1B/HAY7CQ2kgdOMuMSUPk6pREpiLHnIcgbAxblH2K1Y=; b=JLd4Qjj6w4g0pRQ2+5wfFkIX+ISOgXPduOUXmQ3myMv7DSpmfWOtDgtQmlDkq9NQDT kdhHk3hptNQ+mNrv16Jq7r2QGOC7kR2CppZH6viAUeGGVqJxLQe2BmHnpCwKq57LGtnv qWwzl6PtM9ayScik/joAnTpDpyTd9ihBZ9Qy+APQPsTbA/My5lXMMGxplN7Z1H+vFHon lo5TbsQoJSXV9wgbKHY+wEJdgZB2cZb/aBZUI9YbD+6UBIwuZaQct80VKZnC1ilQtlA5 TWrkknwMzStjQwQU1ppcMU/Sf6zek4Z4/wBjyPtD0jj+yBQrU2rBb7tK/cPOS7MfjBPj +zAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=W4qYrlMq; 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 r25si10012056edo.12.2020.09.07.10.56.12; Mon, 07 Sep 2020 10:56:34 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=W4qYrlMq; 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 S1728870AbgIGRy1 (ORCPT + 99 others); Mon, 7 Sep 2020 13:54:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728872AbgIGLWb (ORCPT ); Mon, 7 Sep 2020 07:22:31 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 875C5C06179A for ; Mon, 7 Sep 2020 04:04:40 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id q6so12118047ild.12 for ; Mon, 07 Sep 2020 04:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1B/HAY7CQ2kgdOMuMSUPk6pREpiLHnIcgbAxblH2K1Y=; b=W4qYrlMqsiKUO1IXIqKFB92tdgLj8OvcoC6QiZjOrJumIILg6kwYVZQVhMcjZZme8+ uTxaZ4A44RW2FvoscbbPCukSKqOxq4PhOFmeSKlRJA51HjdobE7qutUP6wAhawWJEOaY NPRFM8tEqU1F7a1gwDoCcd+HxlFuRvxhsguq2aBVeoSm8Cz62KuDe09VU44giiaq+mQz 217j2HZ87eJjd2a5Cjyq6IOjXBJjAfmfyIao982fWhcLfXj4u7ouDub5WWTQrUPkNmZQ sMkVEIqJp66qcey3Uy6vD5BmwWa2mQpn6BpQaryGEIBdxF2680B8qvfL8SPXXQfj9Ka3 r/Eg== 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=1B/HAY7CQ2kgdOMuMSUPk6pREpiLHnIcgbAxblH2K1Y=; b=GQ2qxbrRaduYFuE2IMF7UXnzdsd50/wofmgG3NgajE9I/9WmrGkzd5xhvnsXu4PZ+e 7CCthyAIMwSvjWYllo/mI7SkJ6l9oOdaun69FKpazdGGgdZmn8qaELTLaA5Tn25bb1UN lA80mH0Kuyb9OkajTkr+bIXp/hDKVE4OpLCsxpV9xqIPz6gafRsWYrI5gwgaiabBnkdl q1tpstfPt9bjhTrtpyZSPbLqej6QXZ8e2uQnRX09mEdbuWhNjJ0jeKIiUSNdsKpXyyZH V8Oc8VC/WOkS2OWjTuLIJ+LwSQUkf93T7gzzSffshwm5egUE+l6U/4H2k6CVcrWU9xSK qzxg== X-Gm-Message-State: AOAM532WpkDf4yV8VXD52dT4UArAHlemo6Xt54OigedwOoxqPOJbZVkx KjhaQbcSY5MJrRTEBIs98JA4VBhGVhlYrMxxrvTtAw== X-Received: by 2002:a92:cb4d:: with SMTP id f13mr15703244ilq.189.1599476679896; Mon, 07 Sep 2020 04:04:39 -0700 (PDT) MIME-Version: 1.0 References: <20200904154547.3836-1-brgl@bgdev.pl> <20200904154547.3836-16-brgl@bgdev.pl> <20200904164917.GC1891694@smile.fi.intel.com> In-Reply-To: <20200904164917.GC1891694@smile.fi.intel.com> From: Bartosz Golaszewski Date: Mon, 7 Sep 2020 13:04:29 +0200 Message-ID: Subject: Re: [PATCH 15/23] gpio: mockup: use dynamic device IDs To: Andy Shevchenko Cc: Linus Walleij , Jonathan Corbet , Mika Westerberg , Kent Gibson , "open list:GPIO SUBSYSTEM" , linux-doc , Linux Kernel Mailing List , linux-acpi@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 4, 2020 at 6:49 PM Andy Shevchenko wrote: > > On Fri, Sep 04, 2020 at 05:45:39PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > We're currently creating chips at module init time only so using a > > static index for dummy devices is fine. We want to support dynamically > > created chips however so we need to switch to dynamic device IDs. > > It misses ida_destroy(). > No, we always call ida_free() for separate IDs when removing devices and we remove all devices at module exit so no need to call ida_destroy(). > What about XArray API? > Answered that somewhere - xarray is already used internally by IDA. Bart