All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux ACPI <linux-acpi@vger.kernel.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	LKML <linux-kernel@vger.kernel.org>,
	Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH 5/5] ACPI: scan: Fix race related to dropping dependencies
Date: Thu, 17 Jun 2021 08:25:23 +0800	[thread overview]
Message-ID: <202106170829.MiIFrllD-lkp@intel.com> (raw)
In-Reply-To: <3070024.5fSG56mABF@kreacher>

[-- Attachment #1: Type: text/plain, Size: 5204 bytes --]

Hi "Rafael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on next-20210616]
[cannot apply to linux/master linus/master v5.13-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-scan-Fixes-and-cleanups-related-to-dependencies-list-handling/20210617-013528
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-b001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/6369a007980e42b3ba7bbfb9833146f1867c790b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-scan-Fixes-and-cleanups-related-to-dependencies-list-handling/20210617-013528
        git checkout 6369a007980e42b3ba7bbfb9833146f1867c790b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/acpi/scan.c:660:5: warning: no previous prototype for function '__acpi_device_add' [-Wmissing-prototypes]
   int __acpi_device_add(struct acpi_device *device,
       ^
   drivers/acpi/scan.c:660:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __acpi_device_add(struct acpi_device *device,
   ^
   static 
   1 warning generated.


vim +/__acpi_device_add +660 drivers/acpi/scan.c

   659	
 > 660	int __acpi_device_add(struct acpi_device *device,
   661			      void (*release)(struct device *))
   662	{
   663		struct acpi_device_bus_id *acpi_device_bus_id;
   664		int result;
   665	
   666		/*
   667		 * Linkage
   668		 * -------
   669		 * Link this device to its parent and siblings.
   670		 */
   671		INIT_LIST_HEAD(&device->children);
   672		INIT_LIST_HEAD(&device->node);
   673		INIT_LIST_HEAD(&device->wakeup_list);
   674		INIT_LIST_HEAD(&device->physical_node_list);
   675		INIT_LIST_HEAD(&device->del_list);
   676		mutex_init(&device->physical_node_lock);
   677	
   678		mutex_lock(&acpi_device_lock);
   679	
   680		acpi_device_bus_id = acpi_device_bus_id_match(acpi_device_hid(device));
   681		if (acpi_device_bus_id) {
   682			result = acpi_device_set_name(device, acpi_device_bus_id);
   683			if (result)
   684				goto err_unlock;
   685		} else {
   686			acpi_device_bus_id = kzalloc(sizeof(*acpi_device_bus_id),
   687						     GFP_KERNEL);
   688			if (!acpi_device_bus_id) {
   689				result = -ENOMEM;
   690				goto err_unlock;
   691			}
   692			acpi_device_bus_id->bus_id =
   693				kstrdup_const(acpi_device_hid(device), GFP_KERNEL);
   694			if (!acpi_device_bus_id->bus_id) {
   695				kfree(acpi_device_bus_id);
   696				result = -ENOMEM;
   697				goto err_unlock;
   698			}
   699	
   700			ida_init(&acpi_device_bus_id->instance_ida);
   701	
   702			result = acpi_device_set_name(device, acpi_device_bus_id);
   703			if (result) {
   704				kfree_const(acpi_device_bus_id->bus_id);
   705				kfree(acpi_device_bus_id);
   706				goto err_unlock;
   707			}
   708	
   709			list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
   710		}
   711	
   712		if (device->parent)
   713			list_add_tail(&device->node, &device->parent->children);
   714	
   715		if (device->wakeup.flags.valid)
   716			list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list);
   717	
   718		mutex_unlock(&acpi_device_lock);
   719	
   720		if (device->parent)
   721			device->dev.parent = &device->parent->dev;
   722	
   723		device->dev.bus = &acpi_bus_type;
   724		device->dev.release = release;
   725		result = device_add(&device->dev);
   726		if (result) {
   727			dev_err(&device->dev, "Error registering device\n");
   728			goto err;
   729		}
   730	
   731		result = acpi_device_setup_files(device);
   732		if (result)
   733			pr_err("Error creating sysfs interface for device %s\n",
   734			       dev_name(&device->dev));
   735	
   736		return 0;
   737	
   738	err:
   739		mutex_lock(&acpi_device_lock);
   740	
   741		if (device->parent)
   742			list_del(&device->node);
   743	
   744		list_del(&device->wakeup_list);
   745	
   746	err_unlock:
   747		mutex_unlock(&acpi_device_lock);
   748	
   749		acpi_detach_data(device->handle, acpi_scan_drop_device);
   750	
   751		return result;
   752	}
   753	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30253 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 5/5] ACPI: scan: Fix race related to dropping dependencies
Date: Thu, 17 Jun 2021 08:25:23 +0800	[thread overview]
Message-ID: <202106170829.MiIFrllD-lkp@intel.com> (raw)
In-Reply-To: <3070024.5fSG56mABF@kreacher>

[-- Attachment #1: Type: text/plain, Size: 5349 bytes --]

Hi "Rafael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on next-20210616]
[cannot apply to linux/master linus/master v5.13-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/ACPI-scan-Fixes-and-cleanups-related-to-dependencies-list-handling/20210617-013528
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-b001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/6369a007980e42b3ba7bbfb9833146f1867c790b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-scan-Fixes-and-cleanups-related-to-dependencies-list-handling/20210617-013528
        git checkout 6369a007980e42b3ba7bbfb9833146f1867c790b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/acpi/scan.c:660:5: warning: no previous prototype for function '__acpi_device_add' [-Wmissing-prototypes]
   int __acpi_device_add(struct acpi_device *device,
       ^
   drivers/acpi/scan.c:660:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __acpi_device_add(struct acpi_device *device,
   ^
   static 
   1 warning generated.


vim +/__acpi_device_add +660 drivers/acpi/scan.c

   659	
 > 660	int __acpi_device_add(struct acpi_device *device,
   661			      void (*release)(struct device *))
   662	{
   663		struct acpi_device_bus_id *acpi_device_bus_id;
   664		int result;
   665	
   666		/*
   667		 * Linkage
   668		 * -------
   669		 * Link this device to its parent and siblings.
   670		 */
   671		INIT_LIST_HEAD(&device->children);
   672		INIT_LIST_HEAD(&device->node);
   673		INIT_LIST_HEAD(&device->wakeup_list);
   674		INIT_LIST_HEAD(&device->physical_node_list);
   675		INIT_LIST_HEAD(&device->del_list);
   676		mutex_init(&device->physical_node_lock);
   677	
   678		mutex_lock(&acpi_device_lock);
   679	
   680		acpi_device_bus_id = acpi_device_bus_id_match(acpi_device_hid(device));
   681		if (acpi_device_bus_id) {
   682			result = acpi_device_set_name(device, acpi_device_bus_id);
   683			if (result)
   684				goto err_unlock;
   685		} else {
   686			acpi_device_bus_id = kzalloc(sizeof(*acpi_device_bus_id),
   687						     GFP_KERNEL);
   688			if (!acpi_device_bus_id) {
   689				result = -ENOMEM;
   690				goto err_unlock;
   691			}
   692			acpi_device_bus_id->bus_id =
   693				kstrdup_const(acpi_device_hid(device), GFP_KERNEL);
   694			if (!acpi_device_bus_id->bus_id) {
   695				kfree(acpi_device_bus_id);
   696				result = -ENOMEM;
   697				goto err_unlock;
   698			}
   699	
   700			ida_init(&acpi_device_bus_id->instance_ida);
   701	
   702			result = acpi_device_set_name(device, acpi_device_bus_id);
   703			if (result) {
   704				kfree_const(acpi_device_bus_id->bus_id);
   705				kfree(acpi_device_bus_id);
   706				goto err_unlock;
   707			}
   708	
   709			list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
   710		}
   711	
   712		if (device->parent)
   713			list_add_tail(&device->node, &device->parent->children);
   714	
   715		if (device->wakeup.flags.valid)
   716			list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list);
   717	
   718		mutex_unlock(&acpi_device_lock);
   719	
   720		if (device->parent)
   721			device->dev.parent = &device->parent->dev;
   722	
   723		device->dev.bus = &acpi_bus_type;
   724		device->dev.release = release;
   725		result = device_add(&device->dev);
   726		if (result) {
   727			dev_err(&device->dev, "Error registering device\n");
   728			goto err;
   729		}
   730	
   731		result = acpi_device_setup_files(device);
   732		if (result)
   733			pr_err("Error creating sysfs interface for device %s\n",
   734			       dev_name(&device->dev));
   735	
   736		return 0;
   737	
   738	err:
   739		mutex_lock(&acpi_device_lock);
   740	
   741		if (device->parent)
   742			list_del(&device->node);
   743	
   744		list_del(&device->wakeup_list);
   745	
   746	err_unlock:
   747		mutex_unlock(&acpi_device_lock);
   748	
   749		acpi_detach_data(device->handle, acpi_scan_drop_device);
   750	
   751		return result;
   752	}
   753	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30253 bytes --]

  parent reply	other threads:[~2021-06-17  0:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 14:21 [PATCH 0/5] ACPI: scan: Fixes and cleanups related to dependencies list handling Rafael J. Wysocki
2021-06-16 14:21 ` [PATCH 1/5] ACPI: scan: Rearrange acpi_dev_get_first_consumer_dev_cb() Rafael J. Wysocki
2021-06-16 14:36   ` Hans de Goede
2021-06-16 14:22 ` [PATCH 2/5] ACPI: scan: Make acpi_walk_dep_device_list() Rafael J. Wysocki
2021-06-16 14:41   ` Hans de Goede
2021-06-16 15:11     ` Rafael J. Wysocki
2021-06-16 15:25       ` Rafael J. Wysocki
2021-06-16 15:28       ` Hans de Goede
2021-06-16 14:23 ` [PATCH 3/5] ACPI: scan: Fix device object rescan in acpi_scan_clear_dep() Rafael J. Wysocki
2021-06-16 14:48   ` Hans de Goede
2021-06-16 15:12     ` Rafael J. Wysocki
2021-06-16 14:24 ` [PATCH 4/5] ACPI: scan: Reorganize acpi_device_add() Rafael J. Wysocki
2021-06-16 14:49   ` Hans de Goede
2021-06-16 14:25 ` [PATCH 5/5] ACPI: scan: Fix race related to dropping dependencies Rafael J. Wysocki
2021-06-16 14:55   ` Hans de Goede
2021-06-16 15:19     ` Rafael J. Wysocki
2021-06-16 18:00   ` [PATCH v2 " Rafael J. Wysocki
2021-06-16 18:04     ` Hans de Goede
2021-06-17  0:25   ` kernel test robot [this message]
2021-06-17  0:25     ` [PATCH " kernel test robot
2021-06-17  0:41   ` kernel test robot
2021-06-17  0:41     ` kernel test robot
2021-06-17  0:42   ` [RFC PATCH] ACPI: scan: __acpi_device_add() can be static kernel test robot
2021-06-17  0:42     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202106170829.MiIFrllD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hdegoede@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.