Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22123132rwd; Fri, 30 Jun 2023 04:18:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOEkqvhp9UiyaXetcPzoSXAilSaGd3OQ7LXGNskx/UjgbPU5lynCgl4KSb3uv1akNwK0dI X-Received: by 2002:a05:6a20:6d82:b0:10b:cdb1:3563 with SMTP id gl2-20020a056a206d8200b0010bcdb13563mr2124536pzb.46.1688123924416; Fri, 30 Jun 2023 04:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688123924; cv=none; d=google.com; s=arc-20160816; b=T5D5bG/7ycKFs/CDknzZT+Fii+lPbH1pX0tc3PPcwy4BqtWMiWab9p/Jwl/lalLMuV QIm4DvkrGo1HVPhtg7Ls0rED+60vTEHhn30bZAx6wWioy6Rz/0U4Q1cfRr9OikwM1x8B HGEUf69Av8s9zBN3hh+sXUB6vc1wR5rzampeF99KcEwKPgJM5NyFmlQiVMRhrqxoKSze +sKYmROdeZn35PO8xEGXqNz2+KVxjP2duYstKe1MmI2gWcSYOC2urM7ZuqFLLAWfZj5S fBkOUeAmKcpI5j69vivIdLDQNufLdozyS9Ts7txAaPaz+u+UeL64uafHSZEiKuiQorAw L9RA== 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=XkKyAIBW2Dvp3mqTj+PKRYrX0b14ZighYUojz09P69E=; fh=tx5viwV3JsEC2BiiDaUvzl7wVVT7+tKnr1XZPesdzrY=; b=gwQPaGxVWGFPO9vBA465qlVAUlup6G4mmhZIkw/u/vygezbI0sPgr2XloKWJfDYrG3 MmGBc1r2hGSWAKhqSXMi6HG8tx8AWjYFsw2chhNz4iCyFdRb5cEcd8pS6UBr9UUClbvu EDdB3o0QYR6Av1tVEgIgtsqd4F/TXdSwI7n7rUaS441L7sm7kj6EfHMbRH0Ha7Cbup8x C7D1YHyMjr/MAF7thUyt5HeoJknBziE2001GWjnV+HNwlE8jCEYRzncwWf4m++CcugzM Akp2c+YnblcTFIpJJyHeJiruXtk+fC6mXOfzLfdvOy7uZwltBruNaO1hbSKIi74OIG0s n/9A== 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 191-20020a6301c8000000b005579d6bdf85si11484111pgb.882.2023.06.30.04.18.30; Fri, 30 Jun 2023 04:18:44 -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 S232251AbjF3Kx1 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 30 Jun 2023 06:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232288AbjF3KxG (ORCPT ); Fri, 30 Jun 2023 06:53:06 -0400 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DBBD35B6; Fri, 30 Jun 2023 03:53:04 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-94ea38c90ccso47836466b.1; Fri, 30 Jun 2023 03:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688122383; x=1690714383; 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=/A56lQbaSYx6f8A8Kd9myuvvjZF2IChmVUGzObphlZg=; b=I9+ZCk4HUfdY42bTSscxs1a/+YAhPUEpSY4wqOXX1XiS6V7OL0tLJW3xSyB/delA6m Jz5DY5N1u/S5fjvWDnlt9G63i/HT22gx0HNyB73vJy56df3P3TVGDFg7zVMI4y4M8opO 410bchTm1yiGP+7pYdpxUugCJS1pfBQO71lI8Tndiy9fIalzrfWGnmB6NNlh0HuTWQ3v bQ77ZL+h+N/h36REnQxhpxRdFpjpzonNPmQgGktpOn/rNin/RLR4/3d5K4XfFrjebdAE ej2t7o9cVRSr8NOHfiVM3drM191uTl/6fGUGGEblyYlEZT7673LSjaR0Y3iIiwhYbzli SUeg== X-Gm-Message-State: ABy/qLZfnxpeA66DCyyqZ6QxAnhrF4QLVjbaNsGLiYX+0yZ17r9UQG6C FmArxT1DhsZeujXMxOCMgueQ7IF9wK/hXdPKVDo= X-Received: by 2002:a17:906:35c5:b0:988:8220:2af0 with SMTP id p5-20020a17090635c500b0098882202af0mr1588637ejb.5.1688122383089; Fri, 30 Jun 2023 03:53:03 -0700 (PDT) MIME-Version: 1.0 References: <20230616165034.3630141-1-michal.wilczynski@intel.com> <20230616165034.3630141-8-michal.wilczynski@intel.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 30 Jun 2023 12:52:52 +0200 Message-ID: Subject: Re: [PATCH v5 07/10] acpi/nfit: Move acpi_nfit_notify() before acpi_nfit_add() To: "Wilczynski, Michal" Cc: "Rafael J. Wysocki" , linux-acpi@vger.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_H3,RCVD_IN_MSPIKE_WL,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 Fri, Jun 30, 2023 at 11:48 AM Wilczynski, Michal wrote: > > > > On 6/29/2023 6:06 PM, Rafael J. Wysocki wrote: > > On Fri, Jun 16, 2023 at 6:51 PM Michal Wilczynski > > wrote: > >> To use new style of installing event handlers acpi_nfit_notify() needs > >> to be known inside acpi_nfit_add(). Move acpi_nfit_notify() upwards in > >> the file, so it can be used inside acpi_nfit_add(). > >> > >> Signed-off-by: Michal Wilczynski > >> --- > >> drivers/acpi/nfit/core.c | 14 +++++++------- > >> 1 file changed, 7 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > >> index 07204d482968..aff79cbc2190 100644 > >> --- a/drivers/acpi/nfit/core.c > >> +++ b/drivers/acpi/nfit/core.c > >> @@ -3312,6 +3312,13 @@ void acpi_nfit_shutdown(void *data) > >> } > >> EXPORT_SYMBOL_GPL(acpi_nfit_shutdown); > >> > >> +static void acpi_nfit_notify(struct acpi_device *adev, u32 event) > >> +{ > >> + device_lock(&adev->dev); > >> + __acpi_nfit_notify(&adev->dev, adev->handle, event); > >> + device_unlock(&adev->dev); > >> +} > >> + > >> static int acpi_nfit_add(struct acpi_device *adev) > >> { > >> struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL }; > >> @@ -3446,13 +3453,6 @@ void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event) > >> } > >> EXPORT_SYMBOL_GPL(__acpi_nfit_notify); > >> > >> -static void acpi_nfit_notify(struct acpi_device *adev, u32 event) > >> -{ > >> - device_lock(&adev->dev); > >> - __acpi_nfit_notify(&adev->dev, adev->handle, event); > >> - device_unlock(&adev->dev); > >> -} > >> - > >> static const struct acpi_device_id acpi_nfit_ids[] = { > >> { "ACPI0012", 0 }, > >> { "", 0 }, > >> -- > > Please fold this patch into the next one. By itself, it is an > > artificial change IMV. > > I agree with you, but I got told specifically to do that. > https://lore.kernel.org/linux-acpi/e0f67199-9feb-432c-f0cb-7bdbdaf9ff63@linux.intel.com/ Whether or not this is easier to review is kind of subjective. If there were more code to move, I would agree, but in this particular case having to review two patches instead of just one is a bit of a hassle IMV.