* [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()
@ 2020-05-25 3:31 Tiezhu Yang
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
2020-05-26 23:02 ` [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Stephen Boyd
0 siblings, 2 replies; 8+ messages in thread
From: Tiezhu Yang @ 2020-05-25 3:31 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
The return value about hisi_reset_init() is not correct, fix it.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/clk/hisilicon/clk-hi3519.c | 4 ++--
drivers/clk/hisilicon/crg-hi3516cv300.c | 4 ++--
drivers/clk/hisilicon/crg-hi3798cv200.c | 4 ++--
drivers/clk/hisilicon/reset.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c
index ad0c7f3..803fa66 100644
--- a/drivers/clk/hisilicon/clk-hi3519.c
+++ b/drivers/clk/hisilicon/clk-hi3519.c
@@ -149,8 +149,8 @@ static int hi3519_clk_probe(struct platform_device *pdev)
return -ENOMEM;
crg->rstc = hisi_reset_init(pdev);
- if (!crg->rstc)
- return -ENOMEM;
+ if (IS_ERR(crg->rstc))
+ return PTR_ERR(crg->rstc);
crg->clk_data = hi3519_clk_register(pdev);
if (IS_ERR(crg->clk_data)) {
diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c
index 5d4e61c..c2af03d 100644
--- a/drivers/clk/hisilicon/crg-hi3516cv300.c
+++ b/drivers/clk/hisilicon/crg-hi3516cv300.c
@@ -271,8 +271,8 @@ static int hi3516cv300_crg_probe(struct platform_device *pdev)
return -ENOENT;
crg->rstc = hisi_reset_init(pdev);
- if (!crg->rstc)
- return -ENOMEM;
+ if (IS_ERR(crg->rstc))
+ return PTR_ERR(crg->rstc);
crg->clk_data = crg->funcs->register_clks(pdev);
if (IS_ERR(crg->clk_data)) {
diff --git a/drivers/clk/hisilicon/crg-hi3798cv200.c b/drivers/clk/hisilicon/crg-hi3798cv200.c
index 08a19ba..66fd6a9 100644
--- a/drivers/clk/hisilicon/crg-hi3798cv200.c
+++ b/drivers/clk/hisilicon/crg-hi3798cv200.c
@@ -354,8 +354,8 @@ static int hi3798cv200_crg_probe(struct platform_device *pdev)
return -ENOENT;
crg->rstc = hisi_reset_init(pdev);
- if (!crg->rstc)
- return -ENOMEM;
+ if (IS_ERR(crg->rstc))
+ return PTR_ERR(crg->rstc);
crg->clk_data = crg->funcs->register_clks(pdev);
if (IS_ERR(crg->clk_data)) {
diff --git a/drivers/clk/hisilicon/reset.c b/drivers/clk/hisilicon/reset.c
index 93cee17..f17d15f 100644
--- a/drivers/clk/hisilicon/reset.c
+++ b/drivers/clk/hisilicon/reset.c
@@ -93,11 +93,11 @@ struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
if (!rstc)
- return NULL;
+ return ERR_PTR(-ENOMEM);
rstc->membase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rstc->membase))
- return NULL;
+ return rstc->membase;
spin_lock_init(&rstc->lock);
rstc->rcdev.owner = THIS_MODULE;
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon
2020-05-25 3:31 [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Tiezhu Yang
@ 2020-05-25 3:31 ` Tiezhu Yang
2020-05-26 18:55 ` kbuild test robot
` (2 more replies)
2020-05-26 23:02 ` [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Stephen Boyd
1 sibling, 3 replies; 8+ messages in thread
From: Tiezhu Yang @ 2020-05-25 3:31 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
If CONFIG_ARCH_HISI is not set but COMPILE_TEST is set, the file
in the subdir hisilicon can not be built due to CONFIG_ARCH_HISI
check in drivers/clk/Makefile.
Since the related configs in drivers/clk/hisilicon/Kconfig depend
on ARCH_HISI, so remove CONFIG_ARCH_HISI check for subdir hisilicon
in drivers/clk/Makefile.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/clk/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index f4169cc..81045ec 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -79,7 +79,7 @@ obj-y += bcm/
obj-$(CONFIG_ARCH_BERLIN) += berlin/
obj-$(CONFIG_ARCH_DAVINCI) += davinci/
obj-$(CONFIG_H8300) += h8300/
-obj-$(CONFIG_ARCH_HISI) += hisilicon/
+obj-y += hisilicon/
obj-y += imgtec/
obj-y += imx/
obj-y += ingenic/
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
@ 2020-05-26 18:55 ` kbuild test robot
2020-05-27 4:16 ` Tiezhu Yang
2020-05-27 4:13 ` kbuild test robot
2020-05-27 7:56 ` kbuild test robot
2 siblings, 1 reply; 8+ messages in thread
From: kbuild test robot @ 2020-05-26 18:55 UTC (permalink / raw)
To: Tiezhu Yang, Michael Turquette, Stephen Boyd
Cc: kbuild-all, linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
[-- Attachment #1: Type: text/plain, Size: 3804 bytes --]
Hi Tiezhu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on v5.7-rc7 next-20200526]
[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/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200525-113342
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_rate':
>> clk.c:(.text+0x9e): undefined reference to `clk_register_fixed_rate'
>> ld: clk.c:(.text+0xdf): undefined reference to `clk_unregister_fixed_rate'
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_factor':
>> clk.c:(.text+0x117): undefined reference to `clk_register_fixed_factor'
>> ld: clk.c:(.text+0x158): undefined reference to `clk_unregister_fixed_factor'
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_mux':
>> clk.c:(.text+0x1cb): undefined reference to `clk_register_mux_table'
>> ld: clk.c:(.text+0x1f2): undefined reference to `clk_register_clkdev'
>> ld: clk.c:(.text+0x21a): undefined reference to `clk_unregister_mux'
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_divider':
>> clk.c:(.text+0x2c9): undefined reference to `clk_register_divider_table'
ld: clk.c:(.text+0x2e3): undefined reference to `clk_register_clkdev'
>> ld: clk.c:(.text+0x311): undefined reference to `clk_unregister_divider'
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate':
>> clk.c:(.text+0x36c): undefined reference to `clk_register_gate'
ld: clk.c:(.text+0x393): undefined reference to `clk_register_clkdev'
>> ld: clk.c:(.text+0x3bb): undefined reference to `clk_unregister_gate'
ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate_sep':
>> clk.c:(.text+0x425): undefined reference to `clk_register_clkdev'
ld: drivers/clk/hisilicon/clk.o: in function `hi6220_clk_register_divider':
>> clk.c:(.init.text+0x5d): undefined reference to `clk_register_clkdev'
ld: drivers/clk/hisilicon/clkgate-separated.o: in function `hisi_register_clkgate_sep':
>> clkgate-separated.c:(.text+0xf0): undefined reference to `clk_register'
ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_set_rate':
>> clkdivider-hi6220.c:(.text+0x16): undefined reference to `divider_get_val'
ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_recalc_rate':
>> clkdivider-hi6220.c:(.text+0x8a): undefined reference to `divider_recalc_rate'
ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_round_rate':
>> clkdivider-hi6220.c:(.text+0xa9): undefined reference to `clk_hw_get_parent'
>> ld: clkdivider-hi6220.c:(.text+0xbd): undefined reference to `divider_round_rate_parent'
ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_register_clkdiv':
>> clkdivider-hi6220.c:(.text+0x1c5): undefined reference to `clk_register'
ld: drivers/clk/hisilicon/clk-hisi-phase.o: in function `clk_register_hisi_phase':
>> clk-hisi-phase.c:(.text+0x121): undefined reference to `devm_clk_register'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 7254 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()
2020-05-25 3:31 [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Tiezhu Yang
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
@ 2020-05-26 23:02 ` Stephen Boyd
2020-05-27 2:49 ` Tiezhu Yang
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2020-05-26 23:02 UTC (permalink / raw)
To: Michael Turquette, Tiezhu Yang
Cc: linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
Quoting Tiezhu Yang (2020-05-24 20:31:55)
> The return value about hisi_reset_init() is not correct, fix it.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/clk/hisilicon/clk-hi3519.c | 4 ++--
> drivers/clk/hisilicon/crg-hi3516cv300.c | 4 ++--
> drivers/clk/hisilicon/crg-hi3798cv200.c | 4 ++--
> drivers/clk/hisilicon/reset.c | 4 ++--
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c
> index ad0c7f3..803fa66 100644
> --- a/drivers/clk/hisilicon/clk-hi3519.c
> +++ b/drivers/clk/hisilicon/clk-hi3519.c
> @@ -149,8 +149,8 @@ static int hi3519_clk_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> crg->rstc = hisi_reset_init(pdev);
> - if (!crg->rstc)
> - return -ENOMEM;
> + if (IS_ERR(crg->rstc))
> + return PTR_ERR(crg->rstc);
>
> crg->clk_data = hi3519_clk_register(pdev);
> if (IS_ERR(crg->clk_data)) {
The code I see is returning NULL or a valid pointer from
hisi_reset_init(). Can you add a "Fixes" tag to this patch so we can
figure out which patch changed the behavior and where this patch needs
to be backported to?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init()
2020-05-26 23:02 ` [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Stephen Boyd
@ 2020-05-27 2:49 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2020-05-27 2:49 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette; +Cc: linux-clk, linux-kernel, Xuefeng Li
On 05/27/2020 07:02 AM, Stephen Boyd wrote:
> Quoting Tiezhu Yang (2020-05-24 20:31:55)
>> The return value about hisi_reset_init() is not correct, fix it.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>> drivers/clk/hisilicon/clk-hi3519.c | 4 ++--
>> drivers/clk/hisilicon/crg-hi3516cv300.c | 4 ++--
>> drivers/clk/hisilicon/crg-hi3798cv200.c | 4 ++--
>> drivers/clk/hisilicon/reset.c | 4 ++--
>> 4 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c
>> index ad0c7f3..803fa66 100644
>> --- a/drivers/clk/hisilicon/clk-hi3519.c
>> +++ b/drivers/clk/hisilicon/clk-hi3519.c
>> @@ -149,8 +149,8 @@ static int hi3519_clk_probe(struct platform_device *pdev)
>> return -ENOMEM;
>>
>> crg->rstc = hisi_reset_init(pdev);
>> - if (!crg->rstc)
>> - return -ENOMEM;
>> + if (IS_ERR(crg->rstc))
>> + return PTR_ERR(crg->rstc);
>>
>> crg->clk_data = hi3519_clk_register(pdev);
>> if (IS_ERR(crg->clk_data)) {
> The code I see is returning NULL or a valid pointer from
> hisi_reset_init(). Can you add a "Fixes" tag to this patch so we can
> figure out which patch changed the behavior and where this patch needs
> to be backported to?
OK, I will check the git log to add a Fixes tag and then send v2.
Thanks,
Tiezhu Yang
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
2020-05-26 18:55 ` kbuild test robot
@ 2020-05-27 4:13 ` kbuild test robot
2020-05-27 7:56 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2020-05-27 4:13 UTC (permalink / raw)
To: Tiezhu Yang, Michael Turquette, Stephen Boyd
Cc: kbuild-all, linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
[-- Attachment #1: Type: text/plain, Size: 4380 bytes --]
Hi Tiezhu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on clk/clk-next]
[also build test ERROR on v5.7-rc7 next-20200526]
[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/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200525-113342
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: m68k-allnoconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_rate':
clk.c:(.text+0xd0): undefined reference to `clk_register_fixed_rate'
>> m68k-linux-ld: clk.c:(.text+0x120): undefined reference to `clk_unregister_fixed_rate'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_factor':
clk.c:(.text+0x166): undefined reference to `clk_register_fixed_factor'
>> m68k-linux-ld: clk.c:(.text+0x1ba): undefined reference to `clk_unregister_fixed_factor'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_mux':
clk.c:(.text+0x208): undefined reference to `clk_register_mux_table'
>> m68k-linux-ld: clk.c:(.text+0x210): undefined reference to `clk_register_clkdev'
>> m68k-linux-ld: clk.c:(.text+0x2a8): undefined reference to `clk_unregister_mux'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_divider':
clk.c:(.text+0x360): undefined reference to `clk_register_divider_table'
m68k-linux-ld: clk.c:(.text+0x366): undefined reference to `clk_register_clkdev'
>> m68k-linux-ld: clk.c:(.text+0x3f0): undefined reference to `clk_unregister_divider'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate':
clk.c:(.text+0x43c): undefined reference to `clk_register_gate'
m68k-linux-ld: clk.c:(.text+0x442): undefined reference to `clk_register_clkdev'
>> m68k-linux-ld: clk.c:(.text+0x4c0): undefined reference to `clk_unregister_gate'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate_sep':
clk.c:(.text+0x510): undefined reference to `clk_register_clkdev'
m68k-linux-ld: drivers/clk/hisilicon/clk.o: in function `hi6220_clk_register_divider':
clk.c:(.init.text+0x16): undefined reference to `clk_register_clkdev'
m68k-linux-ld: drivers/clk/hisilicon/clkgate-separated.o: in function `hisi_register_clkgate_sep':
clkgate-separated.c:(.text+0x128): undefined reference to `clk_register'
>> m68k-linux-ld: clkgate-separated.c:(.text+0x176): undefined reference to `clk_register'
m68k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_set_rate':
clkdivider-hi6220.c:(.text+0x26): undefined reference to `divider_get_val'
m68k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_round_rate':
clkdivider-hi6220.c:(.text+0xa6): undefined reference to `clk_hw_get_parent'
>> m68k-linux-ld: clkdivider-hi6220.c:(.text+0xc0): undefined reference to `divider_round_rate_parent'
m68k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_recalc_rate':
clkdivider-hi6220.c:(.text+0x10a): undefined reference to `divider_recalc_rate'
m68k-linux-ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_register_clkdiv':
clkdivider-hi6220.c:(.text+0x1f8): undefined reference to `clk_register'
m68k-linux-ld: drivers/clk/hisilicon/clk-hisi-phase.o: in function `clk_register_hisi_phase':
clk-hisi-phase.c:(.text+0x172): undefined reference to `devm_clk_register'
>> m68k-linux-ld: clk-hisi-phase.c:(.text+0x1e2): undefined reference to `devm_clk_register'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 4932 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon
2020-05-26 18:55 ` kbuild test robot
@ 2020-05-27 4:16 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2020-05-27 4:16 UTC (permalink / raw)
To: kbuild test robot, Michael Turquette, Stephen Boyd
Cc: kbuild-all, linux-clk, linux-kernel, Xuefeng Li
On 05/27/2020 02:55 AM, kbuild test robot wrote:
> Hi Tiezhu,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on clk/clk-next]
> [also build test ERROR on v5.7-rc7 next-20200526]
> [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/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200525-113342
> base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
> config: i386-tinyconfig (attached as .config)
Hi,
Thanks for your report.
I find that both CONFIG_ARCH_HISI and CONFIG_COMPILE_TEST are not
set in .config, if one of them is set, the build will be success.
But when used with this patch and this .config, I think it is
better to check CONFIG_COMMON_CLK and CONFIG_CLKDEV_LOOKUP or
just check CONFIG_ARCH_HISI before build the following files
"clk.o clkgate-separated.o clkdivider-hi6220.o clk-hisi-phase.o"
in drivers/clk/hisilicon/Makefile to avoid the build failure.
I will verify it and then send v2.
Thanks,
Tiezhu Yang
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce (this is a W=1 build):
> # save the attached .config to linux build tree
> make W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_rate':
>>> clk.c:(.text+0x9e): undefined reference to `clk_register_fixed_rate'
>>> ld: clk.c:(.text+0xdf): undefined reference to `clk_unregister_fixed_rate'
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_fixed_factor':
>>> clk.c:(.text+0x117): undefined reference to `clk_register_fixed_factor'
>>> ld: clk.c:(.text+0x158): undefined reference to `clk_unregister_fixed_factor'
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_mux':
>>> clk.c:(.text+0x1cb): undefined reference to `clk_register_mux_table'
>>> ld: clk.c:(.text+0x1f2): undefined reference to `clk_register_clkdev'
>>> ld: clk.c:(.text+0x21a): undefined reference to `clk_unregister_mux'
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_divider':
>>> clk.c:(.text+0x2c9): undefined reference to `clk_register_divider_table'
> ld: clk.c:(.text+0x2e3): undefined reference to `clk_register_clkdev'
>>> ld: clk.c:(.text+0x311): undefined reference to `clk_unregister_divider'
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate':
>>> clk.c:(.text+0x36c): undefined reference to `clk_register_gate'
> ld: clk.c:(.text+0x393): undefined reference to `clk_register_clkdev'
>>> ld: clk.c:(.text+0x3bb): undefined reference to `clk_unregister_gate'
> ld: drivers/clk/hisilicon/clk.o: in function `hisi_clk_register_gate_sep':
>>> clk.c:(.text+0x425): undefined reference to `clk_register_clkdev'
> ld: drivers/clk/hisilicon/clk.o: in function `hi6220_clk_register_divider':
>>> clk.c:(.init.text+0x5d): undefined reference to `clk_register_clkdev'
> ld: drivers/clk/hisilicon/clkgate-separated.o: in function `hisi_register_clkgate_sep':
>>> clkgate-separated.c:(.text+0xf0): undefined reference to `clk_register'
> ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_set_rate':
>>> clkdivider-hi6220.c:(.text+0x16): undefined reference to `divider_get_val'
> ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_recalc_rate':
>>> clkdivider-hi6220.c:(.text+0x8a): undefined reference to `divider_recalc_rate'
> ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_clkdiv_round_rate':
>>> clkdivider-hi6220.c:(.text+0xa9): undefined reference to `clk_hw_get_parent'
>>> ld: clkdivider-hi6220.c:(.text+0xbd): undefined reference to `divider_round_rate_parent'
> ld: drivers/clk/hisilicon/clkdivider-hi6220.o: in function `hi6220_register_clkdiv':
>>> clkdivider-hi6220.c:(.text+0x1c5): undefined reference to `clk_register'
> ld: drivers/clk/hisilicon/clk-hisi-phase.o: in function `clk_register_hisi_phase':
>>> clk-hisi-phase.c:(.text+0x121): undefined reference to `devm_clk_register'
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
2020-05-26 18:55 ` kbuild test robot
2020-05-27 4:13 ` kbuild test robot
@ 2020-05-27 7:56 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2020-05-27 7:56 UTC (permalink / raw)
To: Tiezhu Yang, Michael Turquette, Stephen Boyd
Cc: kbuild-all, linux-clk, linux-kernel, Xuefeng Li, Tiezhu Yang
[-- Attachment #1: Type: text/plain, Size: 3888 bytes --]
Hi Tiezhu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on v5.7-rc7 next-20200526]
[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/Tiezhu-Yang/clk-hisilicon-Use-correct-return-value-about-hisi_reset_init/20200525-113342
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: x86_64-randconfig-s021-20200527 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/clk/hisilicon/reset.c:100:28: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct hisi_reset_controller * @@ got void [noderef] <asn:2> *membase @@
>> drivers/clk/hisilicon/reset.c:100:28: sparse: expected struct hisi_reset_controller *
>> drivers/clk/hisilicon/reset.c:100:28: sparse: got void [noderef] <asn:2> *membase
vim +100 drivers/clk/hisilicon/reset.c
25824d52caa8e61 Jiancheng Xue 2016-04-23 89
97b7129cd2afb47 Jiancheng Xue 2016-06-15 90 struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
25824d52caa8e61 Jiancheng Xue 2016-04-23 91 {
25824d52caa8e61 Jiancheng Xue 2016-04-23 92 struct hisi_reset_controller *rstc;
25824d52caa8e61 Jiancheng Xue 2016-04-23 93
97b7129cd2afb47 Jiancheng Xue 2016-06-15 94 rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
25824d52caa8e61 Jiancheng Xue 2016-04-23 95 if (!rstc)
78847951203a978 Tiezhu Yang 2020-05-25 96 return ERR_PTR(-ENOMEM);
25824d52caa8e61 Jiancheng Xue 2016-04-23 97
75cc0a123c90c8e YueHaibing 2019-10-14 98 rstc->membase = devm_platform_ioremap_resource(pdev, 0);
e9a2310fb689151 Gustavo A. R. Silva 2018-07-25 99 if (IS_ERR(rstc->membase))
78847951203a978 Tiezhu Yang 2020-05-25 @100 return rstc->membase;
25824d52caa8e61 Jiancheng Xue 2016-04-23 101
25824d52caa8e61 Jiancheng Xue 2016-04-23 102 spin_lock_init(&rstc->lock);
25824d52caa8e61 Jiancheng Xue 2016-04-23 103 rstc->rcdev.owner = THIS_MODULE;
25824d52caa8e61 Jiancheng Xue 2016-04-23 104 rstc->rcdev.ops = &hisi_reset_ops;
97b7129cd2afb47 Jiancheng Xue 2016-06-15 105 rstc->rcdev.of_node = pdev->dev.of_node;
25824d52caa8e61 Jiancheng Xue 2016-04-23 106 rstc->rcdev.of_reset_n_cells = 2;
25824d52caa8e61 Jiancheng Xue 2016-04-23 107 rstc->rcdev.of_xlate = hisi_reset_of_xlate;
25824d52caa8e61 Jiancheng Xue 2016-04-23 108 reset_controller_register(&rstc->rcdev);
25824d52caa8e61 Jiancheng Xue 2016-04-23 109
25824d52caa8e61 Jiancheng Xue 2016-04-23 110 return rstc;
25824d52caa8e61 Jiancheng Xue 2016-04-23 111 }
25824d52caa8e61 Jiancheng Xue 2016-04-23 112 EXPORT_SYMBOL_GPL(hisi_reset_init);
25824d52caa8e61 Jiancheng Xue 2016-04-23 113
:::::: The code at line 100 was first introduced by commit
:::::: 78847951203a978f4544f9e7dd244a3930b3945b clk: hisilicon: Use correct return value about hisi_reset_init()
:::::: TO: Tiezhu Yang <yangtiezhu@loongson.cn>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41590 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-05-27 7:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 3:31 [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Tiezhu Yang
2020-05-25 3:31 ` [PATCH 2/2] clk: Remove CONFIG_ARCH_HISI check for subdir hisilicon Tiezhu Yang
2020-05-26 18:55 ` kbuild test robot
2020-05-27 4:16 ` Tiezhu Yang
2020-05-27 4:13 ` kbuild test robot
2020-05-27 7:56 ` kbuild test robot
2020-05-26 23:02 ` [PATCH 1/2] clk: hisilicon: Use correct return value about hisi_reset_init() Stephen Boyd
2020-05-27 2:49 ` Tiezhu Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).