[linux-next:master 2649/3348] drivers/net/pse-pd/tps23881.c:755:6: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   1e391b34f6aa043c7afa40a2103163a0ef06d179
commit: c4b28e5699d2a789fc9464e7ce89f2a1e9d5085d [2649/3348] net: pse-pd: tps23881: Fix the device ID check
config: powerpc64-randconfig-001-20240807 (https://download.01.org/0day-ci/archive/20240807/202408070727.jLebkEWg-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240807/202408070727.jLebkEWg-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408070727.jLebkEWg-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/net/pse-pd/tps23881.c:755:6: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) != TPS23881_DEVICE_ID) {
               ^
   1 error generated.


vim +/FIELD_GET +755 drivers/net/pse-pd/tps23881.c

   734	
   735	static int tps23881_i2c_probe(struct i2c_client *client)
   736	{
   737		struct device *dev = &client->dev;
   738		struct tps23881_priv *priv;
   739		int ret;
   740		u8 val;
   741	
   742		if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
   743			dev_err(dev, "i2c check functionality failed\n");
   744			return -ENXIO;
   745		}
   746	
   747		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   748		if (!priv)
   749			return -ENOMEM;
   750	
   751		ret = i2c_smbus_read_byte_data(client, TPS23881_REG_DEVID);
   752		if (ret < 0)
   753			return ret;
   754	
 > 755		if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) != TPS23881_DEVICE_ID) {
   756			dev_err(dev, "Wrong device ID\n");
   757			return -ENXIO;
   758		}
   759	
   760		ret = tps23881_flash_sram_fw(client);
   761		if (ret < 0)
   762			return ret;
   763	
   764		ret = i2c_smbus_read_byte_data(client, TPS23881_REG_FWREV);
   765		if (ret < 0)
   766			return ret;
   767	
   768		dev_info(&client->dev, "Firmware revision 0x%x\n", ret);
   769	
   770		/* Set configuration B, 16 bit access on a single device address */
   771		ret = i2c_smbus_read_byte_data(client, TPS23881_REG_GEN_MASK);
   772		if (ret < 0)
   773			return ret;
   774	
   775		val = ret | TPS23881_REG_NBITACC;
   776		ret = i2c_smbus_write_byte_data(client, TPS23881_REG_GEN_MASK, val);
   777		if (ret)
   778			return ret;
   779	
   780		priv->client = client;
   781		i2c_set_clientdata(client, priv);
   782		priv->np = dev->of_node;
   783	
   784		priv->pcdev.owner = THIS_MODULE;
   785		priv->pcdev.ops = &tps23881_ops;
   786		priv->pcdev.dev = dev;
   787		priv->pcdev.types = ETHTOOL_PSE_C33;
   788		priv->pcdev.nr_lines = TPS23881_MAX_CHANS;
   789		ret = devm_pse_controller_register(dev, &priv->pcdev);
   790		if (ret) {
   791			return dev_err_probe(dev, ret,
   792					     "failed to register PSE controller\n");
   793		}
   794	
   795		return ret;
   796	}
   797	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux