[arm:zii 19/90] drivers/net/dsa/qca/ar9331.c:481:25: error: initialization of 'void (*)(struct dsa_switch *, int, unsigned int, phy_interface_t, struct phy_device *, int, int, bool, bool)' {aka 'void (*)(struct dsa_switch *, int, unsigned int, enum <anonymous>, struct phy_device *, int, int, _Bool, _Bool)'} from incompatible pointer type 'void (*)(struct dsa_switch *, int, unsigned int, phy_interface_t, struct phy_device *)' {aka 'void (*)(struct dsa_switch *, int, unsigned int,
by kbuild test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head: 44ecc8bc50178042162a540be580123e600f2d87
commit: 6f9538c663d4d54ef73d8c6b78f24e3f4eb144ac [19/90] net: dsa: propagate resolved link config via mac_link_up()
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6f9538c663d4d54ef73d8c6b78f24e3f4eb144ac
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/dsa/qca/ar9331.c:481:25: error: initialization of 'void (*)(struct dsa_switch *, int, unsigned int, phy_interface_t, struct phy_device *, int, int, bool, bool)' {aka 'void (*)(struct dsa_switch *, int, unsigned int, enum <anonymous>, struct phy_device *, int, int, _Bool, _Bool)'} from incompatible pointer type 'void (*)(struct dsa_switch *, int, unsigned int, phy_interface_t, struct phy_device *)' {aka 'void (*)(struct dsa_switch *, int, unsigned int, enum <anonymous>, struct phy_device *)'} [-Werror=incompatible-pointer-types]
481 | .phylink_mac_link_up = ar9331_sw_phylink_mac_link_up,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/qca/ar9331.c:481:25: note: (near initialization for 'ar9331_sw_ops.phylink_mac_link_up')
cc1: some warnings being treated as errors
vim +481 drivers/net/dsa/qca/ar9331.c
ec6698c272debe Oleksij Rempel 2019-12-18 473
ec6698c272debe Oleksij Rempel 2019-12-18 474 static const struct dsa_switch_ops ar9331_sw_ops = {
ec6698c272debe Oleksij Rempel 2019-12-18 475 .get_tag_protocol = ar9331_sw_get_tag_protocol,
ec6698c272debe Oleksij Rempel 2019-12-18 476 .setup = ar9331_sw_setup,
ec6698c272debe Oleksij Rempel 2019-12-18 477 .port_disable = ar9331_sw_port_disable,
ec6698c272debe Oleksij Rempel 2019-12-18 478 .phylink_validate = ar9331_sw_phylink_validate,
ec6698c272debe Oleksij Rempel 2019-12-18 479 .phylink_mac_config = ar9331_sw_phylink_mac_config,
ec6698c272debe Oleksij Rempel 2019-12-18 480 .phylink_mac_link_down = ar9331_sw_phylink_mac_link_down,
ec6698c272debe Oleksij Rempel 2019-12-18 @481 .phylink_mac_link_up = ar9331_sw_phylink_mac_link_up,
ec6698c272debe Oleksij Rempel 2019-12-18 482 };
ec6698c272debe Oleksij Rempel 2019-12-18 483
:::::: The code at line 481 was first introduced by commit
:::::: ec6698c272debe16c8825c88a5b3c3f68a12ef4a net: dsa: add support for Atheros AR9331 built-in switch
:::::: TO: Oleksij Rempel <o.rempel(a)pengutronix.de>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[drm-tip:drm-tip 9/10] include/net/ax25.h:125:2: error: redefinition of enumerator 'AX25_PROTO_DAMA_MASTER'
by kbuild test robot
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip
head: cade363a69762c57ffb58f91b47670df7ca520bf
commit: f0b7c5c4d7beea0cd83b2f8659faf9fd406137e6 [9/10] Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6a39f00e8d0cd3684df54fb03d288efe2969202)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f0b7c5c4d7beea0cd83b2f8659faf9fd406137e6
# save the attached .config to linux build tree
COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/ax25/ax25_addr.c:16:
>> include/net/ax25.h:125:2: error: redefinition of enumerator 'AX25_PROTO_DAMA_MASTER'
AX25_PROTO_MAX = __AX25_PROTO_MAX -1
^
include/net/ax25.h:121:24: note: expanded from macro 'AX25_PROTO_MAX'
#define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER
^
include/net/ax25.h:120:2: note: previous definition is here
AX25_PROTO_DAMA_MASTER,
^
1 error generated.
vim +/AX25_PROTO_DAMA_MASTER +125 include/net/ax25.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 113
^1da177e4c3f41 Linus Torvalds 2005-04-16 114 enum {
^1da177e4c3f41 Linus Torvalds 2005-04-16 115 AX25_PROTO_STD_SIMPLEX,
^1da177e4c3f41 Linus Torvalds 2005-04-16 116 AX25_PROTO_STD_DUPLEX,
c7c694d196a39a Ralf Baechle 2006-03-19 117 #ifdef CONFIG_AX25_DAMA_SLAVE
^1da177e4c3f41 Linus Torvalds 2005-04-16 118 AX25_PROTO_DAMA_SLAVE,
c7c694d196a39a Ralf Baechle 2006-03-19 119 #ifdef CONFIG_AX25_DAMA_MASTER
c7c694d196a39a Ralf Baechle 2006-03-19 120 AX25_PROTO_DAMA_MASTER,
c7c694d196a39a Ralf Baechle 2006-03-19 121 #define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER
c7c694d196a39a Ralf Baechle 2006-03-19 122 #endif
c7c694d196a39a Ralf Baechle 2006-03-19 123 #endif
c7c694d196a39a Ralf Baechle 2006-03-19 124 __AX25_PROTO_MAX,
c7c694d196a39a Ralf Baechle 2006-03-19 @125 AX25_PROTO_MAX = __AX25_PROTO_MAX -1
^1da177e4c3f41 Linus Torvalds 2005-04-16 126 };
^1da177e4c3f41 Linus Torvalds 2005-04-16 127
:::::: The code at line 125 was first introduced by commit
:::::: c7c694d196a39af6e644e24279953d04f30362db [AX.25]: Fix potencial memory hole.
:::::: TO: Ralf Baechle DL5RB <ralf(a)linux-mips.org>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[plbossart-sound:sdw/remove-sdw-driver-rebase 41/129] drivers/soundwire/qcom.c:863:30: error: passing argument 1 of 'sdw_master_device_del' from incompatible pointer type
by kbuild test robot
tree: https://github.com/plbossart/sound sdw/remove-sdw-driver-rebase
head: d5eea513d25c8e3ae9dd3d99ee92dbd70e2cef37
commit: 419937d3b987404a93e61ede2b33b89e5f2182f0 [41/129] soundwire: qcom: add sdw_master_device support
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 419937d3b987404a93e61ede2b33b89e5f2182f0
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/soundwire/qcom.c: In function 'qcom_swrm_probe':
>> drivers/soundwire/qcom.c:863:30: error: passing argument 1 of 'sdw_master_device_del' from incompatible pointer type [-Werror=incompatible-pointer-types]
863 | err = sdw_master_device_del(&ctrl->md);
| ^~~~~~~~~
| |
| struct sdw_master_device **
In file included from drivers/soundwire/qcom.c:16:
include/linux/soundwire/sdw.h:889:53: note: expected 'struct sdw_master_device *' but argument is of type 'struct sdw_master_device **'
889 | int sdw_master_device_del(struct sdw_master_device *md);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/soundwire/qcom.c: In function 'qcom_swrm_remove':
drivers/soundwire/qcom.c:878:30: error: passing argument 1 of 'sdw_master_device_del' from incompatible pointer type [-Werror=incompatible-pointer-types]
878 | err = sdw_master_device_del(&ctrl->md);
| ^~~~~~~~~
| |
| struct sdw_master_device **
In file included from drivers/soundwire/qcom.c:16:
include/linux/soundwire/sdw.h:889:53: note: expected 'struct sdw_master_device *' but argument is of type 'struct sdw_master_device **'
889 | int sdw_master_device_del(struct sdw_master_device *md);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/of_device.h:5,
from drivers/soundwire/qcom.c:12:
>> drivers/soundwire/qcom.c:880:11: error: 'dev' undeclared (first use in this function); did you mean 'pdev'?
880 | dev_err(dev, "master device del failed %d\n", err);
| ^~~
include/linux/dev_printk.h:104:11: note: in definition of macro 'dev_err'
104 | _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
drivers/soundwire/qcom.c:880:11: note: each undeclared identifier is reported only once for each function it appears in
880 | dev_err(dev, "master device del failed %d\n", err);
| ^~~
include/linux/dev_printk.h:104:11: note: in definition of macro 'dev_err'
104 | _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
cc1: some warnings being treated as errors
vim +/sdw_master_device_del +863 drivers/soundwire/qcom.c
743
744 static int qcom_swrm_probe(struct platform_device *pdev)
745 {
746 struct device *dev = &pdev->dev;
747 struct sdw_master_prop *prop;
748 struct sdw_bus_params *params;
749 struct qcom_swrm_ctrl *ctrl;
750 int ret, err;
751 u32 val;
752
753 ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
754 if (!ctrl)
755 return -ENOMEM;
756
757 if (dev->parent->bus == &slimbus_bus) {
758 ctrl->reg_read = qcom_swrm_abh_reg_read;
759 ctrl->reg_write = qcom_swrm_ahb_reg_write;
760 ctrl->regmap = dev_get_regmap(dev->parent, NULL);
761 if (!ctrl->regmap)
762 return -EINVAL;
763 } else {
764 /* Only WCD based SoundWire controller is supported */
765 return -ENOTSUPP;
766 }
767
768 ctrl->irq = of_irq_get(dev->of_node, 0);
769 if (ctrl->irq < 0) {
770 ret = ctrl->irq;
771 goto err_init;
772 }
773
774 ctrl->hclk = devm_clk_get(dev, "iface");
775 if (IS_ERR(ctrl->hclk)) {
776 ret = PTR_ERR(ctrl->hclk);
777 goto err_init;
778 }
779
780 clk_prepare_enable(ctrl->hclk);
781
782 ctrl->dev = dev;
783 dev_set_drvdata(&pdev->dev, ctrl);
784 spin_lock_init(&ctrl->comp_lock);
785 mutex_init(&ctrl->port_lock);
786 INIT_WORK(&ctrl->slave_work, qcom_swrm_slave_wq);
787
788 /*
789 * add sdw_master_device.
790 * For the Qualcomm implementation there is no driver.
791 */
792 ctrl->md = sdw_master_device_add(dev, /* platform device is parent */
793 dev->fwnode,
794 NULL, /* no link ops */
795 0, /* only one link supported */
796 NULL); /* no context */
797 if (IS_ERR(ctrl->md)) {
798 dev_err(dev, "Could not create sdw_master_device\n");
799 ret = PTR_ERR(ctrl->md);
800 goto err_clk;
801 }
802
803 /* the bus uses the sdw_master_device, not the platform device */
804 ctrl->bus.dev = &ctrl->md->dev;
805
806 ctrl->bus.ops = &qcom_swrm_ops;
807 ctrl->bus.port_ops = &qcom_swrm_port_ops;
808 ctrl->bus.compute_params = &qcom_swrm_compute_params;
809
810 ret = qcom_swrm_get_port_config(ctrl);
811 if (ret)
812 goto err_md;
813
814 params = &ctrl->bus.params;
815 params->max_dr_freq = DEFAULT_CLK_FREQ;
816 params->curr_dr_freq = DEFAULT_CLK_FREQ;
817 params->col = SWRM_DEFAULT_COL;
818 params->row = SWRM_DEFAULT_ROWS;
819 ctrl->reg_read(ctrl, SWRM_MCP_STATUS, &val);
820 params->curr_bank = val & SWRM_MCP_STATUS_BANK_NUM_MASK;
821 params->next_bank = !params->curr_bank;
822
823 prop = &ctrl->bus.prop;
824 prop->max_clk_freq = DEFAULT_CLK_FREQ;
825 prop->num_clk_gears = 0;
826 prop->num_clk_freq = MAX_FREQ_NUM;
827 prop->clk_freq = &qcom_swrm_freq_tbl[0];
828 prop->default_col = SWRM_DEFAULT_COL;
829 prop->default_row = SWRM_DEFAULT_ROWS;
830
831 ctrl->reg_read(ctrl, SWRM_COMP_HW_VERSION, &ctrl->version);
832
833 ret = devm_request_threaded_irq(dev, ctrl->irq, NULL,
834 qcom_swrm_irq_handler,
835 IRQF_TRIGGER_RISING,
836 "soundwire", ctrl);
837 if (ret) {
838 dev_err(dev, "Failed to request soundwire irq\n");
839 goto err_md;
840 }
841
842 ret = sdw_add_bus_master(&ctrl->bus);
843 if (ret) {
844 dev_err(dev, "Failed to register Soundwire controller (%d)\n",
845 ret);
846 goto err_md;
847 }
848
849 qcom_swrm_init(ctrl);
850 ret = qcom_swrm_register_dais(ctrl);
851 if (ret)
852 goto err_master_add;
853
854 dev_info(dev, "Qualcomm Soundwire controller v%x.%x.%x Registered\n",
855 (ctrl->version >> 24) & 0xff, (ctrl->version >> 16) & 0xff,
856 ctrl->version & 0xffff);
857
858 return 0;
859
860 err_master_add:
861 sdw_delete_bus_master(&ctrl->bus);
862 err_md:
> 863 err = sdw_master_device_del(&ctrl->md);
864 if (err < 0) /* log but return initial status */
865 dev_err(dev, "master device del failed %d\n", err);
866 err_clk:
867 clk_disable_unprepare(ctrl->hclk);
868 err_init:
869 return ret;
870 }
871
872 static int qcom_swrm_remove(struct platform_device *pdev)
873 {
874 struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(&pdev->dev);
875 int err;
876
877 sdw_delete_bus_master(&ctrl->bus);
878 err = sdw_master_device_del(&ctrl->md);
879 if (err < 0)
> 880 dev_err(dev, "master device del failed %d\n", err);
881 clk_disable_unprepare(ctrl->hclk);
882
883 return 0;
884 }
885
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH] x86/perf: Add hardware performance events support for Zhaoxin CPU.
by Dan Carpenter
Hi CodyYao-oc,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/CodyYao-oc/x86-perf-Add-hardware...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 629b3df7ecb01fddfdf71cb5d3c563d143117c33
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
arch/x86/events/zhaoxin/core.c:369 zhaoxin_pmu_handle_irq() error: uninitialized symbol 'is_zxc'.
# https://github.com/0day-ci/linux/commit/41b71fb039d254422d4d46c8e7beef30c...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 41b71fb039d254422d4d46c8e7beef30c11c9d39
vim +/is_zxc +369 arch/x86/events/zhaoxin/core.c
41b71fb039d254 CodyYao-oc 2020-03-31 346 static int zhaoxin_pmu_handle_irq(struct pt_regs *regs)
41b71fb039d254 CodyYao-oc 2020-03-31 347 {
41b71fb039d254 CodyYao-oc 2020-03-31 348 struct perf_sample_data data;
41b71fb039d254 CodyYao-oc 2020-03-31 349 struct cpu_hw_events *cpuc;
41b71fb039d254 CodyYao-oc 2020-03-31 350 int bit;
41b71fb039d254 CodyYao-oc 2020-03-31 351 u64 status;
41b71fb039d254 CodyYao-oc 2020-03-31 352 bool is_zxc;
^^^^^^^^^^^
bool is_zxc = false;
41b71fb039d254 CodyYao-oc 2020-03-31 353 int handled = 0;
41b71fb039d254 CodyYao-oc 2020-03-31 354
41b71fb039d254 CodyYao-oc 2020-03-31 355 cpuc = this_cpu_ptr(&cpu_hw_events);
41b71fb039d254 CodyYao-oc 2020-03-31 356 apic_write(APIC_LVTPC, APIC_DM_NMI);
41b71fb039d254 CodyYao-oc 2020-03-31 357 zhaoxin_pmu_disable_all();
41b71fb039d254 CodyYao-oc 2020-03-31 358 status = zhaoxin_pmu_get_status();
41b71fb039d254 CodyYao-oc 2020-03-31 359 if (!status)
41b71fb039d254 CodyYao-oc 2020-03-31 360 goto done;
41b71fb039d254 CodyYao-oc 2020-03-31 361
41b71fb039d254 CodyYao-oc 2020-03-31 362 if (boot_cpu_data.x86 == 0x06 &&
41b71fb039d254 CodyYao-oc 2020-03-31 363 (boot_cpu_data.x86_model == 0x0f ||
41b71fb039d254 CodyYao-oc 2020-03-31 364 boot_cpu_data.x86_model == 0x19))
41b71fb039d254 CodyYao-oc 2020-03-31 365 is_zxc = true;
41b71fb039d254 CodyYao-oc 2020-03-31 366 again:
41b71fb039d254 CodyYao-oc 2020-03-31 367
41b71fb039d254 CodyYao-oc 2020-03-31 368 /*Clearing status works only if the global control is enable on zxc.*/
41b71fb039d254 CodyYao-oc 2020-03-31 @369 if (is_zxc)
^^^^^^
41b71fb039d254 CodyYao-oc 2020-03-31 370 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl);
41b71fb039d254 CodyYao-oc 2020-03-31 371
41b71fb039d254 CodyYao-oc 2020-03-31 372 zhaoxin_pmu_ack_status(status);
41b71fb039d254 CodyYao-oc 2020-03-31 373
41b71fb039d254 CodyYao-oc 2020-03-31 374 if (is_zxc)
41b71fb039d254 CodyYao-oc 2020-03-31 375 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0);
41b71fb039d254 CodyYao-oc 2020-03-31 376
41b71fb039d254 CodyYao-oc 2020-03-31 377 inc_irq_stat(apic_perf_irqs);
41b71fb039d254 CodyYao-oc 2020-03-31 378
41b71fb039d254 CodyYao-oc 2020-03-31 379 /*
41b71fb039d254 CodyYao-oc 2020-03-31 380 * CondChgd bit 63 doesn't mean any overflow status. Ignore
41b71fb039d254 CodyYao-oc 2020-03-31 381 * and clear the bit.
41b71fb039d254 CodyYao-oc 2020-03-31 382 */
41b71fb039d254 CodyYao-oc 2020-03-31 383 if (__test_and_clear_bit(63, (unsigned long *)&status)) {
41b71fb039d254 CodyYao-oc 2020-03-31 384 if (!status)
41b71fb039d254 CodyYao-oc 2020-03-31 385 goto done;
41b71fb039d254 CodyYao-oc 2020-03-31 386 }
41b71fb039d254 CodyYao-oc 2020-03-31 387
41b71fb039d254 CodyYao-oc 2020-03-31 388 for_each_set_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
41b71fb039d254 CodyYao-oc 2020-03-31 389 struct perf_event *event = cpuc->events[bit];
41b71fb039d254 CodyYao-oc 2020-03-31 390
41b71fb039d254 CodyYao-oc 2020-03-31 391 handled++;
41b71fb039d254 CodyYao-oc 2020-03-31 392
41b71fb039d254 CodyYao-oc 2020-03-31 393 if (!test_bit(bit, cpuc->active_mask))
41b71fb039d254 CodyYao-oc 2020-03-31 394 continue;
41b71fb039d254 CodyYao-oc 2020-03-31 395
41b71fb039d254 CodyYao-oc 2020-03-31 396 x86_perf_event_update(event);
41b71fb039d254 CodyYao-oc 2020-03-31 397 perf_sample_data_init(&data, 0, event->hw.last_period);
41b71fb039d254 CodyYao-oc 2020-03-31 398
41b71fb039d254 CodyYao-oc 2020-03-31 399 if (!x86_perf_event_set_period(event))
41b71fb039d254 CodyYao-oc 2020-03-31 400 continue;
41b71fb039d254 CodyYao-oc 2020-03-31 401
41b71fb039d254 CodyYao-oc 2020-03-31 402 if (perf_event_overflow(event, &data, regs))
41b71fb039d254 CodyYao-oc 2020-03-31 403 x86_pmu_stop(event, 0);
41b71fb039d254 CodyYao-oc 2020-03-31 404 }
41b71fb039d254 CodyYao-oc 2020-03-31 405
41b71fb039d254 CodyYao-oc 2020-03-31 406 /*
41b71fb039d254 CodyYao-oc 2020-03-31 407 * Repeat if there is more work to be done:
41b71fb039d254 CodyYao-oc 2020-03-31 408 */
41b71fb039d254 CodyYao-oc 2020-03-31 409 status = zhaoxin_pmu_get_status();
41b71fb039d254 CodyYao-oc 2020-03-31 410 if (status)
41b71fb039d254 CodyYao-oc 2020-03-31 411 goto again;
41b71fb039d254 CodyYao-oc 2020-03-31 412
41b71fb039d254 CodyYao-oc 2020-03-31 413 done:
41b71fb039d254 CodyYao-oc 2020-03-31 414 zhaoxin_pmu_enable_all(0);
41b71fb039d254 CodyYao-oc 2020-03-31 415 return handled;
41b71fb039d254 CodyYao-oc 2020-03-31 416 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[arm:csi-v6 2/7] drivers/media/i2c/imx219.c:1077:3: note: in expansion of macro 'WARN_ON'
by kbuild test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git csi-v6
head: 29a79ac19c0114e7ac7bd4b738bb37f3376c4ead
commit: 108d9ec05c694637bdd53dab1e715b028fcbe22d [2/7] media: i2c: imx219 camera driver
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 108d9ec05c694637bdd53dab1e715b028fcbe22d
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/media/i2c/imx219.c:47:
drivers/media/i2c/imx219.c: In function 'imx219_update_output_bpp':
include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/sh/include/asm/bug.h:77:2: note: in expansion of macro 'unlikely'
77 | unlikely(__ret_warn_on); \
| ^~~~~~~~
>> drivers/media/i2c/imx219.c:1077:3: note: in expansion of macro 'WARN_ON'
1077 | WARN_ON(1);
| ^~~~~~~
drivers/media/i2c/imx219.c:1078:2: note: here
1078 | case MEDIA_BUS_FMT_SGRBG8_1X8:
| ^~~~
vim +/WARN_ON +1077 drivers/media/i2c/imx219.c
1065
1066 static void imx219_update_output_bpp(struct imx219_private *priv,
1067 const struct v4l2_mbus_framefmt *fmt)
1068 {
1069 switch (fmt->code) {
1070 case MEDIA_BUS_FMT_SGRBG10_1X10:
1071 case MEDIA_BUS_FMT_SRGGB10_1X10:
1072 case MEDIA_BUS_FMT_SBGGR10_1X10:
1073 case MEDIA_BUS_FMT_SGBRG10_1X10:
1074 priv->bits_per_pixel = 10;
1075 break;
1076 default:
> 1077 WARN_ON(1);
1078 case MEDIA_BUS_FMT_SGRBG8_1X8:
1079 case MEDIA_BUS_FMT_SRGGB8_1X8:
1080 case MEDIA_BUS_FMT_SBGGR8_1X8:
1081 case MEDIA_BUS_FMT_SGBRG8_1X8:
1082 priv->bits_per_pixel = 8;
1083 break;
1084 }
1085 }
1086
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-sof-driver:pr/1976 1/1] sound/soc/sof/topology.c:1382:45: error: 'alh_tokens' undeclared; did you mean 'led_tokens'?
by kbuild test robot
tree: https://github.com/thesofproject/linux pr/1976
head: afc5ab79326d0ba21a40ea21ab783da04744bdc9
commit: afc5ab79326d0ba21a40ea21ab783da04744bdc9 [1/1] ASoC: SOF: topology: config ALH dai in sof_widget_load_dai
config: x86_64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout afc5ab79326d0ba21a40ea21ab783da04744bdc9
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
sound/soc/sof/topology.c: In function 'sof_widget_load_dai':
>> sound/soc/sof/topology.c:1382:45: error: 'alh_tokens' undeclared (first use in this function); did you mean 'led_tokens'?
ret = sof_parse_tokens(scomp, &config.alh, alh_tokens,
^~~~~~~~~~
led_tokens
sound/soc/sof/topology.c:1382:45: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kernel.h:16:0,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/topology.c:11:
>> include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
>> include/linux/compiler.h:357:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
^~~~~~~~~~~~~~~~~
>> include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~
>> sound/soc/sof/topology.c:1383:11: note: in expansion of macro 'ARRAY_SIZE'
ARRAY_SIZE(alh_tokens), private->array,
^~~~~~~~~~
>> sound/soc/sof/topology.c:1394:17: error: 'struct sof_ipc_dai_alh_params' has no member named 'rate'
if (!config.alh.rate && !config.alh.channels)
^
>> sound/soc/sof/topology.c:1394:37: error: 'struct sof_ipc_dai_alh_params' has no member named 'channels'
if (!config.alh.rate && !config.alh.channels)
^
vim +1382 sound/soc/sof/topology.c
1316
1317 static int sof_widget_load_dai(struct snd_soc_component *scomp, int index,
1318 struct snd_sof_widget *swidget,
1319 struct snd_soc_tplg_dapm_widget *tw,
1320 struct sof_ipc_comp_reply *r,
1321 struct snd_sof_dai *dai)
1322 {
1323 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
1324 struct snd_soc_tplg_private *private = &tw->priv;
1325 struct sof_ipc_comp_dai comp_dai;
1326 struct sof_ipc_dai_config config;
1327 struct sof_ipc_reply reply;
1328 u32 size = sizeof(config);
1329 int ret;
1330
1331 /* configure dai IPC message */
1332 memset(&comp_dai, 0, sizeof(comp_dai));
1333 comp_dai.comp.hdr.size = sizeof(comp_dai);
1334 comp_dai.comp.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_COMP_NEW;
1335 comp_dai.comp.id = swidget->comp_id;
1336 comp_dai.comp.type = SOF_COMP_DAI;
1337 comp_dai.comp.pipeline_id = index;
1338 comp_dai.config.hdr.size = sizeof(comp_dai.config);
1339
1340 ret = sof_parse_tokens(scomp, &comp_dai, dai_tokens,
1341 ARRAY_SIZE(dai_tokens), private->array,
1342 le32_to_cpu(private->size));
1343 if (ret != 0) {
1344 dev_err(scomp->dev, "error: parse dai tokens failed %d\n",
1345 le32_to_cpu(private->size));
1346 return ret;
1347 }
1348
1349 ret = sof_parse_tokens(scomp, &comp_dai.config, comp_tokens,
1350 ARRAY_SIZE(comp_tokens), private->array,
1351 le32_to_cpu(private->size));
1352 if (ret != 0) {
1353 dev_err(scomp->dev, "error: parse dai.cfg tokens failed %d\n",
1354 private->size);
1355 return ret;
1356 }
1357
1358 dev_dbg(scomp->dev, "dai %s: type %d index %d\n",
1359 swidget->widget->name, comp_dai.type, comp_dai.dai_index);
1360 sof_dbg_comp_config(scomp, &comp_dai.config);
1361
1362 ret = sof_ipc_tx_message(sdev->ipc, comp_dai.comp.hdr.cmd,
1363 &comp_dai, sizeof(comp_dai), r, sizeof(*r));
1364
1365 if (ret == 0 && dai) {
1366 dai->scomp = scomp;
1367 memcpy(&dai->comp_dai, &comp_dai, sizeof(comp_dai));
1368 }
1369
1370 if (comp_dai.type != SOF_DAI_INTEL_ALH)
1371 goto OUT;
1372
1373 /*
1374 * Some ALH DAIs are not configured by sof_link_alh_load(), so
1375 * configure them here
1376 */
1377 memset(&config, 0, size);
1378 config.hdr.size = size;
1379 config.hdr.cmd = SOF_IPC_GLB_DAI_MSG | SOF_IPC_DAI_CONFIG;
1380 config.type = comp_dai.type;
1381 config.dai_index = comp_dai.dai_index;
> 1382 ret = sof_parse_tokens(scomp, &config.alh, alh_tokens,
> 1383 ARRAY_SIZE(alh_tokens), private->array,
1384 le32_to_cpu(private->size));
1385 if (ret != 0) {
1386 dev_err(scomp->dev, "error: parse alh tokens failed %d\n",
1387 le32_to_cpu(private->size));
1388 return ret;
1389 }
1390 /*
1391 * Not every DAI has config data here, and we don't need to send
1392 * ipc for them
1393 */
> 1394 if (!config.alh.rate && !config.alh.channels)
1395 goto OUT;
1396
1397 ret = sof_ipc_tx_message(sdev->ipc,
1398 config.hdr.cmd, &config, size, &reply,
1399 sizeof(reply));
1400 if (ret != 0) {
1401 dev_err(scomp->dev, "error: config alh ipc failed %d\n",
1402 ret);
1403 return ret;
1404 }
1405 OUT:
1406 return ret;
1407 }
1408
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH] acpica: clear global_lock bits at FACS initialization
by Dan Carpenter
Hi Jan,
url: https://github.com/0day-ci/linux/commits/Jan-Engelhardt/acpica-clear-glob...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/acpi/acpica/tbutils.c:60 acpi_tb_initialize_facs() error: uninitialized symbol 'facs'.
# https://github.com/0day-ci/linux/commit/cc0fd9e263391ff230ac700aa76dbcf71...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout cc0fd9e263391ff230ac700aa76dbcf7195c8c42
vim +/facs +60 drivers/acpi/acpica/tbutils.c
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 35 acpi_status acpi_tb_initialize_facs(void)
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 36 {
7484619bff495c drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 37 struct acpi_table_facs *facs;
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 38
22e5b40ab21fca drivers/acpi/acpica/tbutils.c Bob Moore 2011-11-16 39 /* If Hardware Reduced flag is set, there is no FACS */
22e5b40ab21fca drivers/acpi/acpica/tbutils.c Bob Moore 2011-11-16 40
22e5b40ab21fca drivers/acpi/acpica/tbutils.c Bob Moore 2011-11-16 41 if (acpi_gbl_reduced_hardware) {
22e5b40ab21fca drivers/acpi/acpica/tbutils.c Bob Moore 2011-11-16 42 acpi_gbl_FACS = NULL;
22e5b40ab21fca drivers/acpi/acpica/tbutils.c Bob Moore 2011-11-16 43 return (AE_OK);
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 44 } else if (acpi_gbl_FADT.Xfacs &&
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 45 (!acpi_gbl_FADT.facs
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 46 || !acpi_gbl_use32_bit_facs_addresses)) {
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 47 (void)acpi_get_table_by_index(acpi_gbl_xfacs_index,
c04e1fb4396d27 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 48 ACPI_CAST_INDIRECT_PTR(struct
c04e1fb4396d27 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 49 acpi_table_header,
7484619bff495c drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 50 &facs));
7484619bff495c drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 51 acpi_gbl_FACS = facs;
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 52 } else if (acpi_gbl_FADT.facs) {
^^^^^^^
8ec3f459073e67 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 53 (void)acpi_get_table_by_index(acpi_gbl_facs_index,
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 54 ACPI_CAST_INDIRECT_PTR(struct
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 55 acpi_table_header,
7484619bff495c drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 56 &facs));
7484619bff495c drivers/acpi/acpica/tbutils.c Lv Zheng 2015-08-25 57 acpi_gbl_FACS = facs;
c04e1fb4396d27 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 58 }
There is no else path, only else if paths.
cc0fd9e263391f drivers/acpi/acpica/tbutils.c Jan Engelhardt 2020-03-30 59 /* Clear potential garbage from the initial FACS table. */
cc0fd9e263391f drivers/acpi/acpica/tbutils.c Jan Engelhardt 2020-03-30 @60 if (facs != NULL)
cc0fd9e263391f drivers/acpi/acpica/tbutils.c Jan Engelhardt 2020-03-30 61 facs->global_lock &= ~0x3;
c04e1fb4396d27 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 62
f06147f9fbf134 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 63 /* If there is no FACS, just continue. There was already an error msg */
f06147f9fbf134 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 64
c04e1fb4396d27 drivers/acpi/acpica/tbutils.c Lv Zheng 2015-07-01 65 return (AE_OK);
009c4cbe99bea2 drivers/acpi/tables/tbutils.c Bob Moore 2008-11-12 66 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[frank-w-bpi-r2-4.14:5.6-hdmiphy-test 16/36] include/linux/timekeeping32.h:20:8: error: implicit declaration of function 'ktime_to_timespec'; did you mean
by kbuild test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.6-hdmiphy-test
head: 5257a79477992a1544af4cefcf2485a61b21cb6b
commit: 9d1096ef5c4a04ec72c1c14771bbb12485f3b7b2 [16/36] mt6625l: add changes outside driver dir
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 9d1096ef5c4a04ec72c1c14771bbb12485f3b7b2
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the frank-w-bpi-r2-4.14/5.6-hdmiphy-test HEAD 5257a79477992a1544af4cefcf2485a61b21cb6b builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
WARNING: unmet direct dependencies detected for SPI_PXA2XX
Depends on SPI && SPI_MASTER && (ARCH_PXA || ARCH_MMP || PCI || ACPI)
Selected by
- SND_SOC_INTEL_BDW_RT5677_MACH && SOUND && !UML && SND && SND_SOC && SND_SOC_INTEL_MACH && (SND_SOC_INTEL_HASWELL || SND_SOC_SOF_BROADWELL && I2C && (I2C_DESIGNWARE_PLATFORM || COMPILE_TEST && (GPIOLIB || COMPILE_TEST && (X86_INTEL_LPSS || COMPILE_TEST && SPI_MASTER
In file included from include/linux/ktime.h:239,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/mm_types.h:16,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/sh/kernel/asm-offsets.c:14:
include/linux/timekeeping32.h:9:43: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
9 | static inline void do_gettimeofday(struct timeval
| ^~~~~~~
include/linux/timekeeping32.h: In function 'do_gettimeofday':
include/linux/timekeeping32.h:14:4: error: dereferencing pointer to incomplete type 'struct timeval'
14 | tv->tv_sec = now.tv_sec;
| ^~
include/linux/timekeeping32.h: In function 'get_monotonic_boottime':
include/linux/timekeeping32.h:20:2: error: dereferencing pointer to incomplete type 'struct timespec'
20 | certs scripts = ktime_to_timespec(ktime_get_boottime());
| ^~~
>> include/linux/timekeeping32.h:20:8: error: implicit declaration of function 'ktime_to_timespec'; did you mean
20 | certs scripts = ktime_to_timespec(ktime_get_boottime());
| ^~~~~~~~~~~~~~~~~
| ktime_to_timespec64
cc1: some warnings being treated as errors
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux.o [scripts/Makefile.build:101: arch/sh/kernel/asm-offsets.s] Error 1
Target '__build' not remade because of errors.
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux.o [Makefile:1113: prepare0] Error 2
Target 'prepare' not remade because of errors.
make: Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux.o [Makefile:180: sub-make] Error 2
25 real 6 user 8 sys 60.78% cpu make prepare
vim +/ktime_to_timespec +20 include/linux/timekeeping32.h
> 14 tv->tv_sec = now.tv_sec;
15 tv->tv_usec = now.tv_nsec/1000;
16 }
17
18 static inline void get_monotonic_boottime(struct timespec *ts)
19 {
> 20 *ts = ktime_to_timespec(ktime_get_boottime());
21 }
22
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[chrome-os:chromeos-4.4 29846/30000] include/linux/compiler.h:509:38: error: call to '__compiletime_assert_3560' declared with attribute error: BUILD_BUG failed
by kbuild test robot
Hi Sergey,
FYI, the error/warning still remains.
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 62a7c9009061dcbb5507cbdb1bfbaa395abf3205
commit: 83692d56ec1d9cae7e1526fd8c4172b731cc6d30 [29846/30000] BACKPORT: ANDROID: UPSTREAM: ANDROID: binder: remove 32-bit binder interface.
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 83692d56ec1d9cae7e1526fd8c4172b731cc6d30
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/linkage.h:4:0,
from include/linux/kernel.h:6,
from arch/parisc/include/asm/bug.h:4,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from arch/parisc/include/asm/cacheflush.h:4,
from drivers/android/binder.c:54:
drivers/android/binder.c: In function 'binder_thread_write':
>> include/linux/compiler.h:509:38: error: call to '__compiletime_assert_3560' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:492:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:509:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:53:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:87:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
arch/parisc/include/asm/uaccess.h:44:26: note: in expansion of macro 'BUILD_BUG'
#define LDD_KERNEL(ptr) BUILD_BUG()
^~~~~~~~~
arch/parisc/include/asm/uaccess.h:95:14: note: in expansion of macro 'LDD_KERNEL'
case 8: LDD_KERNEL(ptr); break; \
^~~~~~~~~~
arch/parisc/include/asm/uaccess.h:41:18: note: in expansion of macro '__get_user'
#define get_user __get_user
^~~~~~~~~~
drivers/android/binder.c:3560:8: note: in expansion of macro 'get_user'
if (get_user(node_ptr, (binder_uintptr_t __user *)ptr))
^~~~~~~~
include/linux/compiler.h:509:38: error: call to '__compiletime_assert_3563' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:492:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:509:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:53:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:87:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
arch/parisc/include/asm/uaccess.h:44:26: note: in expansion of macro 'BUILD_BUG'
#define LDD_KERNEL(ptr) BUILD_BUG()
^~~~~~~~~
arch/parisc/include/asm/uaccess.h:95:14: note: in expansion of macro 'LDD_KERNEL'
case 8: LDD_KERNEL(ptr); break; \
^~~~~~~~~~
arch/parisc/include/asm/uaccess.h:41:18: note: in expansion of macro '__get_user'
#define get_user __get_user
^~~~~~~~~~
drivers/android/binder.c:3563:8: note: in expansion of macro 'get_user'
if (get_user(cookie, (binder_uintptr_t __user *)ptr))
^~~~~~~~
include/linux/compiler.h:509:38: error: call to '__compiletime_assert_3632' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:492:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:509:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:53:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:87:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
arch/parisc/include/asm/uaccess.h:44:26: note: in expansion of macro 'BUILD_BUG'
#define LDD_KERNEL(ptr) BUILD_BUG()
^~~~~~~~~
arch/parisc/include/asm/uaccess.h:95:14: note: in expansion of macro 'LDD_KERNEL'
case 8: LDD_KERNEL(ptr); break; \
^~~~~~~~~~
arch/parisc/include/asm/uaccess.h:41:18: note: in expansion of macro '__get_user'
#define get_user __get_user
^~~~~~~~~~
drivers/android/binder.c:3632:8: note: in expansion of macro 'get_user'
if (get_user(data_ptr, (binder_uintptr_t __user *)ptr))
^~~~~~~~
include/linux/compiler.h:509:38: error: call to '__compiletime_assert_3754' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:492:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:509:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:53:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:87:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
arch/parisc/include/asm/uaccess.h:44:26: note: in expansion of macro 'BUILD_BUG'
#define LDD_KERNEL(ptr) BUILD_BUG()
^~~~~~~~~
arch/parisc/include/asm/uaccess.h:95:14: note: in expansion of macro 'LDD_KERNEL'
case 8: LDD_KERNEL(ptr); break; \
vim +/__compiletime_assert_3560 +509 include/linux/compiler.h
c361d3e54364d1 Daniel Santos 2013-02-21 486
9a8ab1c39970a4 Daniel Santos 2013-02-21 487 #define __compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 488 do { \
9a8ab1c39970a4 Daniel Santos 2013-02-21 489 bool __cond = !(condition); \
9a8ab1c39970a4 Daniel Santos 2013-02-21 490 extern void prefix ## suffix(void) __compiletime_error(msg); \
9a8ab1c39970a4 Daniel Santos 2013-02-21 491 if (__cond) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 492 prefix ## suffix(); \
9a8ab1c39970a4 Daniel Santos 2013-02-21 493 __compiletime_error_fallback(__cond); \
9a8ab1c39970a4 Daniel Santos 2013-02-21 494 } while (0)
9a8ab1c39970a4 Daniel Santos 2013-02-21 495
9a8ab1c39970a4 Daniel Santos 2013-02-21 496 #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 497 __compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c39970a4 Daniel Santos 2013-02-21 498
9a8ab1c39970a4 Daniel Santos 2013-02-21 499 /**
9a8ab1c39970a4 Daniel Santos 2013-02-21 500 * compiletime_assert - break build and emit msg if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 501 * @condition: a compile-time constant condition to check
9a8ab1c39970a4 Daniel Santos 2013-02-21 502 * @msg: a message to emit if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 503 *
9a8ab1c39970a4 Daniel Santos 2013-02-21 504 * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 505 * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 506 * compiler has support to do so.
9a8ab1c39970a4 Daniel Santos 2013-02-21 507 */
9a8ab1c39970a4 Daniel Santos 2013-02-21 508 #define compiletime_assert(condition, msg) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 @509 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c39970a4 Daniel Santos 2013-02-21 510
:::::: The code at line 509 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
:::::: TO: Daniel Santos <daniel.santos(a)pobox.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 12890/13628] arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 17f166b56b2583b97f0f6612cfbbb7f99e6889bb
commit: 41f08f0506c0ee7383cf5d4f3529dc7877d38d22 [12890/13628] KVM: SVM: Move SEV code to separate file
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-188-g79f7ac98-dirty
git checkout 41f08f0506c0ee7383cf5d4f3529dc7877d38d22
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:695:14: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:715:14: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
vim +672 arch/x86/kvm/svm/sev.c
646
647 static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
648 unsigned long __user dst_uaddr,
649 unsigned long dst_paddr,
650 int size, int *err)
651 {
652 struct page *tpage = NULL;
653 int ret, offset;
654
655 /* if inputs are not 16-byte then use intermediate buffer */
656 if (!IS_ALIGNED(dst_paddr, 16) ||
657 !IS_ALIGNED(paddr, 16) ||
658 !IS_ALIGNED(size, 16)) {
659 tpage = (void *)alloc_page(GFP_KERNEL);
660 if (!tpage)
661 return -ENOMEM;
662
663 dst_paddr = __sme_page_pa(tpage);
664 }
665
666 ret = __sev_dbg_decrypt(kvm, paddr, dst_paddr, size, err);
667 if (ret)
668 goto e_free;
669
670 if (tpage) {
671 offset = paddr & 15;
> 672 if (copy_to_user((void __user *)(uintptr_t)dst_uaddr,
673 page_address(tpage) + offset, size))
674 ret = -EFAULT;
675 }
676
677 e_free:
678 if (tpage)
679 __free_page(tpage);
680
681 return ret;
682 }
683
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months