[jpirko-mlxsw:jiri_devel_linecards 13/56] drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:744:19: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int'
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head: f53503fb3489103cf72bc705b0e49e4853e5d485
commit: 53d54437e55ccd600a39e5dd5227d163b3ead000 [13/56] mlxsw: core_linecards: Add line card objects and implement provisioning
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220116/202201160519.bgz5nnMA-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
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
# https://github.com/jpirko/linux_mlxsw/commit/53d54437e55ccd600a39e5dd5227...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
git checkout 53d54437e55ccd600a39e5dd5227d163b3ead000
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/block/rnbd/ drivers/net/ethernet/mellanox/mlxsw/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:425:26: warning: variable 'linecards' set but not used [-Wunused-but-set-variable]
struct mlxsw_linecards *linecards;
^
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:744:21: error: implicit declaration of function 'vmalloc' [-Werror,-Wimplicit-function-declaration]
types_info->data = vmalloc(types_info->data_size);
^
>> drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:744:19: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
types_info->data = vmalloc(types_info->data_size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:772:2: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration]
vfree(types_info->data);
^
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:783:2: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration]
vfree(types_info->data);
^
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:806:14: error: implicit declaration of function 'vzalloc' [-Werror,-Wimplicit-function-declaration]
linecards = vzalloc(struct_size(linecards, linecards, slot_count));
^
>> drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:806:12: warning: incompatible integer to pointer conversion assigning to 'struct mlxsw_linecards *' from 'int' [-Wint-conversion]
linecards = vzalloc(struct_size(linecards, linecards, slot_count));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:842:2: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration]
vfree(linecards);
^
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c:860:2: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration]
vfree(linecards);
^
3 warnings and 6 errors generated.
vim +744 drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
717
718 static int mlxsw_linecard_types_init(struct mlxsw_core *mlxsw_core,
719 struct mlxsw_linecards *linecards)
720 {
721 struct mlxsw_linecard_types_info *types_info;
722 const char *lc_ini_bundle_filename;
723 const struct firmware *firmware;
724 int err;
725
726 lc_ini_bundle_filename = mlxsw_core_lc_ini_bundle_filename(mlxsw_core);
727 if (!lc_ini_bundle_filename)
728 return 0;
729
730 err = request_firmware_direct(&firmware, lc_ini_bundle_filename,
731 linecards->bus_info->dev);
732 if (err) {
733 dev_warn(linecards->bus_info->dev, "Could not request linecards INI file \"%s\", provisioning will not be possible\n",
734 lc_ini_bundle_filename);
735 return 0;
736 }
737
738 types_info = kzalloc(sizeof(*types_info), GFP_KERNEL);
739 if (!types_info)
740 return -ENOMEM;
741 linecards->types_info = types_info;
742
743 types_info->data_size = firmware->size;
> 744 types_info->data = vmalloc(types_info->data_size);
745 if (!types_info->data) {
746 err = -ENOMEM;
747 goto err_data_alloc;
748 }
749 memcpy(types_info->data, firmware->data, types_info->data_size);
750 release_firmware(firmware);
751
752 err = mlxsw_linecard_types_file_validate(linecards, types_info);
753 if (err) {
754 err = 0;
755 goto err_type_file_file_validate;
756 }
757
758 types_info->ini_files = kmalloc_array(types_info->count,
759 sizeof(struct mlxsw_linecard_ini_file),
760 GFP_KERNEL);
761 if (!types_info->ini_files) {
762 err = -ENOMEM;
763 goto err_ini_files_alloc;
764 }
765
766 mlxsw_linecard_types_file_parse(types_info);
767
768 return 0;
769
770 err_ini_files_alloc:
771 err_type_file_file_validate:
> 772 vfree(types_info->data);
773 err_data_alloc:
774 kfree(types_info);
775 return err;
776 }
777
778 static void mlxsw_linecard_types_fini(struct mlxsw_linecards *linecards)
779 {
780 struct mlxsw_linecard_types_info *types_info = linecards->types_info;
781
782 kfree(types_info->ini_files);
783 vfree(types_info->data);
784 kfree(types_info);
785 }
786
787 int mlxsw_linecards_init(struct mlxsw_core *mlxsw_core,
788 const struct mlxsw_bus_info *bus_info)
789 {
790 char mgpir_pl[MLXSW_REG_MGPIR_LEN];
791 struct mlxsw_linecards *linecards;
792 u8 slot_count;
793 int err;
794 int i;
795
796 mlxsw_reg_mgpir_pack(mgpir_pl, 0);
797 err = mlxsw_reg_query(mlxsw_core, MLXSW_REG(mgpir), mgpir_pl);
798 if (err)
799 return err;
800
801 mlxsw_reg_mgpir_unpack(mgpir_pl, NULL, NULL, NULL,
802 NULL, &slot_count);
803 if (!slot_count)
804 return 0;
805
> 806 linecards = vzalloc(struct_size(linecards, linecards, slot_count));
807 if (!linecards)
808 return -ENOMEM;
809 linecards->count = slot_count;
810 linecards->mlxsw_core = mlxsw_core;
811 linecards->bus_info = bus_info;
812
813 err = mlxsw_linecard_types_init(mlxsw_core, linecards);
814 if (err)
815 goto err_types_init;
816
817 err = mlxsw_core_traps_register(mlxsw_core, mlxsw_linecard_listener,
818 ARRAY_SIZE(mlxsw_linecard_listener),
819 mlxsw_core);
820 if (err)
821 goto err_traps_register;
822
823 mlxsw_core_linecards_set(mlxsw_core, linecards);
824
825 for (i = 0; i < linecards->count; i++) {
826 err = mlxsw_linecard_init(mlxsw_core, linecards, i + 1);
827 if (err)
828 goto err_linecard_init;
829 }
830
831 return 0;
832
833 err_linecard_init:
834 for (i--; i >= 0; i--)
835 mlxsw_linecard_fini(mlxsw_core, linecards, i + 1);
836 mlxsw_core_traps_unregister(mlxsw_core, mlxsw_linecard_listener,
837 ARRAY_SIZE(mlxsw_linecard_listener),
838 mlxsw_core);
839 err_traps_register:
840 mlxsw_linecard_types_fini(linecards);
841 err_types_init:
842 vfree(linecards);
843
844 return err;
845 }
846
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[ojeda-linux:doc 955/959] init/Kconfig:2084: syntax error
by kernel test robot
tree: https://github.com/ojeda/linux.git doc
head: 2fc4925b38062461996c9ae2bdf227d1383117ce
commit: cf009425efb0d9533b5bf09ebd304b938e4e5dc2 [955/959] rust: rework Rust toolchain detection
config: microblaze-buildonly-randconfig-r005-20220116
compiler: microblaze-linux-gcc (GCC) 11.2.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
# https://github.com/ojeda/linux/commit/cf009425efb0d9533b5bf09ebd304b938e4...
git remote add ojeda-linux https://github.com/ojeda/linux.git
git fetch --no-tags ojeda-linux doc
git checkout cf009425efb0d9533b5bf09ebd304b938e4e5dc2
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze buildonly-randconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
error: no override and no default toolchain set
>> init/Kconfig:2084: syntax error
init/Kconfig:2083: invalid statement
>> sh: 1: bindgen: not found
init/Kconfig:2089: syntax error
init/Kconfig:2088: invalid statement
make[2]: *** [scripts/kconfig/Makefile:77: oldconfig] Error 1
make[1]: *** [Makefile:666: oldconfig] Error 2
make: *** [Makefile:226: __sub-make] Error 2
make: Target 'oldconfig' not remade because of errors.
--
error: no override and no default toolchain set
>> init/Kconfig:2084: syntax error
init/Kconfig:2083: invalid statement
>> sh: 1: bindgen: not found
init/Kconfig:2089: syntax error
init/Kconfig:2088: invalid statement
make[2]: *** [scripts/kconfig/Makefile:77: olddefconfig] Error 1
make[1]: *** [Makefile:666: olddefconfig] Error 2
make: *** [Makefile:226: __sub-make] Error 2
make: Target 'olddefconfig' not remade because of errors.
vim +2084 init/Kconfig
1944
1945 config SLAB_MERGE_DEFAULT
1946 bool "Allow slab caches to be merged"
1947 default y
1948 help
1949 For reduced kernel memory fragmentation, slab caches can be
1950 merged when they share the same size and other characteristics.
1951 This carries a risk of kernel heap overflows being able to
1952 overwrite objects from merged caches (and more easily control
1953 cache layout), which makes such heap attacks easier to exploit
1954 by attackers. By keeping caches unmerged, these kinds of exploits
1955 can usually only damage objects in the same cache. To disable
1956 merging at runtime, "slab_nomerge" can be passed on the kernel
1957 command line.
1958
1959 config SLAB_FREELIST_RANDOM
1960 bool "Randomize slab freelist"
1961 depends on SLAB || SLUB
1962 help
1963 Randomizes the freelist order used on creating new pages. This
1964 security feature reduces the predictability of the kernel slab
1965 allocator against heap overflows.
1966
1967 config SLAB_FREELIST_HARDENED
1968 bool "Harden slab freelist metadata"
1969 depends on SLAB || SLUB
1970 help
1971 Many kernel heap attacks try to target slab cache metadata and
1972 other infrastructure. This options makes minor performance
1973 sacrifices to harden the kernel slab allocator against common
1974 freelist exploit methods. Some slab implementations have more
1975 sanity-checking than others. This option is most effective with
1976 CONFIG_SLUB.
1977
1978 config SHUFFLE_PAGE_ALLOCATOR
1979 bool "Page allocator randomization"
1980 default SLAB_FREELIST_RANDOM && ACPI_NUMA
1981 help
1982 Randomization of the page allocator improves the average
1983 utilization of a direct-mapped memory-side-cache. See section
1984 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
1985 6.2a specification for an example of how a platform advertises
1986 the presence of a memory-side-cache. There are also incidental
1987 security benefits as it reduces the predictability of page
1988 allocations to compliment SLAB_FREELIST_RANDOM, but the
1989 default granularity of shuffling on the "MAX_ORDER - 1" i.e,
1990 10th order of pages is selected based on cache utilization
1991 benefits on x86.
1992
1993 While the randomization improves cache utilization it may
1994 negatively impact workloads on platforms without a cache. For
1995 this reason, by default, the randomization is enabled only
1996 after runtime detection of a direct-mapped memory-side-cache.
1997 Otherwise, the randomization may be force enabled with the
1998 'page_alloc.shuffle' kernel command line parameter.
1999
2000 Say Y if unsure.
2001
2002 config SLUB_CPU_PARTIAL
2003 default y
2004 depends on SLUB && SMP
2005 bool "SLUB per cpu partial cache"
2006 help
2007 Per cpu partial caches accelerate objects allocation and freeing
2008 that is local to a processor at the price of more indeterminism
2009 in the latency of the free. On overflow these caches will be cleared
2010 which requires the taking of locks that may cause latency spikes.
2011 Typically one would choose no for a realtime system.
2012
2013 config MMAP_ALLOW_UNINITIALIZED
2014 bool "Allow mmapped anonymous memory to be uninitialized"
2015 depends on EXPERT && !MMU
2016 default n
2017 help
2018 Normally, and according to the Linux spec, anonymous memory obtained
2019 from mmap() has its contents cleared before it is passed to
2020 userspace. Enabling this config option allows you to request that
2021 mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
2022 providing a huge performance boost. If this option is not enabled,
2023 then the flag will be ignored.
2024
2025 This is taken advantage of by uClibc's malloc(), and also by
2026 ELF-FDPIC binfmt's brk and stack allocator.
2027
2028 Because of the obvious security issues, this option should only be
2029 enabled on embedded devices where you control what is run in
2030 userspace. Since that isn't generally a problem on no-MMU systems,
2031 it is normally safe to say Y here.
2032
2033 See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
2034
2035 config SYSTEM_DATA_VERIFICATION
2036 def_bool n
2037 select SYSTEM_TRUSTED_KEYRING
2038 select KEYS
2039 select CRYPTO
2040 select CRYPTO_RSA
2041 select ASYMMETRIC_KEY_TYPE
2042 select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2043 select ASN1
2044 select OID_REGISTRY
2045 select X509_CERTIFICATE_PARSER
2046 select PKCS7_MESSAGE_PARSER
2047 help
2048 Provide PKCS#7 message verification using the contents of the system
2049 trusted keyring to provide public keys. This then can be used for
2050 module verification, kexec image verification and firmware blob
2051 verification.
2052
2053 config PROFILING
2054 bool "Profiling support"
2055 help
2056 Say Y here to enable the extended profiling support mechanisms used
2057 by profilers.
2058
2059 config RUST
2060 bool "Rust support"
2061 depends on RUST_IS_AVAILABLE
2062 depends on ARM64 || CPU_32v6 || CPU_32v6K || (PPC64 && CPU_LITTLE_ENDIAN) || X86_64 || RISCV
2063 depends on !COMPILE_TEST
2064 depends on !MODVERSIONS
2065 depends on !GCC_PLUGIN_RANDSTRUCT
2066 default n
2067 help
2068 Enables Rust support in the kernel.
2069
2070 This allows other Rust-related options, like drivers written in Rust,
2071 to be selected.
2072
2073 It is also required to be able to load external kernel modules
2074 written in Rust.
2075
2076 See Documentation/rust/ for more information.
2077
2078 If unsure, say N.
2079
2080 config RUSTC_VERSION_TEXT
2081 depends on RUST
2082 string
2083 default $(shell,$(RUSTC) --version)
> 2084
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[freescale-fslc:pr/521 6296/9999] drivers/gpu/drm/bridge/it6161.c:2798:31: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'?
by kernel test robot
Hi Sandor,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/521
head: e1200a7e26459892adfac6cb313bd8458b21fa95
commit: a10ae796897faee61308958f1497c7948a2165d4 [6296/9999] LF-4229-1: drm: bridge: it6161: add enable gpio
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20220116/202201160411.Ft6GbgO5-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.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
# https://github.com/Freescale/linux-fslc/commit/a10ae796897faee61308958f14...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/521
git checkout a10ae796897faee61308958f1497c7948a2165d4
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/ioport.h:13,
from include/linux/acpi.h:12,
from include/linux/i2c.h:13,
from include/drm/drm_crtc.h:28,
from include/drm/drm_atomic_helper.h:31,
from drivers/gpu/drm/bridge/it6161.c:5:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:50: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'it6161_hdmi_tx_abort_ddc':
drivers/gpu/drm/bridge/it6161.c:841:22: warning: variable 'ddc_master' set but not used [-Wunused-but-set-variable]
841 | u8 sw_reset, ddc_master, retry = 2;
| ^~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: At top level:
drivers/gpu/drm/bridge/it6161.c:1372:5: warning: no previous prototype for 'hdmi_tx_calc_pclk' [-Wmissing-prototypes]
1372 | u32 hdmi_tx_calc_pclk(struct it6161 *it6161)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'hdmi_tx_get_display_mode':
drivers/gpu/drm/bridge/it6161.c:1429:33: warning: variable 'display_mode' set but not used [-Wunused-but-set-variable]
1429 | struct drm_display_mode display_mode;
| ^~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'setHDMITX_NLPCMAudio':
drivers/gpu/drm/bridge/it6161.c:1833:25: warning: variable 'AudioFormat' set but not used [-Wunused-but-set-variable]
1833 | u8 AudioEnable, AudioFormat;
| ^~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'mipi_rx_prec_get_display_mode':
drivers/gpu/drm/bridge/it6161.c:2361:39: warning: variable 'p_vback_porch' set but not used [-Wunused-but-set-variable]
2361 | int p_vfront_porch, p_vsyncw, p_vback_porch, p_vactive, p_vtotal;
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c:2360:39: warning: variable 'p_hback_porch' set but not used [-Wunused-but-set-variable]
2360 | int p_hfront_porch, p_hsyncw, p_hback_porch, p_hactive, p_htotal;
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'it6161_i2c_probe':
>> drivers/gpu/drm/bridge/it6161.c:2798:31: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration]
2798 | it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
| ^~~~~~~~~~~~~~~~~~~~~~~
| devm_regulator_get_optional
>> drivers/gpu/drm/bridge/it6161.c:2798:70: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)
2798 | it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c:2798:70: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/bridge/it6161.c:2802:17: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
2802 | gpiod_set_value_cansleep(it6161->enable_gpio, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +2798 drivers/gpu/drm/bridge/it6161.c
2753
2754 static int it6161_i2c_probe(struct i2c_client *i2c_mipi_rx,
2755 const struct i2c_device_id *id)
2756 {
2757 struct device *dev = &i2c_mipi_rx->dev;
2758 int err, intp_irq;
2759
2760 it6161 = devm_kzalloc(dev, sizeof(*it6161), GFP_KERNEL);
2761 if (!it6161)
2762 return -ENOMEM;
2763
2764 it6161->i2c_mipi_rx = i2c_mipi_rx;
2765 mutex_init(&it6161->mode_lock);
2766
2767 it6161->bridge.of_node = i2c_mipi_rx->dev.of_node;
2768
2769 it6161_parse_dt(it6161, dev->of_node);
2770 it6161->regmap_mipi_rx = devm_regmap_init_i2c(i2c_mipi_rx, &it6161_mipi_rx_bridge_regmap_config);
2771 if (IS_ERR(it6161->regmap_mipi_rx)) {
2772 DRM_DEV_ERROR(dev, "regmap_mipi_rx i2c init failed");
2773 return PTR_ERR(it6161->regmap_mipi_rx);
2774 }
2775
2776 if (device_property_read_u32(dev, "it6161-addr-hdmi-tx", &it6161->it6161_addr_hdmi_tx) < 0)
2777 it6161->it6161_addr_hdmi_tx = 0x4C;
2778 it6161->i2c_hdmi_tx = i2c_new_dummy_device(i2c_mipi_rx->adapter, it6161->it6161_addr_hdmi_tx);
2779 it6161->regmap_hdmi_tx = devm_regmap_init_i2c(it6161->i2c_hdmi_tx, &it6161_hdmi_tx_bridge_regmap_config);
2780 if (IS_ERR(it6161->regmap_hdmi_tx)) {
2781 DRM_DEV_ERROR(dev, "regmap_hdmi_tx i2c init failed");
2782 return PTR_ERR(it6161->regmap_mipi_rx);
2783 }
2784
2785 if (device_property_read_u32(dev, "it6161-addr-cec", &it6161->it6161_addr_cec) < 0)
2786 it6161->it6161_addr_cec = 0x4E;
2787 it6161->i2c_cec = i2c_new_dummy_device(i2c_mipi_rx->adapter, it6161->it6161_addr_cec);
2788 it6161->regmap_cec = devm_regmap_init_i2c(it6161->i2c_cec, &it6161_cec_bridge_regmap_config);
2789 if (IS_ERR(it6161->regmap_cec)) {
2790 DRM_DEV_ERROR(dev, "regmap_cec i2c init failed");
2791 return PTR_ERR(it6161->regmap_cec);
2792 }
2793
2794 if (!it6161_check_device_ready(it6161))
2795 return -ENODEV;
2796
2797 /* The enable GPIO is optional. */
> 2798 it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
2799 if (IS_ERR(it6161->enable_gpio))
2800 DRM_DEV_INFO(dev, "No enable GPIO");
2801 else
> 2802 gpiod_set_value_cansleep(it6161->enable_gpio, 1);
2803
2804 it6161->enable_drv_hold = DEFAULT_DRV_HOLD;
2805 it6161_set_interrupts_active_level(HIGH);
2806
2807 intp_irq = i2c_mipi_rx->irq;
2808
2809 if (!intp_irq) {
2810 DRM_DEV_ERROR(dev, "it6112 failed to get INTP IRQ");
2811 return -ENODEV;
2812 }
2813
2814 err = devm_request_threaded_irq(&i2c_mipi_rx->dev, intp_irq, NULL,
2815 it6161_intp_threaded_handler,
2816 IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "it6161-intp", it6161);
2817 if (err) {
2818 DRM_DEV_ERROR(dev, "it6112 failed to request INTP threaded IRQ: %d", err);
2819 return err;
2820 }
2821
2822 i2c_set_clientdata(i2c_mipi_rx, it6161);
2823 it6161->bridge.funcs = &it6161_bridge_funcs;
2824 it6161->bridge.of_node = i2c_mipi_rx->dev.of_node;
2825 it6161->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
2826 DRM_BRIDGE_OP_HPD | DRM_BRIDGE_OP_MODES;
2827 it6161->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
2828
2829 drm_bridge_add(&it6161->bridge);
2830
2831 err = sysfs_create_files(&i2c_mipi_rx->dev.kobj, it6161_attrs);
2832 if (err)
2833 return err;
2834
2835 return 0;
2836 }
2837
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[mingo-tip:sched/headers 2040/2384] arch/mips/kernel/vpe-mt.c:322:21: error: variable has incomplete type 'struct class'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: abe1ece6c06895bf5e7c8f03d10061f5712d8326 [2040/2384] headers/deps: dev/core: Optimize <linux/device.h> dependencies, remove <linux/device_api.h> inclusion
config: mips-maltaaprp_defconfig (https://download.01.org/0day-ci/archive/20220116/202201160353.tvHYOOaJ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 650fc40b6d8d9a5869b4fca525d5f237b0ee2803)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=...
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout abe1ece6c06895bf5e7c8f03d10061f5712d8326
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/mips/kernel/vpe-mt.c:9:
include/linux/fs_api.h:35:19: error: expected ';' after top level declarator
extern void __init inode_init(void);
^
;
include/linux/fs_api.h:36:19: error: expected ';' after top level declarator
extern void __init inode_init_early(void);
^
;
include/linux/fs_api.h:37:19: error: expected ';' after top level declarator
extern void __init files_init(void);
^
;
include/linux/fs_api.h:38:19: error: expected ';' after top level declarator
extern void __init files_maxfiles_init(void);
^
;
include/linux/fs_api.h:1247:19: error: expected ';' after top level declarator
extern void __init vfs_caches_init_early(void);
^
;
include/linux/fs_api.h:1248:19: error: expected ';' after top level declarator
extern void __init vfs_caches_init(void);
^
;
include/linux/fs_api.h:2042:5: error: redefinition of '__init' with a different type: 'int' vs 'void'
int __init list_bdev_fs_names(char *buf, size_t size);
^
include/linux/fs_api.h:1248:13: note: previous declaration is here
extern void __init vfs_caches_init(void);
^
include/linux/fs_api.h:2042:11: error: expected ';' after top level declarator
int __init list_bdev_fs_names(char *buf, size_t size);
^
;
arch/mips/kernel/vpe-mt.c:181:7: warning: no previous prototype for function 'vpe_alloc' [-Wmissing-prototypes]
void *vpe_alloc(void)
^
arch/mips/kernel/vpe-mt.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void *vpe_alloc(void)
^
static
arch/mips/kernel/vpe-mt.c:199:5: warning: no previous prototype for function 'vpe_start' [-Wmissing-prototypes]
int vpe_start(void *vpe, unsigned long start)
^
arch/mips/kernel/vpe-mt.c:199:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_start(void *vpe, unsigned long start)
^
static
arch/mips/kernel/vpe-mt.c:209:5: warning: no previous prototype for function 'vpe_stop' [-Wmissing-prototypes]
int vpe_stop(void *vpe)
^
arch/mips/kernel/vpe-mt.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_stop(void *vpe)
^
static
arch/mips/kernel/vpe-mt.c:230:5: warning: no previous prototype for function 'vpe_free' [-Wmissing-prototypes]
int vpe_free(void *vpe)
^
arch/mips/kernel/vpe-mt.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vpe_free(void *vpe)
^
static
>> arch/mips/kernel/vpe-mt.c:322:21: error: variable has incomplete type 'struct class'
static struct class vpe_class = {
^
include/linux/device_types.h:29:8: note: forward declaration of 'struct class'
struct class;
^
>> arch/mips/kernel/vpe-mt.c:364:8: error: implicit declaration of function 'class_register' [-Werror,-Wimplicit-function-declaration]
err = class_register(&vpe_class);
^
>> arch/mips/kernel/vpe-mt.c:503:2: error: implicit declaration of function 'class_unregister' [-Werror,-Wimplicit-function-declaration]
class_unregister(&vpe_class);
^
arch/mips/kernel/vpe-mt.c:503:2: note: did you mean 'class_register'?
arch/mips/kernel/vpe-mt.c:364:8: note: 'class_register' declared here
err = class_register(&vpe_class);
^
arch/mips/kernel/vpe-mt.c:516:2: error: implicit declaration of function 'class_unregister' [-Werror,-Wimplicit-function-declaration]
class_unregister(&vpe_class);
^
4 warnings and 12 errors generated.
vim +322 arch/mips/kernel/vpe-mt.c
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 321
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @322 static struct class vpe_class = {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 323 .name = "vpe",
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 324 .owner = THIS_MODULE,
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 325 .dev_release = vpe_device_release,
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 326 .dev_groups = vpe_groups,
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 327 };
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 328
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 329 static struct device vpe_device;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 330
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 331 int __init vpe_module_init(void)
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 332 {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 333 unsigned int mtflags, vpflags;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 334 unsigned long flags, val;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 335 struct vpe *v = NULL;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 336 struct tc *t;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 337 int tc, err;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 338
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 339 if (!cpu_has_mipsmt) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 340 pr_warn("VPE loader: not a MIPS MT capable processor\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 341 return -ENODEV;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 342 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 343
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 344 if (vpelimit == 0) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 345 pr_warn("No VPEs reserved for AP/SP, not initialize VPE loader\n"
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 346 "Pass maxvpes=<n> argument as kernel argument\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 347
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 348 return -ENODEV;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 349 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 350
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 351 if (aprp_cpu_index() == 0) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 352 pr_warn("No TCs reserved for AP/SP, not initialize VPE loader\n"
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 353 "Pass maxtcs=<n> argument as kernel argument\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 354
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 355 return -ENODEV;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 356 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 357
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 358 major = register_chrdev(0, VPE_MODULE_NAME, &vpe_fops);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 359 if (major < 0) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 360 pr_warn("VPE loader: unable to register character device\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 361 return major;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 362 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 363
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @364 err = class_register(&vpe_class);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 365 if (err) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 366 pr_err("vpe_class registration failed\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 367 goto out_chrdev;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 368 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 369
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 370 device_initialize(&vpe_device);
3a845b30bc43d7 Zheng Yongjun 2020-12-16 371 vpe_device.class = &vpe_class;
3a845b30bc43d7 Zheng Yongjun 2020-12-16 372 vpe_device.parent = NULL;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 373 dev_set_name(&vpe_device, "vpe1");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 374 vpe_device.devt = MKDEV(major, VPE_MODULE_MINOR);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 375 err = device_add(&vpe_device);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 376 if (err) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 377 pr_err("Adding vpe_device failed\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 378 goto out_class;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 379 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 380
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 381 local_irq_save(flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 382 mtflags = dmt();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 383 vpflags = dvpe();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 384
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 385 /* Put MVPE's into 'configuration state' */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 386 set_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 387
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 388 val = read_c0_mvpconf0();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 389 hw_tcs = (val & MVPCONF0_PTC) + 1;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 390 hw_vpes = ((val & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 391
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 392 for (tc = aprp_cpu_index(); tc < hw_tcs; tc++) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 393 /*
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 394 * Must re-enable multithreading temporarily or in case we
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 395 * reschedule send IPIs or similar we might hang.
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 396 */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 397 clear_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 398 evpe(vpflags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 399 emt(mtflags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 400 local_irq_restore(flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 401 t = alloc_tc(tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 402 if (!t) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 403 err = -ENOMEM;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 404 goto out_dev;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 405 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 406
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 407 local_irq_save(flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 408 mtflags = dmt();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 409 vpflags = dvpe();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 410 set_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 411
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 412 /* VPE's */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 413 if (tc < hw_tcs) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 414 settc(tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 415
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 416 v = alloc_vpe(tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 417 if (v == NULL) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 418 pr_warn("VPE: unable to allocate VPE\n");
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 419 goto out_reenable;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 420 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 421
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 422 v->ntcs = hw_tcs - aprp_cpu_index();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 423
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 424 /* add the tc to the list of this vpe's tc's. */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 425 list_add(&t->tc, &v->tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 426
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 427 /* deactivate all but vpe0 */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 428 if (tc >= aprp_cpu_index()) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 429 unsigned long tmp = read_vpe_c0_vpeconf0();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 430
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 431 tmp &= ~VPECONF0_VPA;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 432
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 433 /* master VPE */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 434 tmp |= VPECONF0_MVP;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 435 write_vpe_c0_vpeconf0(tmp);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 436 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 437
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 438 /* disable multi-threading with TC's */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 439 write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() &
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 440 ~VPECONTROL_TE);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 441
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 442 if (tc >= vpelimit) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 443 /*
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 444 * Set config to be the same as vpe0,
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 445 * particularly kseg0 coherency alg
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 446 */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 447 write_vpe_c0_config(read_c0_config());
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 448 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 449 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 450
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 451 /* TC's */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 452 t->pvpe = v; /* set the parent vpe */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 453
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 454 if (tc >= aprp_cpu_index()) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 455 unsigned long tmp;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 456
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 457 settc(tc);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 458
b633648c5ad3cf Ralf Baechle 2014-05-23 459 /*
b633648c5ad3cf Ralf Baechle 2014-05-23 460 * A TC that is bound to any other VPE gets bound to
b633648c5ad3cf Ralf Baechle 2014-05-23 461 * VPE0, ideally I'd like to make it homeless but it
b633648c5ad3cf Ralf Baechle 2014-05-23 462 * doesn't appear to let me bind a TC to a non-existent
b633648c5ad3cf Ralf Baechle 2014-05-23 463 * VPE. Which is perfectly reasonable.
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 464 *
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 465 * The (un)bound state is visible to an EJTAG probe so
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 466 * may notify GDB...
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 467 */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 468 tmp = read_tc_c0_tcbind();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 469 if (tmp & TCBIND_CURVPE) {
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 470 /* tc is bound >vpe0 */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 471 write_tc_c0_tcbind(tmp & ~TCBIND_CURVPE);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 472
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 473 t->pvpe = get_vpe(0); /* set the parent vpe */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 474 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 475
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 476 /* halt the TC */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 477 write_tc_c0_tchalt(TCHALT_H);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 478 mips_ihb();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 479
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 480 tmp = read_tc_c0_tcstatus();
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 481
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 482 /* mark not activated and not dynamically allocatable */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 483 tmp &= ~(TCSTATUS_A | TCSTATUS_DA);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 484 tmp |= TCSTATUS_IXMT; /* interrupt exempt */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 485 write_tc_c0_tcstatus(tmp);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 486 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 487 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 488
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 489 out_reenable:
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 490 /* release config state */
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 491 clear_c0_mvpcontrol(MVPCONTROL_VPC);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 492
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 493 evpe(vpflags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 494 emt(mtflags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 495 local_irq_restore(flags);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 496
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 497 return 0;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 498
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 499 out_dev:
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 500 device_del(&vpe_device);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 501
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 502 out_class:
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 @503 class_unregister(&vpe_class);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 504
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 505 out_chrdev:
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 506 unregister_chrdev(major, VPE_MODULE_NAME);
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 507
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 508 return err;
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 509 }
1a2a6d7e8816ed Dengcheng Zhu 2013-10-30 510
:::::: The code at line 322 was first introduced by commit
:::::: 1a2a6d7e8816ed2b2679a0c4f7ba4019cd31dd62 MIPS: APRP: Split VPE loader into separate files.
:::::: TO: Deng-Cheng Zhu <dengcheng.zhu(a)imgtec.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
Re: [PATCH v2 1/3] iio: dac: add support for ltc2688
by kernel test robot
Hi "Nuno,
I love your patch! Yet something to improve:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on robh/for-next linus/master v5.16 next-20220115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Nuno-S/Add-support-for-LTC2688/2...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220116/202201160237.Mxs5GYw3-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/d91bcc420e0c6077053e559f676fa4ae7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nuno-S/Add-support-for-LTC2688/20220115-172930
git checkout d91bcc420e0c6077053e559f676fa4ae76114ba5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/iio/dac/ltc2688.c:590:18: error: initialization of 'ssize_t (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'long int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:604:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
604 | LTC2688_CHAN_EXT_INFO("toggle_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ltc2688.c:590:18: note: (near initialization for 'ltc2688_toggle_sym_ext_info[2].write')
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:604:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
604 | LTC2688_CHAN_EXT_INFO("toggle_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ltc2688.c:590:18: error: initialization of 'ssize_t (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'long int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:619:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
619 | LTC2688_CHAN_EXT_INFO("toggle_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ltc2688.c:590:18: note: (near initialization for 'ltc2688_toggle_ext_info[2].write')
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:619:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
619 | LTC2688_CHAN_EXT_INFO("toggle_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ltc2688.c:590:18: error: initialization of 'ssize_t (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'long int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:639:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
639 | LTC2688_CHAN_EXT_INFO("dither_frequency", 0, IIO_SEPARATE,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ltc2688.c:590:18: note: (near initialization for 'ltc2688_dither_ext_info[3].write')
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:639:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
639 | LTC2688_CHAN_EXT_INFO("dither_frequency", 0, IIO_SEPARATE,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ltc2688.c:590:18: error: initialization of 'ssize_t (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'long int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:641:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
641 | LTC2688_CHAN_EXT_INFO("dither_frequency_available",
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ltc2688.c:590:18: note: (near initialization for 'ltc2688_dither_ext_info[4].write')
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:641:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
641 | LTC2688_CHAN_EXT_INFO("dither_frequency_available",
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ltc2688.c:590:18: error: initialization of 'ssize_t (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'long int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct iio_dev *, uintptr_t, const struct iio_chan_spec *, const char *, size_t)' {aka 'int (*)(struct iio_dev *, long unsigned int, const struct iio_chan_spec *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:647:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
647 | LTC2688_CHAN_EXT_INFO("dither_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iio/dac/ltc2688.c:590:18: note: (near initialization for 'ltc2688_dither_ext_info[7].write')
590 | .write = (_write), \
| ^
drivers/iio/dac/ltc2688.c:647:9: note: in expansion of macro 'LTC2688_CHAN_EXT_INFO'
647 | LTC2688_CHAN_EXT_INFO("dither_en", LTC2688_CMD_TOGGLE_DITHER_EN,
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +590 drivers/iio/dac/ltc2688.c
586
587 #define LTC2688_CHAN_EXT_INFO(_name, _what, _shared, _read, _write) { \
588 .name = _name, \
589 .read = (_read), \
> 590 .write = (_write), \
591 .private = (_what), \
592 .shared = (_shared), \
593 }
594
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
[chenxing:msc313_mainlining 62/79] drivers/irqchip/irq-msc313-pm-wakeup.c:21:25: error: 'field_mask' redeclared as different kind of symbol
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git msc313_mainlining
head: 944e0daa939a7374dc40b73ceedb78a788fb25d4
commit: c37ce8087960dcad8436a7120a410dba3c5ded61 [62/79] irqchip: MStar wakeup intc
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220116/202201160121.tUtiMcTY-lk...)
compiler: mips-linux-gcc (GCC) 11.2.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
# https://github.com/linux-chenxing/linux/commit/c37ce8087960dcad8436a7120a...
git remote add chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags chenxing msc313_mainlining
git checkout c37ce8087960dcad8436a7120a410dba3c5ded61
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/irqchip/irq-msc313-pm-wakeup.c:21:25: error: 'field_mask' redeclared as different kind of symbol
21 | static struct reg_field field_mask = REG_FIELD(MSTAR_PMSLEEP_WAKEUPSOURCE, 0, 7);
| ^~~~~~~~~~
In file included from arch/mips/include/asm/mips-cps.h:10,
from arch/mips/include/asm/smp-ops.h:16,
from arch/mips/include/asm/smp.h:21,
from include/linux/smp.h:113,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:62,
from include/linux/irq.h:14,
from drivers/irqchip/irq-msc313-pm-wakeup.c:6:
include/linux/bitfield.h:139:28: note: previous definition of 'field_mask' with type 'u64(u64)' {aka 'long long unsigned int(long long unsigned int)'}
139 | static __always_inline u64 field_mask(u64 field)
| ^~~~~~~~~~
drivers/irqchip/irq-msc313-pm-wakeup.c: In function 'msc313_pm_wakeup_intc_of_init':
drivers/irqchip/irq-msc313-pm-wakeup.c:132:9: warning: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
132 | request_irq(irq, msc313_pm_wakeup_intc_chainedhandler, IRQF_SHARED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 | "pmsleep", domain);
| ~~~~~~~~~~~~~~~~~~
vim +/field_mask +21 drivers/irqchip/irq-msc313-pm-wakeup.c
20
> 21 static struct reg_field field_mask = REG_FIELD(MSTAR_PMSLEEP_WAKEUPSOURCE, 0, 7);
22 static struct reg_field field_type = REG_FIELD(MSTAR_PMSLEEP_REG24, 0, 7);
23 static struct reg_field field_status = REG_FIELD(MSTAR_PMSLEEP_WAKEINT_STATUS, 0, 7);
24
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1744:11: error: dereferencing pointer to incomplete type 'struct cpuinfo_x86'
by kernel test robot
Hi Koba,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a33f5c380c4bd3fa5278d690421b72052456d9fe
commit: b3dc549986eb7b38eba4a144e979dc93f386751f drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
date: 5 months ago
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20220116/202201160101.FJp6OaWl-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b3dc549986eb7b38eba4a144e979dc93f386751f
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SHELL=/bin/bash drivers/gpu/drm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:35,
from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:23:
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function 'intel_core_rkl_chk':
arch/um/include/asm/processor-generic.h:104:19: error: called object is not a function or function pointer
104 | #define cpu_data (&boot_cpu_data)
| ~^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:27: note: in expansion of macro 'cpu_data'
1742 | struct cpuinfo_x86 *c = &cpu_data(0);
| ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1744:11: error: dereferencing pointer to incomplete type 'struct cpuinfo_x86'
1744 | return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
| ^~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1748:1: error: control reaches end of non-void function [-Werror=return-type]
1748 | }
| ^
cc1: some warnings being treated as errors
vim +1744 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c
1738
1739 static bool intel_core_rkl_chk(void)
1740 {
1741 #if IS_ENABLED(CONFIG_X86_64)
1742 struct cpuinfo_x86 *c = &cpu_data(0);
1743
> 1744 return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE);
1745 #else
1746 return false;
1747 #endif
1748 }
1749
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 1 week