Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1416425rdh; Fri, 24 Nov 2023 12:05:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHf33i3+1E4QAVb5BDLAx/8Ct+s6e2SgPLcUPcx2C+1eI0ce960fZOUj/14NOmp3J7/9+Zp X-Received: by 2002:a05:6a00:1387:b0:6cb:68d7:b1bc with SMTP id t7-20020a056a00138700b006cb68d7b1bcmr4128485pfg.30.1700856309844; Fri, 24 Nov 2023 12:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700856309; cv=none; d=google.com; s=arc-20160816; b=UX9bNAgqV0UhnIIRAdD7wcoUNizWvGN7BjsARItevpmxt0jBf/SWQ2B18HwzmkdAx3 Qgo8wYtGNkdkSfvzBDVSwtE7kqHY+niMdLCkpAFpOB9PX6fVhbKWTrK6dJQPzum4Kkjt kIeqvuxHOXs9Bc+vpfcnB7wKW4VlCMogsd9aVDu9JgaoaGVcDMLMbvGXHTAsFdv/2+m2 nN6LgA1M6b0NyUYK4VP4KcXKay+D3FLaJAJrgEHaqm9qnBv+LDfFNZ40GJ4KENoR3pS3 JiFkRVQPZ/VOQi4ElZcCVk5/cFkkbelfAcGhC5v3vAYe7fFD2yIktN48wpMRDg2RK7tR mBFw== 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=OY9YcIkUzRaYqhzwv6DApc/RhV40AdltShEW4h7fBak=; fh=nEJoRqYB4iRkfrcmQB0repD1SnqHKvqu/B/rrwPAmnE=; b=xrl5qMqI/xn+5pmz40BMRDsi439+VIKd3JSCmfqsla+zhA9KVcUbTijJiRLGarhXya pQvot4fb8TWZHOeuynha3XpBZLOo33bzzNo+5uG9pSAMvdn6zwkWY7rgVjKn3gW3J+Mb +SXOsNaSGylvYhbAz9xsyP59wDDhk8MH6H+zQFWVFX4YaqvvI5fEvgG2o61kYqM/9NbJ ftJmqXfilgzz+kjBpL5kOfr6/ebpye/28iewII6WW+6YsFBmkGy0NxHgnR6knDwbRdTa pFXtXOiiUMMyvk2RCzvhUZH9wsSQ1NX+/sRm5SIqjD5zC7Xaa62Z67LrqqiPBnL08Uso WtRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c0QpepHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b1-20020a056a00114100b006cb6cc08e3fsi4312332pfm.387.2023.11.24.12.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 12:05:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c0QpepHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 923618026E2E; Fri, 24 Nov 2023 12:05:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345989AbjKXUEs (ORCPT + 99 others); Fri, 24 Nov 2023 15:04:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjKXUEr (ORCPT ); Fri, 24 Nov 2023 15:04:47 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFFE8A4; Fri, 24 Nov 2023 12:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700856293; x=1732392293; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7NCnXLYGOPqhUuq5g4D00rGmocQWPsR60qAv9mGEqos=; b=c0QpepHdfi5HWeMUlNbQOATllzsPMc/08JPFBivR/RTvFua2NyRsJ2RW glsKwsKeiROqAdQf0DaaByIcyfO7jOvaz7gBoGrm1t6c6KL8nqpYGrn7u IKRZIyNsCU9bekAhpXiZlPZAdlpiW3BgzpQ+LTfl+kUDn4StNTjsDsPA7 NNh1n5jM43FyT4QZoC0TXAtH6i4wVqsFnvu+IXEGAHkercA8Jr9PeWAWz Appj6PBNXSNDpRSMkWBhnTnz/joc18rV46AJzrLKdcjyleYbFIaHwhcG7 l4iQGW9GTcH85ED/AxPfxZu2DxJ1ZtpHdCuFigbXK1qbJDm86reG7BHLC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="392225839" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="392225839" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 12:04:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10904"; a="761031432" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="761031432" Received: from lkp-server01.sh.intel.com (HELO d584ee6ebdcc) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 24 Nov 2023 12:04:49 -0800 Received: from kbuild by d584ee6ebdcc with local (Exim 4.96) (envelope-from ) id 1r6cPv-0003F9-07; Fri, 24 Nov 2023 20:04:47 +0000 Date: Sat, 25 Nov 2023 04:04:30 +0800 From: kernel test robot To: Oleksij Rempel , Greg Kroah-Hartman , "Rafael J. Wysocki" , Ulf Hansson , Mark Brown Cc: oe-kbuild-all@lists.linux.dev, Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org, =?iso-8859-1?Q?S=F8ren?= Andersen Subject: Re: [PATCH v1 1/3] driver core: move core part of device_shutdown() to a separate function Message-ID: <202311250213.Ba7c2l5R-lkp@intel.com> References: <20231124145338.3112416-2-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231124145338.3112416-2-o.rempel@pengutronix.de> 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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]); Fri, 24 Nov 2023 12:05:06 -0800 (PST) Hi Oleksij, kernel test robot noticed the following build warnings: [auto build test WARNING on driver-core/driver-core-testing] [also build test WARNING on driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.7-rc2 next-20231124] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Oleksij-Rempel/driver-core-move-core-part-of-device_shutdown-to-a-separate-function/20231124-225602 base: driver-core/driver-core-testing patch link: https://lore.kernel.org/r/20231124145338.3112416-2-o.rempel%40pengutronix.de patch subject: [PATCH v1 1/3] driver core: move core part of device_shutdown() to a separate function config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20231125/202311250213.Ba7c2l5R-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231125/202311250213.Ba7c2l5R-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202311250213.Ba7c2l5R-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/base/core.c:4731: warning: expecting prototype for device_shutdown_one(). Prototype was for device_shutdown_one_locked() instead vim +4731 drivers/base/core.c b8f33e5d76a7a1 Christian Brauner 2020-02-27 4721 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4722 /** 52950bfb3bedfc Oleksij Rempel 2023-11-24 4723 * device_shutdown_one - shut down a device 52950bfb3bedfc Oleksij Rempel 2023-11-24 4724 * @dev: device to shut down 52950bfb3bedfc Oleksij Rempel 2023-11-24 4725 * 52950bfb3bedfc Oleksij Rempel 2023-11-24 4726 * It is called with the device lock held. 52950bfb3bedfc Oleksij Rempel 2023-11-24 4727 * 52950bfb3bedfc Oleksij Rempel 2023-11-24 4728 * The device must be on the devices_kset list. 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4729 */ 52950bfb3bedfc Oleksij Rempel 2023-11-24 4730 static void device_shutdown_one_locked(struct device *dev) 37b0c020343080 Greg Kroah-Hartman 2007-11-26 @4731 { 52950bfb3bedfc Oleksij Rempel 2023-11-24 4732 struct device *parent; d1c6c030fcec6f Ming Lei 2012-06-22 4733 52950bfb3bedfc Oleksij Rempel 2023-11-24 4734 lockdep_assert_held(&devices_kset->list_lock); d1c6c030fcec6f Ming Lei 2012-06-22 4735 /* d1c6c030fcec6f Ming Lei 2012-06-22 4736 * hold reference count of device's parent to d1c6c030fcec6f Ming Lei 2012-06-22 4737 * prevent it from being freed because parent's d1c6c030fcec6f Ming Lei 2012-06-22 4738 * lock is to be held d1c6c030fcec6f Ming Lei 2012-06-22 4739 */ f123db8e9d6c84 Benson Leung 2013-09-24 4740 parent = get_device(dev->parent); 6245838fe4d2ce Hugh Daschbach 2010-03-22 4741 get_device(dev); 6245838fe4d2ce Hugh Daschbach 2010-03-22 4742 /* 6245838fe4d2ce Hugh Daschbach 2010-03-22 4743 * Make sure the device is off the kset list, in the 6245838fe4d2ce Hugh Daschbach 2010-03-22 4744 * event that dev->*->shutdown() doesn't remove it. 6245838fe4d2ce Hugh Daschbach 2010-03-22 4745 */ 6245838fe4d2ce Hugh Daschbach 2010-03-22 4746 list_del_init(&dev->kobj.entry); 6245838fe4d2ce Hugh Daschbach 2010-03-22 4747 spin_unlock(&devices_kset->list_lock); fe6b91f47080eb Alan Stern 2011-12-06 4748 d1c6c030fcec6f Ming Lei 2012-06-22 4749 /* hold lock to avoid race with probe/release */ f123db8e9d6c84 Benson Leung 2013-09-24 4750 if (parent) f123db8e9d6c84 Benson Leung 2013-09-24 4751 device_lock(parent); d1c6c030fcec6f Ming Lei 2012-06-22 4752 device_lock(dev); d1c6c030fcec6f Ming Lei 2012-06-22 4753 fe6b91f47080eb Alan Stern 2011-12-06 4754 /* Don't allow any more runtime suspends */ fe6b91f47080eb Alan Stern 2011-12-06 4755 pm_runtime_get_noresume(dev); fe6b91f47080eb Alan Stern 2011-12-06 4756 pm_runtime_barrier(dev); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4757 7521621e600aee Michal Suchanek 2017-08-11 4758 if (dev->class && dev->class->shutdown_pre) { f77af151658474 Josh Zimmerman 2017-06-25 4759 if (initcall_debug) 7521621e600aee Michal Suchanek 2017-08-11 4760 dev_info(dev, "shutdown_pre\n"); 7521621e600aee Michal Suchanek 2017-08-11 4761 dev->class->shutdown_pre(dev); 7521621e600aee Michal Suchanek 2017-08-11 4762 } 7521621e600aee Michal Suchanek 2017-08-11 4763 if (dev->bus && dev->bus->shutdown) { 0246c4fafccd6c ShuoX Liu 2012-11-23 4764 if (initcall_debug) 0246c4fafccd6c ShuoX Liu 2012-11-23 4765 dev_info(dev, "shutdown\n"); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4766 dev->bus->shutdown(dev); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4767 } else if (dev->driver && dev->driver->shutdown) { 0246c4fafccd6c ShuoX Liu 2012-11-23 4768 if (initcall_debug) 0246c4fafccd6c ShuoX Liu 2012-11-23 4769 dev_info(dev, "shutdown\n"); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4770 dev->driver->shutdown(dev); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4771 } d1c6c030fcec6f Ming Lei 2012-06-22 4772 d1c6c030fcec6f Ming Lei 2012-06-22 4773 device_unlock(dev); f123db8e9d6c84 Benson Leung 2013-09-24 4774 if (parent) f123db8e9d6c84 Benson Leung 2013-09-24 4775 device_unlock(parent); d1c6c030fcec6f Ming Lei 2012-06-22 4776 6245838fe4d2ce Hugh Daschbach 2010-03-22 4777 put_device(dev); f123db8e9d6c84 Benson Leung 2013-09-24 4778 put_device(parent); 6245838fe4d2ce Hugh Daschbach 2010-03-22 4779 6245838fe4d2ce Hugh Daschbach 2010-03-22 4780 spin_lock(&devices_kset->list_lock); 37b0c020343080 Greg Kroah-Hartman 2007-11-26 4781 } 52950bfb3bedfc Oleksij Rempel 2023-11-24 4782 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki