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.8 required=3.0 tests=BAYES_00, 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 6C11AC07E9C for ; Mon, 12 Jul 2021 18:36:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5135D61206 for ; Mon, 12 Jul 2021 18:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235858AbhGLSi7 (ORCPT ); Mon, 12 Jul 2021 14:38:59 -0400 Received: from mga05.intel.com ([192.55.52.43]:65212 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230181AbhGLSi5 (ORCPT ); Mon, 12 Jul 2021 14:38:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="295681284" X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="295681284" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 11:36:07 -0700 X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="459281025" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 11:36:05 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m30md-00CKKX-E9; Mon, 12 Jul 2021 21:35:59 +0300 Date: Mon, 12 Jul 2021 21:35:59 +0300 From: Andy Shevchenko To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Linux ACPI , LKML , "Krogerus, Heikki" Subject: Re: [PATCH v1 4/6] ACPI: glue: Eliminate acpi_platform_notify() Message-ID: References: <2780027.e9J7NaK4W3@kreacher> <8790139.CDJkKcVGEf@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8790139.CDJkKcVGEf@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 12, 2021 at 07:25:55PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Get rid of acpi_platform_notify() which is redundant and > make device_platform_notify() in the driver core call > acpi_device_notify() and acpi_device_notify_remove() directly. > + if (action == KOBJ_ADD) > + acpi_device_notify(dev); > + else if (action == KOBJ_REMOVE) > + acpi_device_notify_remove(dev); In most of the cases we are using switch-case approach with KOBJ_ADD/KOBJ_REMOVE. Would it make sense to keep that pattern? -- With Best Regards, Andy Shevchenko