Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2728377rwp; Fri, 14 Jul 2023 10:20:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlGK6slTKujGOH25watCDuTsopdm2GNhAvDdJNSdYI6M883eBXMhe5SZ+x8QHRra8w1cMVjf X-Received: by 2002:a17:902:ab03:b0:1b7:ecbb:aa06 with SMTP id ik3-20020a170902ab0300b001b7ecbbaa06mr5344969plb.55.1689355200161; Fri, 14 Jul 2023 10:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689355200; cv=none; d=google.com; s=arc-20160816; b=fq7xowV2iMGcf3CP0r2s0Az+FTGJOdJQaKaNidx8JMiPWLOL5Lcn3eQjTQ/Gli5x3b qZY1k74fNGUVbhuYmBdqGK3zBXNAX04FDndBaasQUwMVTgFJf7/tcnAuvhe+/kMQPTm+ XYOPByF02EanygfxK9sA/3GM9iETTAUvFUXN+c8/41iSIuiheMCTMe2VVRPPabTYeL7m gqpOubXKVRgAAdUC+DdCA69p7nUOU+elNqLHNkYpHb+ukk/xpdQH/kURTI4dZ7Cx1rqC 0+CyuS43c+0kY4J45D1ZaQGbwwqK8JLYskcRKu1YYFXhCHTucwIbTbHXrj4UqMxYqLPO N0uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=n7y2KeOZx0ViSjX4ZoVeQUl1Qakf2NRjipXaDX4wDlY=; fh=f+5SYws7TYBr70PQKOb3YNU1lThQ67hqn6UIIzgKjuw=; b=ogDLCOLavvn0OyydEGbVwfeudZp3FzEuzHfKfwF8nZ1zvtd2BnjC7UuEtvGV2nxKNh R7DJ4T3erlGR04qlgNNSnWyigaIsuYkR6ZQmC8gRsax7XE0TtkTeYOd1nMH50scHiIHz pkxw3Q3cJ1lylb68crFo1Wj0C3s7rzLqflPzgnqCuwB382kQV5HjkSeB5VSGLPfO25AI Xllc+HTQE6UTDy2tr5Y+TdqAjghdWRJQIuCLc0dADnCFgIaPlfJTjG6uZDpvTW60XA2Z fyRyiC8A2ZHCg34hVEXXYJQU6mt6dltYamtNm1bVTWrdbRBDyiWKdI0v3Z2sZELyi1s+ xBAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170902e5c300b001aaf639c4easi7596252plf.109.2023.07.14.10.19.48; Fri, 14 Jul 2023 10:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235893AbjGNRDc convert rfc822-to-8bit (ORCPT + 99 others); Fri, 14 Jul 2023 13:03:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235470AbjGNRDa (ORCPT ); Fri, 14 Jul 2023 13:03:30 -0400 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5093510EA; Fri, 14 Jul 2023 10:03:29 -0700 (PDT) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-94ea38c90ccso58901166b.1; Fri, 14 Jul 2023 10:03:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689354208; x=1691946208; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+w920JXIkybPetWi046ZRPSw5JR8m5DRlgdvfm2InwE=; b=H0zynSgGU/bMGzV/Rh8XzKo/pCD/njfFU4id4Eb3kgjs5kPjYLzHYU9Iei7aAY9/2H nICoekjfUzlHTDG/vBvVb9EH5KbkfLlrd+/Y34FBPyMvONRcbekOBNvrKNRAEczw0jwv Lv0Rxijb8+uH/TizRt7BIg5aEnGD+ClnI8ivRbaCLtZvhGqJU+pVud7nMA7LBNsbP8LH yTv54FeYi/S8aEf9p+rcKc7nENAVumAyMMCLpi8nou9Pcl3J6K54ZuyZbjiIX29uAdE3 W/onUSlOn6kjwMPLrxtoFt6izSgB/J6KoQqwshGF3mHwIdMAN+uNXKNxYCipLFil2tNY gsaw== X-Gm-Message-State: ABy/qLZwrx1h3CJ0qH0VnAEK0buKI9Mhbn6XE3H7MCGucFX8wEuzGy3v wkOuGrN26fKN1inkGWAWPgwtOvQEkG14+F8z1pL2qjYG X-Received: by 2002:a17:906:de:b0:993:d5e7:80f8 with SMTP id 30-20020a17090600de00b00993d5e780f8mr4216969eji.7.1689354207604; Fri, 14 Jul 2023 10:03:27 -0700 (PDT) MIME-Version: 1.0 References: <20230703080252.2899090-1-michal.wilczynski@intel.com> In-Reply-To: <20230703080252.2899090-1-michal.wilczynski@intel.com> From: "Rafael J. Wysocki" Date: Fri, 14 Jul 2023 19:03:16 +0200 Message-ID: Subject: Re: [PATCH v7 0/9] Remove .notify callback in acpi_device_ops To: Michal Wilczynski Cc: linux-acpi@vger.kernel.org, rafael@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, lenb@kernel.org, dave.jiang@intel.com, ira.weiny@intel.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 3, 2023 at 10:03 AM Michal Wilczynski wrote: > > *** IMPORTANT *** > This is part 1 - only drivers in acpi directory to ease up review > process. Rest of the drivers will be handled in separate patchsets. > > Currently drivers support ACPI event handlers by defining .notify > callback in acpi_device_ops. This solution is suboptimal as event > handler installer installs intermediary function acpi_notify_device as a > handler in every driver. Also this approach requires extra variable > 'flags' for specifying event types that the driver want to subscribe to. > Additionally this is a pre-work required to align acpi_driver with > platform_driver and eventually replace acpi_driver with platform_driver. > > Remove .notify callback from the acpi_device_ops. Replace it with each > driver installing and removing it's event handlers. > > This is part 1 - only drivers in acpi directory to ease up review > process. > > v7: > - fix warning by declaring acpi_nfit_remove_notify_handler() as static > > v6: > - fixed unnecessary RCT in all drivers, as it's not a purpose of > this patch series > - changed error label names to simplify them > - dropped commit that remove a comma > - squashed commit moving code for nfit > - improved nfit driver to use devm instead of .remove() > - re-based as Rafael changes [1] are merged already > > v5: > - rebased on top of Rafael changes [1], they're not merged yet > - fixed rollback in multiple drivers so they don't leak resources on > failure > - made this part 1, meaning only drivers in acpi directory, rest of > the drivers will be handled in separate patchsets to ease up review > > v4: > - added one commit for previously missed driver sony-laptop, > refactored return statements, added NULL check for event installer > v3: > - lkp still reported some failures for eeepc, fujitsu and > toshiba_bluetooth, fix those > v2: > - fix compilation errors for drivers > > [1]: https://lore.kernel.org/linux-acpi/1847933.atdPhlSkOF@kreacher/ > > Michal Wilczynski (9): > acpi/bus: Introduce wrappers for ACPICA event handler install/remove > acpi/bus: Set driver_data to NULL every time .add() fails > acpi/ac: Move handler installing logic to driver > acpi/video: Move handler installing logic to driver > acpi/battery: Move handler installing logic to driver > acpi/hed: Move handler installing logic to driver > acpi/nfit: Move handler installing logic to driver > acpi/nfit: Remove unnecessary .remove callback > acpi/thermal: Move handler installing logic to driver Dan hasn't spoken up yet, but I went ahead and queued up the patches (with some modifications) for 6.6. I've edited the subjects and rewritten the changelogs and I've adjusted some white space around function calls (nothing major). Thanks!