CC: [email protected]
BCC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Corentin Labbe <[email protected]>
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
TO: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Corentin Labbe <[email protected]>

Hi Corentin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on broonie-regulator/for-next]
[also build test WARNING on sunxi/sunxi/for-next linus/master v5.18]
[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/intel-lab-lkp/linux/commits/Corentin-Labbe/arm64-add-ethernet-to-orange-pi-3/20220523-133344
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 
for-next
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: s390-randconfig-m031-20220522 
(https://download.01.org/0day-ci/archive/20220523/[email protected]/config)
compiler: s390-linux-gcc (GCC) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/net/mdio/fwnode_mdio.c:134 fwnode_mdiobus_register_phy() error: 
uninitialized symbol 'consumers'.

vim +/consumers +134 drivers/net/mdio/fwnode_mdio.c

bc1bee3b87ee48 Calvin Johnson 2021-06-11   85  
bc1bee3b87ee48 Calvin Johnson 2021-06-11   86  int 
fwnode_mdiobus_register_phy(struct mii_bus *bus,
bc1bee3b87ee48 Calvin Johnson 2021-06-11   87                           struct 
fwnode_handle *child, u32 addr)
bc1bee3b87ee48 Calvin Johnson 2021-06-11   88  {
bc1bee3b87ee48 Calvin Johnson 2021-06-11   89   struct mii_timestamper *mii_ts 
= NULL;
bc1bee3b87ee48 Calvin Johnson 2021-06-11   90   struct phy_device *phy;
bc1bee3b87ee48 Calvin Johnson 2021-06-11   91   bool is_c45 = false;
bc1bee3b87ee48 Calvin Johnson 2021-06-11   92   u32 phy_id;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23   93   int rc, reg_cnt = 0;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23   94   struct regulator_bulk_data 
*consumers;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23   95   struct device_node *nchild = 
NULL;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23   96   u32 reg;
bc1bee3b87ee48 Calvin Johnson 2021-06-11   97  
bc1bee3b87ee48 Calvin Johnson 2021-06-11   98   mii_ts = 
fwnode_find_mii_timestamper(child);
bc1bee3b87ee48 Calvin Johnson 2021-06-11   99   if (IS_ERR(mii_ts))
bc1bee3b87ee48 Calvin Johnson 2021-06-11  100           return PTR_ERR(mii_ts);
bc1bee3b87ee48 Calvin Johnson 2021-06-11  101  
bc1bee3b87ee48 Calvin Johnson 2021-06-11  102   rc = 
fwnode_property_match_string(child, "compatible",
bc1bee3b87ee48 Calvin Johnson 2021-06-11  103                                   
  "ethernet-phy-ieee802.3-c45");
bc1bee3b87ee48 Calvin Johnson 2021-06-11  104   if (rc >= 0)
bc1bee3b87ee48 Calvin Johnson 2021-06-11  105           is_c45 = true;
bc1bee3b87ee48 Calvin Johnson 2021-06-11  106  
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  107   
for_each_child_of_node(bus->dev.of_node, nchild) {
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  108           
of_property_read_u32(nchild, "reg", &reg);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  109           if (reg != addr)
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  110                   continue;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  111           reg_cnt = 
regulator_bulk_get_all(&bus->dev, nchild, &consumers);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  112           if (reg_cnt > 0) {
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  113                   rc = 
regulator_bulk_enable(reg_cnt, consumers);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  114                   if (rc)
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  115                           return 
rc;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  116           }
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  117           if (reg_cnt < 0) {
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  118                   
dev_err(&bus->dev, "Fail to regulator_bulk_get_all err=%d\n", reg_cnt);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  119                   return reg_cnt;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  120           }
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  121   }
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  122  
bc1bee3b87ee48 Calvin Johnson 2021-06-11  123   if (is_c45 || 
fwnode_get_phy_id(child, &phy_id))
bc1bee3b87ee48 Calvin Johnson 2021-06-11  124           phy = 
get_phy_device(bus, addr, is_c45);
bc1bee3b87ee48 Calvin Johnson 2021-06-11  125   else
bc1bee3b87ee48 Calvin Johnson 2021-06-11  126           phy = 
phy_device_create(bus, addr, phy_id, 0, NULL);
bc1bee3b87ee48 Calvin Johnson 2021-06-11  127   if (IS_ERR(phy)) {
bc1bee3b87ee48 Calvin Johnson 2021-06-11  128           
unregister_mii_timestamper(mii_ts);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  129           rc = PTR_ERR(phy);
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  130           goto error;
bc1bee3b87ee48 Calvin Johnson 2021-06-11  131   }
bc1bee3b87ee48 Calvin Johnson 2021-06-11  132  
7ae2ab7d1efe80 Corentin Labbe 2022-05-23  133   phy->regulator_cnt = reg_cnt;
7ae2ab7d1efe80 Corentin Labbe 2022-05-23 @134   phy->consumers = consumers;

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to