drivers/platform/x86/x86-android-tablets/lenovo.c:604:30: sparse: sparse: symbol 'lenovo_yoga_tab2_1380_bq24190_pdata' was not declared. Should it be static?

From: kernel test robot
Date: Tue Oct 15 2024 - 16:37:01 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eca631b8fe808748d7585059c4307005ca5c5820
commit: 3eee73ad42c3899d97e073bf2c41e7670a3c575c platform/x86: x86-android-tablets: Add Lenovo Yoga Tablet 2 Pro 1380F/L data
date: 6 months ago
config: x86_64-randconfig-r133-20241015 (https://download.01.org/0day-ci/archive/20241016/202410160432.oJAPbrW9-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241016/202410160432.oJAPbrW9-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410160432.oJAPbrW9-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/x86-android-tablets/lenovo.c:604:30: sparse: sparse: symbol 'lenovo_yoga_tab2_1380_bq24190_pdata' was not declared. Should it be static?
>> drivers/platform/x86/x86-android-tablets/lenovo.c:729:12: sparse: sparse: symbol 'lenovo_yoga_tab2_1380_modules' was not declared. Should it be static?
drivers/platform/x86/x86-android-tablets/lenovo.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +/lenovo_yoga_tab2_1380_bq24190_pdata +604 drivers/platform/x86/x86-android-tablets/lenovo.c

603
> 604 struct bq24190_platform_data lenovo_yoga_tab2_1380_bq24190_pdata = {
605 .regulator_init_data = &lenovo_yoga_tab2_1380_bq24190_vbus_init_data,
606 };
607
608 static const struct property_entry lenovo_yoga_tab2_1380_lc824206xa_props[] = {
609 PROPERTY_ENTRY_BOOL("onnn,enable-miclr-for-dcp"),
610 { }
611 };
612
613 static const struct software_node lenovo_yoga_tab2_1380_lc824206xa_node = {
614 .properties = lenovo_yoga_tab2_1380_lc824206xa_props,
615 };
616
617 static const char * const lenovo_yoga_tab2_1380_lms303d_mount_matrix[] = {
618 "0", "-1", "0",
619 "-1", "0", "0",
620 "0", "0", "1"
621 };
622
623 static const struct property_entry lenovo_yoga_tab2_1380_lms303d_props[] = {
624 PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", lenovo_yoga_tab2_1380_lms303d_mount_matrix),
625 { }
626 };
627
628 static const struct software_node lenovo_yoga_tab2_1380_lms303d_node = {
629 .properties = lenovo_yoga_tab2_1380_lms303d_props,
630 };
631
632 static const struct x86_i2c_client_info lenovo_yoga_tab2_1380_i2c_clients[] __initconst = {
633 {
634 /* BQ27541 fuel-gauge */
635 .board_info = {
636 .type = "bq27541",
637 .addr = 0x55,
638 .dev_name = "bq27541",
639 .swnode = &fg_bq24190_supply_node,
640 },
641 .adapter_path = "\\_SB_.I2C1",
642 }, {
643 /* bq24292i battery charger */
644 .board_info = {
645 .type = "bq24190",
646 .addr = 0x6b,
647 .dev_name = "bq24292i",
648 .swnode = &lenovo_yoga_tab2_1380_bq24190_node,
649 .platform_data = &lenovo_yoga_tab2_1380_bq24190_pdata,
650 },
651 .adapter_path = "\\_SB_.I2C1",
652 .irq_data = {
653 .type = X86_ACPI_IRQ_TYPE_GPIOINT,
654 .chip = "INT33FC:02",
655 .index = 2,
656 .trigger = ACPI_EDGE_SENSITIVE,
657 .polarity = ACPI_ACTIVE_HIGH,
658 .con_id = "bq24292i_irq",
659 },
660 }, {
661 /* LP8557 Backlight controller */
662 .board_info = {
663 .type = "lp8557",
664 .addr = 0x2c,
665 .dev_name = "lp8557",
666 .platform_data = &lenovo_lp8557_pwm_and_reg_pdata,
667 },
668 .adapter_path = "\\_SB_.I2C3",
669 }, {
670 /* LC824206XA Micro USB Switch */
671 .board_info = {
672 .type = "lc824206xa",
673 .addr = 0x48,
674 .dev_name = "lc824206xa",
675 .swnode = &lenovo_yoga_tab2_1380_lc824206xa_node,
676 },
677 .adapter_path = "\\_SB_.I2C3",
678 .irq_data = {
679 .type = X86_ACPI_IRQ_TYPE_GPIOINT,
680 .chip = "INT33FC:02",
681 .index = 1,
682 .trigger = ACPI_LEVEL_SENSITIVE,
683 .polarity = ACPI_ACTIVE_LOW,
684 .con_id = "lc824206xa_irq",
685 },
686 }, {
687 /* AL3320A ambient light sensor */
688 .board_info = {
689 .type = "al3320a",
690 .addr = 0x1c,
691 .dev_name = "al3320a",
692 },
693 .adapter_path = "\\_SB_.I2C5",
694 }, {
695 /* LSM303DA accelerometer + magnetometer */
696 .board_info = {
697 .type = "lsm303d",
698 .addr = 0x1d,
699 .dev_name = "lsm303d",
700 .swnode = &lenovo_yoga_tab2_1380_lms303d_node,
701 },
702 .adapter_path = "\\_SB_.I2C5",
703 }, {
704 /* Synaptics RMI touchscreen */
705 .board_info = {
706 .type = "rmi4_i2c",
707 .addr = 0x38,
708 .dev_name = "rmi4_i2c",
709 .platform_data = &lenovo_yoga_tab2_830_1050_rmi_pdata,
710 },
711 .adapter_path = "\\_SB_.I2C6",
712 .irq_data = {
713 .type = X86_ACPI_IRQ_TYPE_APIC,
714 .index = 0x45,
715 .trigger = ACPI_EDGE_SENSITIVE,
716 .polarity = ACPI_ACTIVE_HIGH,
717 },
718 }
719 };
720
721 static const struct platform_device_info lenovo_yoga_tab2_1380_pdevs[] __initconst = {
722 {
723 /* For the Tablet 2 Pro 1380's custom fast charging driver */
724 .name = "lenovo-yoga-tab2-pro-1380-fastcharger",
725 .id = PLATFORM_DEVID_NONE,
726 },
727 };
728
> 729 const char * const lenovo_yoga_tab2_1380_modules[] __initconst = {
730 "bq24190_charger", /* For the Vbus regulator for lc824206xa */
731 NULL
732 };
733

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