Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4248235rdb; Thu, 14 Sep 2023 17:11:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKi0yLXYocdt+BO7XjMGGkjYdphEt3U+8K84XTF5FeWd7GBzc4vJt/Jg+0HJlYU8x55Gmx X-Received: by 2002:a05:6a20:4289:b0:13e:9dba:ea43 with SMTP id o9-20020a056a20428900b0013e9dbaea43mr4501702pzj.2.1694736702603; Thu, 14 Sep 2023 17:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694736702; cv=none; d=google.com; s=arc-20160816; b=EUqvv8S4tWYU7P3tYqcApdQxBsGHDlrcwUESmAYdV32Rf/UQP8Kc7HJvvWko4TN+zz ydGC2jT0VwNlLSc2uvHnx2HK2vQP++dRdTKelaysvxRvoQP5Dc2sy8Or5ZMVh8HKp0kn mhUFRNbmAX5vAzOBcPGnXfAKsZSwx+1VDWIt723stqnqcleHpJzngKpnv28id+VtYB7E 5bFbY7M8JqxBpJbEWwdUG17xWJPcU7B8HY5IoUj8CuYQn/IwdSHCg+CuUDIlmC66i1jf PKpCsRyUvLmpmDnfGeGD6UdiUYPkYC+KcXVutXKXTx6q59BG/UJTTitpw3vS+CrldA+7 AzpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2ohGulBS7MRs3PolsepHjF1OjuBV88N+Foiw/SqZlk4=; fh=BvAjJsSQRkgi2CsxifPJfY/Y15b/GVQ8617op8bATeI=; b=GA4yOBMdEwUowOr4eRIe1e4f8EUR1T5ExtkbANi/wwZpZoLeRI8XTxF4maQCxlbC0a nyF7G2x3mJDgNKrwgAqHpNiZ60b3haCTSi6O8zpYxXvVfLHvwv088RB8b8UbS1WdK5ns RSlD4LfZMBbJ0spFyTa+u0CYdVkyFpgLNnhuF+HuElgaMck83GFJ7xoJkbPEZVkggTrn D4d1FwZBrJXJkdmEp8EX2pqxzxxaW8/jip9iAVRN7Iezn5eHgqcTPIpgJtY5uMZsInSI WYDLdUqm5UdZ0zZJQ8Amt34JgrJsDml6uE3f19X7QQ1kfGV9fGZp52l1kZRAx9i05cpc m6Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wxcrE226; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z16-20020a656650000000b0056c297d1640si2196020pgv.528.2023.09.14.17.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 17:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wxcrE226; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5AA4A82E10BC; Thu, 14 Sep 2023 12:29:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239466AbjINT3O (ORCPT + 99 others); Thu, 14 Sep 2023 15:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbjINT3N (ORCPT ); Thu, 14 Sep 2023 15:29:13 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ACEE26AB; Thu, 14 Sep 2023 12:29:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A303FC433C7; Thu, 14 Sep 2023 19:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694719748; bh=hNAY8MGYf8YcUA4vUEpZaRVEM+yzGB604aBLvFxOsT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wxcrE226jsia0S3OIWHpfgtZ/AoKg0fTDExE9v9F1PNvhRw0uvpE8Va/msOBLScs9 gpOk7cXfKnBHScKDhQrGdrE5/hJtQaAx1W0vJXNKgxwzf3D3jpyD17hVbJC075Eqnx +8JtylLCHswVV53CHy8hAp5JKHzgx/i6dR8lGuRw= Date: Thu, 14 Sep 2023 21:29:00 +0200 From: Greg KH To: Jinhui Guo Cc: rafael@kernel.org, lenb@kernel.org, lizefan.x@bytedance.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH v4] driver core: platform: set numa_node before platform_add_device() Message-ID: <2023091440-worried-raider-7c85@gregkh> References: <20230914150612.3440-1-guojinhui.liam@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230914150612.3440-1-guojinhui.liam@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Sep 2023 12:29:19 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email On Thu, Sep 14, 2023 at 11:06:12PM +0800, Jinhui Guo wrote: > platform_add_device() creates the numa_node attribute of sysfs according > to whether dev_to_node(dev) is equal to NUMA_NO_NODE. So set the numa node > of device before creating numa_node attribute of sysfs. > > Fixes: 4a60406d3592 ("driver core: platform: expose numa_node to users in sysfs") > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202309122309.mbxAnAIe-lkp@intel.com/ > Signed-off-by: Jinhui Guo > --- > drivers/acpi/acpi_platform.c | 4 +--- > drivers/base/platform.c | 1 + > include/linux/acpi.h | 5 +++++ > 3 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c > index 48d15dd785f6..adcbfbdc343f 100644 > --- a/drivers/acpi/acpi_platform.c > +++ b/drivers/acpi/acpi_platform.c > @@ -178,11 +178,9 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, > if (IS_ERR(pdev)) > dev_err(&adev->dev, "platform device creation failed: %ld\n", > PTR_ERR(pdev)); > - else { > - set_dev_node(&pdev->dev, acpi_get_node(adev->handle)); > + else > dev_dbg(&adev->dev, "created platform device %s\n", > dev_name(&pdev->dev)); > - } > > kfree(resources); > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c > index 76bfcba25003..35c891075d95 100644 > --- a/drivers/base/platform.c > +++ b/drivers/base/platform.c > @@ -841,6 +841,7 @@ struct platform_device *platform_device_register_full( > goto err; > } > > + set_dev_node(&pdev->dev, ACPI_NODE_GET(ACPI_COMPANION(&pdev->dev))); > ret = platform_device_add(pdev); > if (ret) { > err: > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index a73246c3c35e..6a349d53f19e 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -477,6 +477,10 @@ static inline int acpi_get_node(acpi_handle handle) > return 0; > } > #endif > + > +#define ACPI_NODE_GET(adev) ((adev) && (adev)->handle ? \ > + acpi_get_node((adev)->handle) : NUMA_NO_NODE) > + > extern int pnpacpi_disabled; > > #define PXM_INVAL (-1) > @@ -770,6 +774,7 @@ const char *acpi_get_subsystem_id(acpi_handle handle); > #define ACPI_COMPANION_SET(dev, adev) do { } while (0) > #define ACPI_HANDLE(dev) (NULL) > #define ACPI_HANDLE_FWNODE(fwnode) (NULL) > +#define ACPI_NODE_GET(adev) NUMA_NO_NODE > > #include > > -- > 2.20.1 > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documetnation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot