AXI_CLKGEN sync with upstream #84
Annotations
5 errors and 9 warnings
|
drivers/misc/adi-axi-tdd.c#L661
kernel_smatch: not allocating enough for = 'attr_group' 20 vs 4
|
|
drivers/iio/adc/cf_axi_adc_core.c#L168
kernel_smatch: uninitialized symbol 'pn_name'.
|
|
drivers/nvmem/adi_axi_sysid.c#L0
gcc_fanalyzer: Failed to get compile command from compile_commands.json
|
|
|
|
drivers/nvmem/adi_axi_sysid.c#L0
assert_compiled: Was not compiled during kernel compilation.
|
|
drivers/iio/jesd204/axi_jesd204b_gt.c#L394
kernel_smatch: if statement not indented
|
|
drivers/dma/dma-axi-dmac.c#L830
kernel_smatch: bit shifter 'DMA_CYCLIC' used for logical '&'
|
|
drivers/misc/adi-axi-tdd.c#L665
gcc_fanalayzer: buffer overflow [CWE-787] [-Wanalyzer-out-of-bounds]
665 | attr_group->attrs = tdd_attrs;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
'adi_axi_tdd_probe': events 1-5
|
| 690 | static int adi_axi_tdd_probe(struct platform_device *pdev)
| | ^~~~~~~~~~~~~~~~~
| | |
| | (1) entry to 'adi_axi_tdd_probe'
|......
| 698 | if (!st)
| | ~
| | |
| | (2) following 'false' branch...
|......
| 701 | st->base = devm_platform_ioremap_resource(pdev, 0);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (3) ...to here
| 702 | if (IS_ERR(st->base))
| | ~
| | |
| | (4) following 'false' branch...
|......
| 705 | platform_set_drvdata(pdev, st);
| | ~
| | |
| | (5) inlined call to 'platform_set_drvdata' from 'adi_axi_tdd_probe'
|
+--> 'platform_set_drvdata': event 6
|
|./include/linux/platform_device.h:293:9:
| 293 | dev_set_drvdata(&pdev->dev, data);
| | ^
| | |
| | (6) inlined call to 'dev_set_drvdata' from 'platform_set_drvdata'
|
+--> 'dev_set_drvdata': event 7
|
|./include/linux/device.h:945:26:
| 945 | dev->driver_data = data;
| | ~~~~~~~~~~~~~~~~~^~~~~~
| | |
| | (7) ...to here
|
<-------------+
|
'adi_axi_tdd_probe': events 8-12
|
|drivers/misc/adi-axi-tdd.c:708:12:
| 708 | if (IS_ERR(aclk))
| | ^
| | |
| | (8) following 'false' branch...
|......
| 711 | st->clk.clk = devm_clk_get_enabled(&pdev->dev, "intf_clk");
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) ...to here
| 712 | if (IS_ERR(st->clk.clk))
| | ~
| | |
| | (10) following 'false' branch...
|......
| 715 | st->clk.rate = clk_get_rate(st->clk.clk);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (11) ...to here
|......
| 718 | if (ret)
| | ~
| | |
| | (12) following 'false' branch (when 'ret == 0')...
|
'adi_axi_tdd_probe': event 13
|
| 723 | st->clk.clk);
| | ~~~~~~~^~~~
| | |
| | (13) ...to here
|
|
drivers/misc/adi-axi-tdd.c#L665
gcc_fanalayzer: buffer overflow [CWE-787] [-Wanalyzer-out-of-bounds]
665 | attr_group->attrs = tdd_attrs;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
'adi_axi_tdd_init_sysfs': events 1-2
|
| 616 | static int adi_axi_tdd_init_sysfs(struct platform_device *pdev,
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to 'adi_axi_tdd_init_sysfs'
|......
| 627 | channel_attributes = devm_kcalloc(&pdev->dev, 6 COPYING CREDITS Documentation Kbuild Kconfig Kconfig.adi LICENSES MAINTAINERS Makefile Module.symvers README README.md System.map arch azure-pipelines-rpi.yml azure-pipelines.yml block built-in.a certs ci compile_commands.json crypto defconfig dist docs drivers firmware fs include init io_uring ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net rust samples scripts security sound tools usr virt vmlinux vmlinux.a vmlinux.o st->channel_count,
| | ~
| | |
| | (2) inlined call to 'devm_kcalloc' from 'adi_axi_tdd_init_sysfs'
|
+--> 'devm_kcalloc': event 3
|
|./include/linux/device.h:343:16:
| 343 | return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
| | ^
| | |
| | (3) inlined call to 'devm_kmalloc_array' from 'devm_kcalloc'
|
+--> 'devm_kmalloc_array': events 4-5
|
| 335 | if (unlikely(check_mul_overflow(n, size, &bytes)))
| | ^
| | |
| | (4) following 'false' branch...
|......
| 338 | return devm_kmalloc(dev, bytes, flags);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) ...to here
|
<-------------+
|
'adi_axi_tdd_init_sysfs': events 6-7
|
|drivers/misc/adi-axi-tdd.c:630:12:
| 630 | if (!channel_attributes)
| | ^
| | |
| | (6) following 'false' branch...
|......
| 633 | tdd_attrs = devm_kcalloc(&pdev->dev, attribute_count,
| | ~
| | |
| | (7) inlined call to 'devm_kcalloc' from 'adi_axi_tdd_init_sysfs'
|
+--> 'devm_kcalloc': event 8
|
|./include/linux/device.h:343:16:
| 343 | return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
| | ^
| | |
| | (8) inlined call to 'devm_kmalloc_array' from 'devm_kcalloc'
|
+--> 'devm_kmalloc_array': event 9
|
|./include/linux/overflow.h:160:31:
| 160 | __must_check_overflow(__builtin_mul_overflow(a, b, d))
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (9) ...to here
|
|
drivers/clk/clk-axi-clkgen.c#L428
gcc_fanalayzer: use of uninitialized value 'val1' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
428 | div = (val1 & 0x3f) + ((val1 >> 6) & 0x3f);
| ~~~~~~^~~~~~~
'axi_clkgen_recalc_rate': events 1-2
|
| 443 | static unsigned long axi_clkgen_recalc_rate(struct clk_hw *clk_hw,
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to 'axi_clkgen_recalc_rate'
|......
| 451 | dout = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLKOUT0_1,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling 'axi_clkgen_get_div' from 'axi_clkgen_recalc_rate'
| 452 | MMCM_REG_CLKOUT0_2);
| | ~~~~~~~~~~~~~~~~~~~
|
+--> 'axi_clkgen_get_div': events 3-6
|
| 416 | static unsigned int axi_clkgen_get_div(struct axi_clkgen *axi_clkgen,
| | ^~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to 'axi_clkgen_get_div'
|......
| 419 | unsigned int val1, val2;
| | ~~~~
| | |
| | (4) region created on stack here
| | (5) capacity: 4 bytes
|......
| 422 | axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) calling 'axi_clkgen_mmcm_read' from 'axi_clkgen_get_div'
|
+--> 'axi_clkgen_mmcm_read': events 7-11
|
| 266 | static int axi_clkgen_mmcm_read(struct axi_clkgen *axi_clkgen,
| | ^~~~~~~~~~~~~~~~~~~~
| | |
| | (7) entry to 'axi_clkgen_mmcm_read'
|......
| 273 | if (ret < 0)
| | ~
| | |
| | (8) following 'false' branch (when 'ret >= 0')...
|......
| 277 | reg_val |= (reg << 16);
| | ~~~~~~~~~~~
| | |
| | (9) ...to here
|......
| 282 | if (ret < 0)
| | ~
| | |
| | (10) following 'false' branch (when 'ret >= 0')...
|......
| 285 | *val = ret;
| | ~~~~~~~~~~
| | |
| | (11) ...to here
|
<------+
|
'axi_clkgen_get_div': events 12-15
|
| 422 | axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (12) returning to 'axi_clkgen_get_div' from 'axi_clkgen_mmcm_read'
| 423 | if (val2 & MMCM_CLKOUT_NOCOUNT)
| | ~
| | |
| | (13) following 'false' branch...
|......
| 426 | axi_clkgen_mmcm_read(axi_clkgen, reg1, &val1);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (14) ...to here
| 427 |
| 428 | div = (val1 & 0x3f) + ((val1 >> 6) & 0x3f);
| | ~~~~~~~~~~~~~
| | |
| | (15) use of uninitialized value 'val1' here
|
|
|
drivers/clk/clk-axi-clkgen.c#L423
gcc_fanalayzer: use of uninitialized value 'val2' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
'axi_clkgen_recalc_rate': events 1-2
|
| 443 | static unsigned long axi_clkgen_recalc_rate(struct clk_hw *clk_hw,
| | ^~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to 'axi_clkgen_recalc_rate'
|......
| 451 | dout = axi_clkgen_get_div(axi_clkgen, MMCM_REG_CLKOUT0_1,
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling 'axi_clkgen_get_div' from 'axi_clkgen_recalc_rate'
| 452 | MMCM_REG_CLKOUT0_2);
| | ~~~~~~~~~~~~~~~~~~~
|
+--> 'axi_clkgen_get_div': events 3-5
|
| 416 | static unsigned int axi_clkgen_get_div(struct axi_clkgen *axi_clkgen,
| | ^~~~~~~~~~~~~~~~~~
| | |
| | (3) entry to 'axi_clkgen_get_div'
|......
| 419 | unsigned int val1, val2;
| | ~~~~
| | |
| | (4) region created on stack here
| | (5) capacity: 4 bytes
|
'axi_clkgen_get_div': event 6
|
| 423 | if (val2 & MMCM_CLKOUT_NOCOUNT)
|
|
|
drivers/clk/clk-axi-clkgen.c#L423
gcc_fanalayzer: use of uninitialized value 'val2' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
423 | if (val2 & MMCM_CLKOUT_NOCOUNT)
'axi_clkgen_get_div': events 1-4
|
| 416 | static unsigned int axi_clkgen_get_div(struct axi_clkgen *axi_clkgen,
| | ^~~~~~~~~~~~~~~~~~
| | |
| | (1) entry to 'axi_clkgen_get_div'
|......
| 419 | unsigned int val1, val2;
| | ~~~~
| | |
| | (2) region created on stack here
| | (3) capacity: 4 bytes
|......
| 422 | axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (4) calling 'axi_clkgen_mmcm_read' from 'axi_clkgen_get_div'
|
+--> 'axi_clkgen_mmcm_read': events 5-6
|
| 266 | static int axi_clkgen_mmcm_read(struct axi_clkgen *axi_clkgen,
| | ^~~~~~~~~~~~~~~~~~~~
| | |
| | (5) entry to 'axi_clkgen_mmcm_read'
|......
| 272 | ret = axi_clkgen_wait_non_busy(axi_clkgen);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (6) calling 'axi_clkgen_wait_non_busy' from 'axi_clkgen_mmcm_read'
|
+--> 'axi_clkgen_wait_non_busy': events 7-9
|
| 251 | static int axi_clkgen_wait_non_busy(struct axi_clkgen *axi_clkgen)
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (7) entry to 'axi_clkgen_wait_non_busy'
|......
| 260 | if (val & AXI_CLKGEN_V2_DRP_STATUS_BUSY)
| | ~
| | |
| | (8) following 'false' branch...
|......
| 263 | return val & 0xffff;
| | ~~~~~~~~~~~~
| | |
| | (9) ...to here
|
<------+
|
'axi_clkgen_mmcm_read': event 10
|
| 272 | ret = axi_clkgen_wait_non_busy(axi_clkgen);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (10) returning to 'axi_clkgen_mmcm_read' from 'axi_clkgen_wait_non_busy'
|
<------+
|
'axi_clkgen_get_div': event 11
|
| 422 | axi_clkgen_mmcm_read(axi_clkgen, reg2, &val2);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (11) returning to 'axi_clkgen_get_div' from 'axi_clkgen_mmcm_read'
|
'axi_clkgen_get_div': event 12
|
| 423 | if (val2 & MMCM_CLKOUT_NOCOUNT)
|
|
|
drivers/iio/adc/cf_axi_tdd.c#L555
kernel_sparse: Using plain integer as NULL pointer
CHECK drivers/iio/jesd204/axi_jesd204_rx.c
CHECK drivers/iio/jesd204/axi_jesd204_tx.c
CHECK drivers/iio/jesd204/axi_jesd204b_gt.c
CHECK drivers/media/platform/adi/axi-hdmi-rx.c
CHECK drivers/iio/adc/cf_axi_adc_core.c
|
|
drivers/iio/adc/cf_axi_tdd.c#L425
kernel_sparse: symbol 'cf_axi_tdd_channels' was not declared. Should it be static?
|
The logs for this run have expired and are no longer available.
Loading