lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202307282338.veVKQvK3-lkp@intel.com>
Date: Sat, 29 Jul 2023 00:01:51 +0800
From: kernel test robot <lkp@...el.com>
To: Shenwei Wang <shenwei.wang@....com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Kevin Hilman <khilman@...libre.com>, Vinod Koul <vkoul@...nel.org>,
	Chen-Yu Tsai <wens@...e.org>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Samuel Holland <samuel@...lland.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	netdev@...r.kernel.org, Giuseppe Cavallaro <peppe.cavallaro@...com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	NXP Linux Team <linux-imx@....com>,
	Jerome Brunet <jbrunet@...libre.com>,
	Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
	Bhupesh Sharma <bhupesh.sharma@...aro.org>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
	Simon Horman <simon.horman@...igine.com>,
	Andrew Halaney <ahalaney@...hat.com>,
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
	Shenwei Wang <shenwei.wang@....com>,
	Wong Vee Khee <veekhee@...le.com>
Subject: Re: [PATCH v2 net 1/2] net: stmmac: add new mode parameter for
 fix_mac_speed

Hi Shenwei,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Shenwei-Wang/net-stmmac-add-new-mode-parameter-for-fix_mac_speed/20230727-232922
base:   net/main
patch link:    https://lore.kernel.org/r/20230727152503.2199550-2-shenwei.wang%40nxp.com
patch subject: [PATCH v2 net 1/2] net: stmmac: add new mode parameter for fix_mac_speed
config: x86_64-randconfig-x004-20230728 (https://download.01.org/0day-ci/archive/20230728/202307282338.veVKQvK3-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230728/202307282338.veVKQvK3-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307282338.veVKQvK3-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:359:22: error: incompatible function pointer types assigning to 'void (*)(void *, uint, uint)' (aka 'void (*)(void *, unsigned int, unsigned int)') from 'void (void *, unsigned int)' [-Wincompatible-function-pointer-types]
           data->fix_mac_speed = tegra_eqos_fix_speed;
                               ^ ~~~~~~~~~~~~~~~~~~~~
   1 error generated.
--
>> drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c:108:28: error: incompatible function pointer types assigning to 'void (*)(void *, uint, uint)' (aka 'void (*)(void *, unsigned int, unsigned int)') from 'void (*const)(void *, unsigned int)' [-Wincompatible-function-pointer-types]
                           plat_dat->fix_mac_speed = dwmac->data->fix_mac_speed;
                                                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +359 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c

e6ea2d16fc615e Thierry Reding 2017-03-10  267  
a884915f4cef94 Jisheng Zhang  2020-11-09  268  static int tegra_eqos_probe(struct platform_device *pdev,
e6ea2d16fc615e Thierry Reding 2017-03-10  269  			    struct plat_stmmacenet_data *data,
e6ea2d16fc615e Thierry Reding 2017-03-10  270  			    struct stmmac_resources *res)
e6ea2d16fc615e Thierry Reding 2017-03-10  271  {
1d4605e0aff9ff Ajay Gupta     2019-12-15  272  	struct device *dev = &pdev->dev;
e6ea2d16fc615e Thierry Reding 2017-03-10  273  	struct tegra_eqos *eqos;
e6ea2d16fc615e Thierry Reding 2017-03-10  274  	int err;
e6ea2d16fc615e Thierry Reding 2017-03-10  275  
e6ea2d16fc615e Thierry Reding 2017-03-10  276  	eqos = devm_kzalloc(&pdev->dev, sizeof(*eqos), GFP_KERNEL);
a884915f4cef94 Jisheng Zhang  2020-11-09  277  	if (!eqos)
a884915f4cef94 Jisheng Zhang  2020-11-09  278  		return -ENOMEM;
e6ea2d16fc615e Thierry Reding 2017-03-10  279  
e6ea2d16fc615e Thierry Reding 2017-03-10  280  	eqos->dev = &pdev->dev;
e6ea2d16fc615e Thierry Reding 2017-03-10  281  	eqos->regs = res->addr;
e6ea2d16fc615e Thierry Reding 2017-03-10  282  
1d4605e0aff9ff Ajay Gupta     2019-12-15  283  	if (!is_of_node(dev->fwnode))
1d4605e0aff9ff Ajay Gupta     2019-12-15  284  		goto bypass_clk_reset_gpio;
1d4605e0aff9ff Ajay Gupta     2019-12-15  285  
e6ea2d16fc615e Thierry Reding 2017-03-10  286  	eqos->clk_master = devm_clk_get(&pdev->dev, "master_bus");
e6ea2d16fc615e Thierry Reding 2017-03-10  287  	if (IS_ERR(eqos->clk_master)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  288  		err = PTR_ERR(eqos->clk_master);
e6ea2d16fc615e Thierry Reding 2017-03-10  289  		goto error;
e6ea2d16fc615e Thierry Reding 2017-03-10  290  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  291  
e6ea2d16fc615e Thierry Reding 2017-03-10  292  	err = clk_prepare_enable(eqos->clk_master);
e6ea2d16fc615e Thierry Reding 2017-03-10  293  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  294  		goto error;
e6ea2d16fc615e Thierry Reding 2017-03-10  295  
e6ea2d16fc615e Thierry Reding 2017-03-10  296  	eqos->clk_slave = devm_clk_get(&pdev->dev, "slave_bus");
e6ea2d16fc615e Thierry Reding 2017-03-10  297  	if (IS_ERR(eqos->clk_slave)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  298  		err = PTR_ERR(eqos->clk_slave);
e6ea2d16fc615e Thierry Reding 2017-03-10  299  		goto disable_master;
e6ea2d16fc615e Thierry Reding 2017-03-10  300  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  301  
e6ea2d16fc615e Thierry Reding 2017-03-10  302  	data->stmmac_clk = eqos->clk_slave;
e6ea2d16fc615e Thierry Reding 2017-03-10  303  
e6ea2d16fc615e Thierry Reding 2017-03-10  304  	err = clk_prepare_enable(eqos->clk_slave);
e6ea2d16fc615e Thierry Reding 2017-03-10  305  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  306  		goto disable_master;
e6ea2d16fc615e Thierry Reding 2017-03-10  307  
e6ea2d16fc615e Thierry Reding 2017-03-10  308  	eqos->clk_rx = devm_clk_get(&pdev->dev, "rx");
e6ea2d16fc615e Thierry Reding 2017-03-10  309  	if (IS_ERR(eqos->clk_rx)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  310  		err = PTR_ERR(eqos->clk_rx);
e6ea2d16fc615e Thierry Reding 2017-03-10  311  		goto disable_slave;
e6ea2d16fc615e Thierry Reding 2017-03-10  312  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  313  
e6ea2d16fc615e Thierry Reding 2017-03-10  314  	err = clk_prepare_enable(eqos->clk_rx);
e6ea2d16fc615e Thierry Reding 2017-03-10  315  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  316  		goto disable_slave;
e6ea2d16fc615e Thierry Reding 2017-03-10  317  
e6ea2d16fc615e Thierry Reding 2017-03-10  318  	eqos->clk_tx = devm_clk_get(&pdev->dev, "tx");
e6ea2d16fc615e Thierry Reding 2017-03-10  319  	if (IS_ERR(eqos->clk_tx)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  320  		err = PTR_ERR(eqos->clk_tx);
e6ea2d16fc615e Thierry Reding 2017-03-10  321  		goto disable_rx;
e6ea2d16fc615e Thierry Reding 2017-03-10  322  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  323  
e6ea2d16fc615e Thierry Reding 2017-03-10  324  	err = clk_prepare_enable(eqos->clk_tx);
e6ea2d16fc615e Thierry Reding 2017-03-10  325  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  326  		goto disable_rx;
e6ea2d16fc615e Thierry Reding 2017-03-10  327  
e6ea2d16fc615e Thierry Reding 2017-03-10  328  	eqos->reset = devm_gpiod_get(&pdev->dev, "phy-reset", GPIOD_OUT_HIGH);
e6ea2d16fc615e Thierry Reding 2017-03-10  329  	if (IS_ERR(eqos->reset)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  330  		err = PTR_ERR(eqos->reset);
e6ea2d16fc615e Thierry Reding 2017-03-10  331  		goto disable_tx;
e6ea2d16fc615e Thierry Reding 2017-03-10  332  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  333  
e6ea2d16fc615e Thierry Reding 2017-03-10  334  	usleep_range(2000, 4000);
e6ea2d16fc615e Thierry Reding 2017-03-10  335  	gpiod_set_value(eqos->reset, 0);
e6ea2d16fc615e Thierry Reding 2017-03-10  336  
1a981c0586c038 Thierry Reding 2019-07-26  337  	/* MDIO bus was already reset just above */
1a981c0586c038 Thierry Reding 2019-07-26  338  	data->mdio_bus_data->needs_reset = false;
1a981c0586c038 Thierry Reding 2019-07-26  339  
e6ea2d16fc615e Thierry Reding 2017-03-10  340  	eqos->rst = devm_reset_control_get(&pdev->dev, "eqos");
e6ea2d16fc615e Thierry Reding 2017-03-10  341  	if (IS_ERR(eqos->rst)) {
e6ea2d16fc615e Thierry Reding 2017-03-10  342  		err = PTR_ERR(eqos->rst);
e6ea2d16fc615e Thierry Reding 2017-03-10  343  		goto reset_phy;
e6ea2d16fc615e Thierry Reding 2017-03-10  344  	}
e6ea2d16fc615e Thierry Reding 2017-03-10  345  
e6ea2d16fc615e Thierry Reding 2017-03-10  346  	err = reset_control_assert(eqos->rst);
e6ea2d16fc615e Thierry Reding 2017-03-10  347  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  348  		goto reset_phy;
e6ea2d16fc615e Thierry Reding 2017-03-10  349  
e6ea2d16fc615e Thierry Reding 2017-03-10  350  	usleep_range(2000, 4000);
e6ea2d16fc615e Thierry Reding 2017-03-10  351  
e6ea2d16fc615e Thierry Reding 2017-03-10  352  	err = reset_control_deassert(eqos->rst);
e6ea2d16fc615e Thierry Reding 2017-03-10  353  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  354  		goto reset_phy;
e6ea2d16fc615e Thierry Reding 2017-03-10  355  
e6ea2d16fc615e Thierry Reding 2017-03-10  356  	usleep_range(2000, 4000);
e6ea2d16fc615e Thierry Reding 2017-03-10  357  
1d4605e0aff9ff Ajay Gupta     2019-12-15  358  bypass_clk_reset_gpio:
e6ea2d16fc615e Thierry Reding 2017-03-10 @359  	data->fix_mac_speed = tegra_eqos_fix_speed;
e6ea2d16fc615e Thierry Reding 2017-03-10  360  	data->init = tegra_eqos_init;
e6ea2d16fc615e Thierry Reding 2017-03-10  361  	data->bsp_priv = eqos;
029c1c2059e9c4 Jon Hunter     2022-07-06  362  	data->sph_disable = 1;
e6ea2d16fc615e Thierry Reding 2017-03-10  363  
e6ea2d16fc615e Thierry Reding 2017-03-10  364  	err = tegra_eqos_init(pdev, eqos);
e6ea2d16fc615e Thierry Reding 2017-03-10  365  	if (err < 0)
e6ea2d16fc615e Thierry Reding 2017-03-10  366  		goto reset;
e6ea2d16fc615e Thierry Reding 2017-03-10  367  
a884915f4cef94 Jisheng Zhang  2020-11-09  368  	return 0;
e6ea2d16fc615e Thierry Reding 2017-03-10  369  reset:
e6ea2d16fc615e Thierry Reding 2017-03-10  370  	reset_control_assert(eqos->rst);
e6ea2d16fc615e Thierry Reding 2017-03-10  371  reset_phy:
e6ea2d16fc615e Thierry Reding 2017-03-10  372  	gpiod_set_value(eqos->reset, 1);
e6ea2d16fc615e Thierry Reding 2017-03-10  373  disable_tx:
e6ea2d16fc615e Thierry Reding 2017-03-10  374  	clk_disable_unprepare(eqos->clk_tx);
e6ea2d16fc615e Thierry Reding 2017-03-10  375  disable_rx:
e6ea2d16fc615e Thierry Reding 2017-03-10  376  	clk_disable_unprepare(eqos->clk_rx);
e6ea2d16fc615e Thierry Reding 2017-03-10  377  disable_slave:
e6ea2d16fc615e Thierry Reding 2017-03-10  378  	clk_disable_unprepare(eqos->clk_slave);
e6ea2d16fc615e Thierry Reding 2017-03-10  379  disable_master:
e6ea2d16fc615e Thierry Reding 2017-03-10  380  	clk_disable_unprepare(eqos->clk_master);
e6ea2d16fc615e Thierry Reding 2017-03-10  381  error:
a884915f4cef94 Jisheng Zhang  2020-11-09  382  	return err;
e6ea2d16fc615e Thierry Reding 2017-03-10  383  }
e6ea2d16fc615e Thierry Reding 2017-03-10  384  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ