Hi Guru,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pwm/for-next]
[also build test ERROR on hwmon/hwmon-next linuxtv-media/master shawnguo/for-next
stm32/stm32-next sunxi/sunxi/for-next v5.6-rc6]
[cannot apply to drm-intel/for-linux-next next-20200317]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Guru-Das-Srinagesh/Convert-PWM-p...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git
for-next
config: microblaze-randconfig-a001-20200318 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
microblaze-linux-ld: drivers/clk/clk-pwm.o: in function `clk_pwm_probe':
> drivers/clk/clk-pwm.c:92: undefined reference to `__udivdi3'
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o:
defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o:
defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
vim +92 drivers/clk/clk-pwm.c
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 66
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 67 static int clk_pwm_probe(struct
platform_device *pdev)
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 68 {
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 69 struct device_node *node =
pdev->dev.of_node;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 70 struct clk_init_data init;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 71 struct clk_pwm *clk_pwm;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 72 struct pwm_device *pwm;
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 73 struct pwm_args pargs;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 74 const char *clk_name;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 75 int ret;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 76
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 77 clk_pwm = devm_kzalloc(&pdev->dev,
sizeof(*clk_pwm), GFP_KERNEL);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 78 if (!clk_pwm)
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 79 return -ENOMEM;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 80
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 81 pwm = devm_pwm_get(&pdev->dev,
NULL);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 82 if (IS_ERR(pwm))
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 83 return PTR_ERR(pwm);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 84
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 85 pwm_get_args(pwm, &pargs);
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 86 if (!pargs.period) {
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 87 dev_err(&pdev->dev, "invalid
PWM period\n");
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 88 return -EINVAL;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 89 }
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 90
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 91 if (of_property_read_u32(node,
"clock-frequency", &clk_pwm->fixed_rate))
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 @92 clk_pwm->fixed_rate = NSEC_PER_SEC /
pargs.period;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 93
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 94 if (pargs.period != NSEC_PER_SEC /
clk_pwm->fixed_rate &&
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 95 pargs.period !=
DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) {
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 96 dev_err(&pdev->dev,
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 97 "clock-frequency does not match
PWM period\n");
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 98 return -EINVAL;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 99 }
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 100
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 101 /*
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 102 * FIXME: pwm_apply_args() should be
removed when switching to the
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 103 * atomic PWM API.
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 104 */
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 105 pwm_apply_args(pwm);
dd0b38b7ca0d8c Boris Brezillon 2016-04-14 106 ret = pwm_config(pwm, (pargs.period + 1)
>> 1, pargs.period);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 107 if (ret < 0)
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 108 return ret;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 109
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 110 clk_name = node->name;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 111 of_property_read_string(node,
"clock-output-names", &clk_name);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 112
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 113 init.name = clk_name;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 114 init.ops = &clk_pwm_ops;
90b6c5c73c6904 Stephen Boyd 2019-04-25 115 init.flags = 0;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 116 init.num_parents = 0;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 117
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 118 clk_pwm->pwm = pwm;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 119 clk_pwm->hw.init = &init;
4cf915dfb8ede6 Stephen Boyd 2016-06-01 120 ret =
devm_clk_hw_register(&pdev->dev, &clk_pwm->hw);
4cf915dfb8ede6 Stephen Boyd 2016-06-01 121 if (ret)
4cf915dfb8ede6 Stephen Boyd 2016-06-01 122 return ret;
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 123
4cf915dfb8ede6 Stephen Boyd 2016-06-01 124 return of_clk_add_hw_provider(node,
of_clk_hw_simple_get, &clk_pwm->hw);
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 125 }
9a74ccdbbb8fa6 Philipp Zabel 2015-02-13 126
:::::: The code at line 92 was first introduced by commit
:::::: dd0b38b7ca0d8c8aadcf8a17d7c90d36ab8ab6e4 clk: pwm: Use pwm_get_args() where
appropriate
:::::: TO: Boris Brezillon <boris.brezillon(a)free-electrons.com>
:::::: CC: Thierry Reding <thierry.reding(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org