Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6647436rdb; Fri, 15 Dec 2023 04:52:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaCIJB46Da9KXJbqt9S2UJKQg4eXkHN7CdxpVcKp2zhwYdw/3ye2GaWZ0fNXnsnU6RdfHK X-Received: by 2002:a05:6870:45a8:b0:203:70c9:aa81 with SMTP id y40-20020a05687045a800b0020370c9aa81mr782251oao.16.1702644726549; Fri, 15 Dec 2023 04:52:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702644726; cv=none; d=google.com; s=arc-20160816; b=hy2DC8bibOBipvWfW/LGle5Unwe8bKRCcp029gSKNb723k+kLZiIlazSWX+bG+s03h 7DpX4siKkAhSgA3Jc7i8s2L5f2VErUxqv4v/3NAOFNNqHlByKntDPwATkNWUSOhTpqFm KPxnnmxvZmq85HTUiFdo3A0IxGeKEfjDUbooBrJ0pBTCy6k0HKxUW4qz0LS+iksmQoai vjirWHqv9UDN724OFqDz2shN7RH8otg5mbIhLGGraFpiDd7N0rkb+aTviibLDFrAMoNQ 2+kftobtyYqKKyzH40YGmnO8u0RcKKdsLMbn88mdy22xz0NcfF8wFxlAKw5dioG1GCPy UpXg== 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=ZyUQpUcVkpB1osThTCs2nohFJTe0qxCvUtzEQHXJNSw=; fh=YGfzz34etHUHuf6ZwWi5IK6a3w/m7gWYhZFNpLp+abc=; b=sWoAQqB/BWcz3xMDAMxQpnBuwzZKFR51ooAPm+yV4/BjU33McYYmo+HEP6QJuFBdHM y8wMx2YAx+DRqguOtpRiGLttvPIo9Ep3yWXmNtHzorAQmLee/YG+GIZRynUYoO5sYVFD FBRSPaPH2ZRVuHAbuYXfoFg4/qnDKgS0VKRXo2YY+Wq7sOYRnG8h9TGc8GQ0GQ/CNRb+ vPwaWMbVyK2XHoCA+8t/OWkWrRcYhEEdneEvkERiHovVs8G4b2dvwhj4I9Evc1Kq428s lAbx+lJZsBbPagsgLAZuBiFqp+yOWwqXubakqI6nt8+s/IggZa2asujtwDbFrTv4OJIt gFOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KaN8Ko8S; spf=pass (google.com: domain of linux-kernel+bounces-953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-953-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a11-20020a634d0b000000b005c66d14abd5si12917324pgb.521.2023.12.15.04.52.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 04:52:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KaN8Ko8S; spf=pass (google.com: domain of linux-kernel+bounces-953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-953-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2733A285E82 for ; Fri, 15 Dec 2023 12:52:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 938622DB84; Fri, 15 Dec 2023 12:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KaN8Ko8S" 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 300BC2C6AB; Fri, 15 Dec 2023 12:51:26 +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=IXxi6ICpVIOD8cotQkNPnEsduzVGrflHgp1nX0wIlyY=; b=KaN8Ko8SWvg9Rve1AZ6bipcZ/c3imoV3SO6nJ1UV//Qjd/bn1irm1S9K /M9O+m0ybA4RWurkwHgKv0ht/4/3YMTohZUMbDAwbhsrzo66gteoNEOD2 QOB28H+dDT3wlYdxeeGjyeL99skmf9LIQiTIfmpM+Q/0uLWP2RCzeTpL3 ji0g02oRudgcgoBlZbG3rOAbt+ryXDniqUCEaYzATi4Qs7qfAM68cDGu+ rmmpCFskDkwXeODklIBSO6RqIb21OoHxR0uFyZj3a85bXBlmdHMwB6gg6 +hGbefIJ7dMMtGt3nW8jjAeCmLRFbzWPSDsgi65CJLXfiVFXp4XzybRU3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="380266706" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="380266706" 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="898128674" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="898128674" 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-0000DS-2w; Fri, 15 Dec 2023 12:51:20 +0000 Date: Fri, 15 Dec 2023 20:50:30 +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: <202312152044.iRWfyQXJ-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-003-20231215 (https://download.01.org/0day-ci/archive/20231215/202312152044.iRWfyQXJ-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312152044.iRWfyQXJ-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/202312152044.iRWfyQXJ-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/phy/phy_led_triggers.c:89:30: error: implicit declaration of function 'phy_supported_speeds_num' is invalid in C99 [-Werror,-Wimplicit-function-declaration] 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 unsigned int phy_supported_speeds(struct phy_device *phy, ^ >> drivers/net/phy/phy_led_triggers.c:133:2: error: implicitly declaring library function 'free' with type 'void (void *)' [-Werror,-Wimplicit-function-declaration] 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