Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6647278rdb; Fri, 15 Dec 2023 04:51:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUff/vlNb17jV2OMETtL3WYJTjETx+MemhDz7dj6aolcD+u7tAycFKTZWsGR+NJFSi02+C X-Received: by 2002:ae9:f818:0:b0:77f:91b8:c544 with SMTP id x24-20020ae9f818000000b0077f91b8c544mr5058629qkh.110.1702644708833; Fri, 15 Dec 2023 04:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702644708; cv=none; d=google.com; s=arc-20160816; b=YarN/r/pKp9uobBOdolB8ldl5yI6tUUB5IvnIcxL2ksQqbaK21z17Nbn9sTOuF51US VPHvctgBApNnPsyL/0oiJZjdRlecUOTT957nCmLjT9ydt0UH5H0bF2t0/XqW1ra4+DdN H85U+mYUFEupMocDKNCLe35AwOle56zR+76CydO5eQ9aLsHOYQJAsAc5429k7flExTAC vJk7RslbbIRA5nsYES2o3c6yW++plPC2BiMjsZrOenVPjI9iLO6FVoKwFZl2lzuultN7 pTCBFfeeU2RFmUvVg86WkIO1gI9zRWqkS6a09RydTDFwpFy9zcX0GTMmrlLeYWYxTySf PYjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6qAwT457fB/ua2feeSvSpugfGcJYC1gLx98B5oawFaE=; fh=YGfzz34etHUHuf6ZwWi5IK6a3w/m7gWYhZFNpLp+abc=; b=nTAAxduY646HgwM+OaQY/xdXm4OKzpIOOQguOx+O8u+dee9pazL/RmQF/SSMMhy0Vy ktsQDeEKTJ/OvJMi5LYF0H9F6CL6SE+Vui811EXVzDu96oxwtDZJN5SN3w5CSt21mZNM S9V7x0RtQIpEPaQJkCpEL8T4HW1NEzBCcI+3sWary7mfP7VP3y2AN9HdQsncILI4nFMp e/LyqyqkY0JoJxCWb1KNi1WhJ8DaMyVGGIcnJIKF7UWnbkmjYcsqHLFc8XoPbkLfPClf a2D5TZL+ro57B8dysB6jK+uF1KGrJTly/RU3u6SNAvJbaaSUqC9VwAXtkJhfYcEWTQ8U 2WoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O7MWuzwW; spf=pass (google.com: domain of linux-kernel+bounces-952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o22-20020a05620a22d600b0077f09a8133asi15950306qki.715.2023.12.15.04.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 04:51:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O7MWuzwW; spf=pass (google.com: domain of linux-kernel+bounces-952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 896831C23076 for ; Fri, 15 Dec 2023 12:51:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 822792D78C; Fri, 15 Dec 2023 12:51:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O7MWuzwW" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 642412C6B1; Fri, 15 Dec 2023 12:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702644687; x=1734180687; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fzPxfKu5qBe6tZ/jrEy3J9qTN7QyGjhXfJqX+tBLEc8=; b=O7MWuzwW8RkyZ7JuPJVlJgfOYDkTuHaEI+IkmzNP/yP/TTu6CXR9G2fd +9JXDpOEUQrlbYhEKSjrV/i/zJaY2xa9P3josBR4ibYi62n4RyiVtXi10 KboDbKrl51c/YwS6AcjZaFVtsz8zxuqrzclUFBZT1vKHjtGFpnlZXUnPa P8Lpf8KScSr5UdkVzrfcups9S8hW1O5ohJ8puV7BKfcD7VI9e5guiqGBg e9orlYpul3dpPVNdyXh7V4vTwCbSiPSDSpApuq1FU0li5t0KLu/odvPci uD/wuL6FHQSd0rdV0wx67wq6UCirZNnhXTMuksZ611mJ3KfO8vORhfjJ7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="380266716" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="380266716" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 04:51:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="898128673" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="898128673" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orsmga004.jf.intel.com with ESMTP; 15 Dec 2023 04:51:23 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rE7ey-0000DW-37; Fri, 15 Dec 2023 12:51:20 +0000 Date: Fri, 15 Dec 2023 20:50:28 +0800 From: kernel test robot To: Christian Marangi , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org, Christian Marangi Subject: Re: [net-next PATCH v2 3/3] net: phy: led: dynamically allocate speed modes array Message-ID: <202312152038.v9NZyBxd-lkp@intel.com> References: <20231214154906.29436-4-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231214154906.29436-4-ansuelsmth@gmail.com> Hi Christian, kernel test robot noticed the following build errors: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/net-phy-refactor-and-better-document-phy_speeds-function/20231215-064112 base: net-next/main patch link: https://lore.kernel.org/r/20231214154906.29436-4-ansuelsmth%40gmail.com patch subject: [net-next PATCH v2 3/3] net: phy: led: dynamically allocate speed modes array config: arm-randconfig-002-20231215 (https://download.01.org/0day-ci/archive/20231215/202312152038.v9NZyBxd-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312152038.v9NZyBxd-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/202312152038.v9NZyBxd-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/phy/phy_led_triggers.c:89:30: error: call to undeclared function 'phy_supported_speeds_num'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 89 | phy->phy_num_led_triggers = phy_supported_speeds_num(phy); | ^ drivers/net/phy/phy_led_triggers.c:89:30: note: did you mean 'phy_supported_speeds'? include/linux/phy.h:208:14: note: 'phy_supported_speeds' declared here 208 | unsigned int phy_supported_speeds(struct phy_device *phy, | ^ >> drivers/net/phy/phy_led_triggers.c:133:2: error: call to undeclared library function 'free' with type 'void (void *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 133 | free(speeds); | ^ drivers/net/phy/phy_led_triggers.c:133:2: note: include the header or explicitly provide a declaration for 'free' 2 errors generated. vim +/phy_supported_speeds_num +89 drivers/net/phy/phy_led_triggers.c 83 84 int phy_led_triggers_register(struct phy_device *phy) 85 { 86 unsigned int *speeds; 87 int i, err; 88 > 89 phy->phy_num_led_triggers = phy_supported_speeds_num(phy); 90 if (!phy->phy_num_led_triggers) 91 return 0; 92 93 speeds = kmalloc_array(phy->phy_num_led_triggers, sizeof(*speeds), 94 GFP_KERNEL); 95 if (!speeds) 96 return -ENOMEM; 97 98 /* Presence of speed modes already checked up */ 99 phy_supported_speeds(phy, speeds, phy->phy_num_led_triggers); 100 101 phy->led_link_trigger = devm_kzalloc(&phy->mdio.dev, 102 sizeof(*phy->led_link_trigger), 103 GFP_KERNEL); 104 if (!phy->led_link_trigger) { 105 err = -ENOMEM; 106 goto out_clear; 107 } 108 109 err = phy_led_trigger_register(phy, phy->led_link_trigger, 0, "link"); 110 if (err) 111 goto out_free_link; 112 113 phy->phy_led_triggers = devm_kcalloc(&phy->mdio.dev, 114 phy->phy_num_led_triggers, 115 sizeof(struct phy_led_trigger), 116 GFP_KERNEL); 117 if (!phy->phy_led_triggers) { 118 err = -ENOMEM; 119 goto out_unreg_link; 120 } 121 122 for (i = 0; i < phy->phy_num_led_triggers; i++) { 123 err = phy_led_trigger_register(phy, &phy->phy_led_triggers[i], 124 speeds[i], 125 phy_speed_to_str(speeds[i])); 126 if (err) 127 goto out_unreg; 128 } 129 130 phy->last_triggered = NULL; 131 phy_led_trigger_change_speed(phy); 132 > 133 free(speeds); 134 135 return 0; 136 out_unreg: 137 while (i--) 138 phy_led_trigger_unregister(&phy->phy_led_triggers[i]); 139 devm_kfree(&phy->mdio.dev, phy->phy_led_triggers); 140 out_unreg_link: 141 phy_led_trigger_unregister(phy->led_link_trigger); 142 out_free_link: 143 devm_kfree(&phy->mdio.dev, phy->led_link_trigger); 144 phy->led_link_trigger = NULL; 145 out_clear: 146 free(speeds); 147 phy->phy_num_led_triggers = 0; 148 return err; 149 } 150 EXPORT_SYMBOL_GPL(phy_led_triggers_register); 151 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki