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=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 0F65CC5DF9E for ; Thu, 22 Oct 2020 18:45:59 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 461D924641 for ; Thu, 22 Oct 2020 18:45:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A8jUhEN6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 461D924641 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 53729203F7; Thu, 22 Oct 2020 18:45:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eybklU++oKnZ; Thu, 22 Oct 2020 18:45:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3242C203DC; Thu, 22 Oct 2020 18:45:56 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A9DCE1BF357 for ; Thu, 22 Oct 2020 18:45:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A132D86D9F for ; Thu, 22 Oct 2020 18:45:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cPEjcuxlen6f for ; Thu, 22 Oct 2020 18:45:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6544686C8C for ; Thu, 22 Oct 2020 18:45:53 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id w21so1706561pfc.7 for ; Thu, 22 Oct 2020 11:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PJ+uKLoDbt4Kdg8ImByLjA8Njsk3WlOLgUgCbpkC9zk=; b=A8jUhEN65PHD6v/QKxHHZH30h3Bes875e+6+YJN1oRjC7MZxpv05pacosmi/+65EBk Dx8XXnOnRTnBVHVQ5JmYEycve17jrdZVst0f6IsgoRtTyydrVVoQEhhVNi4cbk+tod5A MNLeNR+TUQSkY5iFpk/xW8fcCvmfbFIEIsWzj8l/+MZ2GaZLFfk/oasxZ10SVZDdetqd m7cKjO1GDgNygAgXbqYg3qwViz8gUMo2l9iN/xTV7hcM7OzUJgHiVxn2xn1Ix11Xn3Mj w5xyxZzMqJdXhyvSL/CCT5pFyt+G/Ry3aTxphw+1BfRgwJ6o1PZGhL3mLbVF7NEE1HQo stlA== 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=PJ+uKLoDbt4Kdg8ImByLjA8Njsk3WlOLgUgCbpkC9zk=; b=ZC2JjxuhQiXiKqSWJ1qszGyLXGfDju9GyjtWMEio74a1lwlCp/HZGNixL2Kjq5QqSS CGdY60h22EADoYP//A8NetuIcl/BKneH6LtSQhumUA+K9LbIRLNQMmKTBkEZu6Fj/H0h lqUZEHpEpXOP+OD1DL9Ll2iCV6+etbKJY1j+53JeWhihdQso6x0rMeuCcIbC/E26T6Qr j93qiSZ1POY4bRMguPBp/2xXJ8+OXYuje8Cj+ncgfs5gZ1HXoHveA/XucNbDIXbFo98H 3wfmiLElZomDpOXuK9BpjGvzL0/sQWq1Oy78lNCbxoSGMFEYE4G8DU7iDRDgVCi3Ikrg P1QQ== X-Gm-Message-State: AOAM533XIYYvQZjPBH9W8E6bveKV1L7zUl+Ev25k1wqpPDkGOjJwiLMI 4E5b6LTisYGqT20R+swMSa7LmRaslrKEVbCNeBo= X-Google-Smtp-Source: ABdhPJwNbfbJKg7L/+F+lSBYE2PF207sJKCE67fjAwiCaIsXfyZycJr3U4/+t0LHsJes+amoJNW5cfEG1vmDYyxED/U= X-Received: by 2002:a05:6a00:22c2:b029:156:543:7c1d with SMTP id f2-20020a056a0022c2b029015605437c1dmr3749000pfj.40.1603392352903; Thu, 22 Oct 2020 11:45:52 -0700 (PDT) MIME-Version: 1.0 References: <20201022155858.20867-1-nsaenzjulienne@suse.de> <20201022155858.20867-2-nsaenzjulienne@suse.de> In-Reply-To: <20201022155858.20867-2-nsaenzjulienne@suse.de> From: Andy Shevchenko Date: Thu, 22 Oct 2020 21:46:41 +0300 Message-ID: Subject: Re: [PATCH v2 01/10] firmware: raspberrypi: Introduce rpi_firmware_put() To: Nicolas Saenz Julienne X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:STAGING SUBSYSTEM" , linux-pwm@vger.kernel.org, Florian Fainelli , Scott Branden , devicetree , Stephen Boyd , Ray Jui , Linus Walleij , linux-input , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Greg Kroah-Hartman , bcm-kernel-feedback-list , Stefan Wahren , Philipp Zabel , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Dmitry Torokhov , linux-clk , linux-arm Mailing List , linux-rpi-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Thu, Oct 22, 2020 at 9:06 PM Nicolas Saenz Julienne wrote: > > When unbinding the firmware device we need to make sure it has no > consumers left. Otherwise we'd leave them with a firmware handle > pointing at freed memory. > > Keep a reference count of all consumers and make sure they all finished > unbinding before we do. Wait, if it's a device, why do we need all these? get_device() / put_device() along with module_get() / module_put() should be sufficient, no? -- With Best Regards, Andy Shevchenko _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel