drivers/pinctrl/pinctrl-rockchip.c:804:2: error: implicit declaration of function 'RK_MUXROUTE_SAME'
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20210420-170833/Jianqun-X...
head: bb6a49e9a397527d82c30eda6b4085711fbdf705
commit: bb6a49e9a397527d82c30eda6b4085711fbdf705 pinctrl: rockchip: do coding style for mux route struct
date: 3 hours ago
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/bb6a49e9a397527d82c30eda6b4085711...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20210420-170833/Jianqun-Xu/pinctrl-rockchip-do-coding-style-for-mux-route-struct/20210406-105506
git checkout bb6a49e9a397527d82c30eda6b4085711fbdf705
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm
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/pinctrl/pinctrl-rockchip.c:804:2: error: implicit declaration of function 'RK_MUXROUTE_SAME' [-Werror=implicit-function-declaration]
804 | RK_MUXROUTE_SAME(2, RK_PA0, 1, 0x184, BIT(16 + 7)), /* cif-d2m0 */
| ^~~~~~~~~~~~~~~~
>> drivers/pinctrl/pinctrl-rockchip.c:804:2: error: initializer element is not constant
drivers/pinctrl/pinctrl-rockchip.c:804:2: note: (near initialization for 'px30_mux_route_data[0].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:805:2: error: initializer element is not constant
805 | RK_MUXROUTE_SAME(3, RK_PA3, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d2m1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:805:2: note: (near initialization for 'px30_mux_route_data[0].pin')
drivers/pinctrl/pinctrl-rockchip.c:806:2: error: initializer element is not constant
806 | RK_MUXROUTE_SAME(3, RK_PC6, 2, 0x184, BIT(16 + 8)), /* pdm-m0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:806:2: note: (near initialization for 'px30_mux_route_data[0].func')
drivers/pinctrl/pinctrl-rockchip.c:807:2: error: initializer element is not constant
807 | RK_MUXROUTE_SAME(2, RK_PC6, 1, 0x184, BIT(16 + 8) | BIT(8)), /* pdm-m1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:807:2: note: (near initialization for 'px30_mux_route_data[0].route_location')
drivers/pinctrl/pinctrl-rockchip.c:808:2: error: initializer element is not constant
808 | RK_MUXROUTE_SAME(1, RK_PD3, 2, 0x184, BIT(16 + 10)), /* uart2-rxm0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:808:2: note: (near initialization for 'px30_mux_route_data[0].route_offset')
drivers/pinctrl/pinctrl-rockchip.c:809:2: error: initializer element is not constant
809 | RK_MUXROUTE_SAME(2, RK_PB6, 2, 0x184, BIT(16 + 10) | BIT(10)), /* uart2-rxm1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:809:2: note: (near initialization for 'px30_mux_route_data[0].route_val')
drivers/pinctrl/pinctrl-rockchip.c:810:2: error: initializer element is not constant
810 | RK_MUXROUTE_SAME(0, RK_PC1, 2, 0x184, BIT(16 + 9)), /* uart3-rxm0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:810:2: note: (near initialization for 'px30_mux_route_data[1].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:811:2: error: initializer element is not constant
811 | RK_MUXROUTE_SAME(1, RK_PB7, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-rxm1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:811:2: note: (near initialization for 'px30_mux_route_data[1].pin')
drivers/pinctrl/pinctrl-rockchip.c:815:2: error: initializer element is not constant
815 | RK_MUXROUTE_SAME(1, RK_PB2, 1, 0x144, BIT(16 + 3) | BIT(16 + 4)), /* spi-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:815:2: note: (near initialization for 'rk3128_mux_route_data[0].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:816:2: error: initializer element is not constant
816 | RK_MUXROUTE_SAME(1, RK_PD3, 3, 0x144, BIT(16 + 3) | BIT(16 + 4) | BIT(3)), /* spi-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:816:2: note: (near initialization for 'rk3128_mux_route_data[0].pin')
drivers/pinctrl/pinctrl-rockchip.c:817:2: error: initializer element is not constant
817 | RK_MUXROUTE_SAME(0, RK_PB5, 2, 0x144, BIT(16 + 3) | BIT(16 + 4) | BIT(4)), /* spi-2 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:817:2: note: (near initialization for 'rk3128_mux_route_data[0].func')
drivers/pinctrl/pinctrl-rockchip.c:818:2: error: initializer element is not constant
818 | RK_MUXROUTE_SAME(1, RK_PA5, 1, 0x144, BIT(16 + 5)), /* i2s-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:818:2: note: (near initialization for 'rk3128_mux_route_data[0].route_location')
drivers/pinctrl/pinctrl-rockchip.c:819:2: error: initializer element is not constant
819 | RK_MUXROUTE_SAME(0, RK_PB6, 1, 0x144, BIT(16 + 5) | BIT(5)), /* i2s-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:819:2: note: (near initialization for 'rk3128_mux_route_data[0].route_offset')
drivers/pinctrl/pinctrl-rockchip.c:820:2: error: initializer element is not constant
820 | RK_MUXROUTE_SAME(1, RK_PC6, 2, 0x144, BIT(16 + 6)), /* emmc-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:820:2: note: (near initialization for 'rk3128_mux_route_data[0].route_val')
drivers/pinctrl/pinctrl-rockchip.c:821:2: error: initializer element is not constant
821 | RK_MUXROUTE_SAME(2, RK_PA4, 2, 0x144, BIT(16 + 6) | BIT(6)), /* emmc-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:821:2: note: (near initialization for 'rk3128_mux_route_data[1].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:825:2: error: initializer element is not constant
825 | RK_MUXROUTE_SAME(0, RK_PD0, 1, 0xa0, BIT(16 + 11)), /* non-iomuxed emmc/flash pins on flash-dqs */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:825:2: note: (near initialization for 'rk3188_mux_route_data[0].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:826:2: error: initializer element is not constant
826 | RK_MUXROUTE_SAME(0, RK_PD0, 2, 0xa0, BIT(16 + 11) | BIT(11)), /* non-iomuxed emmc/flash pins on emmc-clk */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:826:2: note: (near initialization for 'rk3188_mux_route_data[0].pin')
drivers/pinctrl/pinctrl-rockchip.c:830:2: error: initializer element is not constant
830 | RK_MUXROUTE_SAME(0, RK_PD2, 1, 0x50, BIT(16)), /* pwm0-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:830:2: note: (near initialization for 'rk3228_mux_route_data[0].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:831:2: error: initializer element is not constant
831 | RK_MUXROUTE_SAME(3, RK_PC5, 1, 0x50, BIT(16) | BIT(0)), /* pwm0-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:831:2: note: (near initialization for 'rk3228_mux_route_data[0].pin')
drivers/pinctrl/pinctrl-rockchip.c:832:2: error: initializer element is not constant
832 | RK_MUXROUTE_SAME(0, RK_PD3, 1, 0x50, BIT(16 + 1)), /* pwm1-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:832:2: note: (near initialization for 'rk3228_mux_route_data[0].func')
drivers/pinctrl/pinctrl-rockchip.c:833:2: error: initializer element is not constant
833 | RK_MUXROUTE_SAME(0, RK_PD6, 2, 0x50, BIT(16 + 1) | BIT(1)), /* pwm1-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:833:2: note: (near initialization for 'rk3228_mux_route_data[0].route_location')
drivers/pinctrl/pinctrl-rockchip.c:834:2: error: initializer element is not constant
834 | RK_MUXROUTE_SAME(0, RK_PD4, 1, 0x50, BIT(16 + 2)), /* pwm2-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:834:2: note: (near initialization for 'rk3228_mux_route_data[0].route_offset')
drivers/pinctrl/pinctrl-rockchip.c:835:2: error: initializer element is not constant
835 | RK_MUXROUTE_SAME(1, RK_PB4, 2, 0x50, BIT(16 + 2) | BIT(2)), /* pwm2-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:835:2: note: (near initialization for 'rk3228_mux_route_data[0].route_val')
drivers/pinctrl/pinctrl-rockchip.c:836:2: error: initializer element is not constant
836 | RK_MUXROUTE_SAME(3, RK_PD2, 1, 0x50, BIT(16 + 3)), /* pwm3-0 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:836:2: note: (near initialization for 'rk3228_mux_route_data[1].bank_num')
drivers/pinctrl/pinctrl-rockchip.c:837:2: error: initializer element is not constant
837 | RK_MUXROUTE_SAME(1, RK_PB3, 2, 0x50, BIT(16 + 3) | BIT(3)), /* pwm3-1 */
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-rockchip.c:837:2: note: (near initialization for 'rk3228_mux_route_data[1].pin')
drivers/pinctrl/pinctrl-rockchip.c:838:2: error: initializer element is not constant
838 | RK_MUXROUTE_SAME(1, RK_PA1, 1, 0x50, BIT(16 + 4)), /* sdio-0_d0 */
| ^~~~~~~~~~~~~~~~
vim +/RK_MUXROUTE_SAME +804 drivers/pinctrl/pinctrl-rockchip.c
802
803 static struct rockchip_mux_route_data px30_mux_route_data[] = {
> 804 RK_MUXROUTE_SAME(2, RK_PA0, 1, 0x184, BIT(16 + 7)), /* cif-d2m0 */
805 RK_MUXROUTE_SAME(3, RK_PA3, 3, 0x184, BIT(16 + 7) | BIT(7)), /* cif-d2m1 */
806 RK_MUXROUTE_SAME(3, RK_PC6, 2, 0x184, BIT(16 + 8)), /* pdm-m0 */
807 RK_MUXROUTE_SAME(2, RK_PC6, 1, 0x184, BIT(16 + 8) | BIT(8)), /* pdm-m1 */
808 RK_MUXROUTE_SAME(1, RK_PD3, 2, 0x184, BIT(16 + 10)), /* uart2-rxm0 */
809 RK_MUXROUTE_SAME(2, RK_PB6, 2, 0x184, BIT(16 + 10) | BIT(10)), /* uart2-rxm1 */
810 RK_MUXROUTE_SAME(0, RK_PC1, 2, 0x184, BIT(16 + 9)), /* uart3-rxm0 */
811 RK_MUXROUTE_SAME(1, RK_PB7, 2, 0x184, BIT(16 + 9) | BIT(9)), /* uart3-rxm1 */
812 };
813
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers
by kernel test robot
Hi Shameer,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8]
[cannot apply to iommu/next xlnx/master next-20210420]
[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/Shameer-Kolothum/ACPI-IORT-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: m68k-randconfig-m031-20210420 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/2501962e423895e2e4f126ff5998b226f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20210420-173125
git checkout 2501962e423895e2e4f126ff5998b226f4803186
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k
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 >>):
In file included from drivers/iommu/rockchip-iommu.c:13:
>> include/linux/dma-iommu.h:94:71: warning: 'struct iommu_rmr' declared inside parameter list will not be visible outside of this definition or declaration
94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr,
| ^~~~~~~~~
include/linux/dma-iommu.h:100:1: error: expected identifier or '(' before '{' token
100 | {
| ^
In file included from drivers/iommu/rockchip-iommu.c:13:
include/linux/dma-iommu.h:94:13: warning: 'iommu_dma_get_rmr_resv_regions' defined but not used [-Wunused-function]
94 | static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ADI_AXI_ADC
Depends on IIO && HAS_IOMEM && OF
Selected by
- AD9467 && IIO && SPI
vim +94 include/linux/dma-iommu.h
93
> 94 static void iommu_dma_get_rmr_resv_regions(struct device *dev, struct iommu_rmr *rmr,
95 struct list_head *list)
96 {
97 }
98
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
kernel/sched/core.c:6854:20: warning: unused function 'balance_hotplug_wait'
by kernel test robot
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7af08140979a6e7e12b78c93b8625c8d25b084e2
commit: 1cf12e08bc4d50a76b80c42a3109c53d8794a0c9 sched/hotplug: Consolidate task migration on CPU unplug
date: 5 months ago
config: mips-randconfig-r023-20210420 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
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/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 1cf12e08bc4d50a76b80c42a3109c53d8794a0c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
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 >>):
kernel/sched/core.c:2376:6: warning: no previous prototype for function 'sched_set_stop_task'
void sched_set_stop_task(int cpu, struct task_struct
^
kernel/sched/core.c:2376:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct
^
static
kernel/sched/core.c:4196:20: warning: unused function 'sched_tick_stop'
static inline void sched_tick_stop(int cpu) { }
^
>> kernel/sched/core.c:6854:20: warning: unused function 'balance_hotplug_wait'
static inline void balance_hotplug_wait(void)
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __cmpxchg_asm
bne $0, ${3:z}, 2f
.set pop
move $$1, ${4:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
2: .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project ca8eef7e3da8f750d7c7aa004fe426d1d34787ea)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-ca8eef7e3d/bin
clang-13: note: diagnostic msg:
Makefile arch fs include kernel scripts source usr
vim +/balance_hotplug_wait +6854 kernel/sched/core.c
2558aacff85866 Peter Zijlstra 2020-09-11 6853
f2469a1fb43f85 Thomas Gleixner 2020-09-14 @6854 static inline void balance_hotplug_wait(void)
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6855 {
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6856 }
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6857
:::::: The code at line 6854 was first introduced by commit
:::::: f2469a1fb43f85d243ce72638367fb6e15c33491 sched/core: Wait for tasks being pushed away on hotplug
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[kbuild] [xlnx:release-2020.2.2_k26 207/241] drivers/pinctrl/core.c:1273 pinctrl_commit_state() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: https://github.com/Xilinx/linux-xlnx release-2020.2.2_k26
head: 4731ff5042ce76fc145bc2797faa2d91b090675e
commit: 11367d8e6e31164b198401335b9a19b5b7234ec0 [207/241] pinctrl: core: Handling pinmux and pinconf separately
config: i386-randconfig-m021-20210419 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/pinctrl/core.c:1273 pinctrl_commit_state() error: uninitialized symbol 'ret'.
vim +/ret +1273 drivers/pinctrl/core.c
981ed1bfbc6c46 Florian Fainelli 2017-03-01 1237 static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
befe5bdfbb698b Linus Walleij 2012-02-09 1238 {
6e5e959dde0d92 Stephen Warren 2012-03-02 1239 struct pinctrl_setting *setting, *setting2;
50cf7c8ab324de Richard Genoud 2013-03-25 1240 struct pinctrl_state *old_state = p->state;
6e5e959dde0d92 Stephen Warren 2012-03-02 1241 int ret;
7ecdb16fe63e5b Stephen Warren 2012-03-02 1242
6e5e959dde0d92 Stephen Warren 2012-03-02 1243 if (p->state) {
6e5e959dde0d92 Stephen Warren 2012-03-02 1244 /*
2243a87d90b42e Fan Wu 2014-06-09 1245 * For each pinmux setting in the old state, forget SW's record
2243a87d90b42e Fan Wu 2014-06-09 1246 * of mux owner for that pingroup. Any pingroups which are
2243a87d90b42e Fan Wu 2014-06-09 1247 * still owned by the new state will be re-acquired by the call
2243a87d90b42e Fan Wu 2014-06-09 1248 * to pinmux_enable_setting() in the loop below.
6e5e959dde0d92 Stephen Warren 2012-03-02 1249 */
6e5e959dde0d92 Stephen Warren 2012-03-02 1250 list_for_each_entry(setting, &p->state->settings, node) {
1e2082b5207217 Stephen Warren 2012-03-02 1251 if (setting->type != PIN_MAP_TYPE_MUX_GROUP)
1e2082b5207217 Stephen Warren 2012-03-02 1252 continue;
7ecdb16fe63e5b Stephen Warren 2012-03-02 1253 pinmux_disable_setting(setting);
befe5bdfbb698b Linus Walleij 2012-02-09 1254 }
57b676f9c1b7cd Stephen Warren 2012-03-02 1255 }
57b676f9c1b7cd Stephen Warren 2012-03-02 1256
3102a76cfbf9ac Richard Genoud 2013-03-25 1257 p->state = NULL;
6e5e959dde0d92 Stephen Warren 2012-03-02 1258
11367d8e6e3116 Michal Simek 2021-03-10 1259 /* Apply all the settings for the new state - pinmux first */
6e5e959dde0d92 Stephen Warren 2012-03-02 1260 list_for_each_entry(setting, &state->settings, node) {
1e2082b5207217 Stephen Warren 2012-03-02 1261 switch (setting->type) {
1e2082b5207217 Stephen Warren 2012-03-02 1262 case PIN_MAP_TYPE_MUX_GROUP:
6e5e959dde0d92 Stephen Warren 2012-03-02 1263 ret = pinmux_enable_setting(setting);
1e2082b5207217 Stephen Warren 2012-03-02 1264 break;
1e2082b5207217 Stephen Warren 2012-03-02 1265 case PIN_MAP_TYPE_CONFIGS_PIN:
11367d8e6e3116 Michal Simek 2021-03-10 1266 case PIN_MAP_TYPE_CONFIGS_GROUP:
11367d8e6e3116 Michal Simek 2021-03-10 1267 break;
"ret" not set for these cases.
11367d8e6e3116 Michal Simek 2021-03-10 1268 default:
11367d8e6e3116 Michal Simek 2021-03-10 1269 ret = -EINVAL;
11367d8e6e3116 Michal Simek 2021-03-10 1270 break;
11367d8e6e3116 Michal Simek 2021-03-10 1271 }
11367d8e6e3116 Michal Simek 2021-03-10 1272
11367d8e6e3116 Michal Simek 2021-03-10 @1273 if (ret < 0)
11367d8e6e3116 Michal Simek 2021-03-10 1274 goto unapply_new_state;
11367d8e6e3116 Michal Simek 2021-03-10 1275
11367d8e6e3116 Michal Simek 2021-03-10 1276 /* Do not link hogs (circular dependency) */
11367d8e6e3116 Michal Simek 2021-03-10 1277 if (p != setting->pctldev->p)
11367d8e6e3116 Michal Simek 2021-03-10 1278 pinctrl_link_add(setting->pctldev, p->dev);
11367d8e6e3116 Michal Simek 2021-03-10 1279 }
11367d8e6e3116 Michal Simek 2021-03-10 1280
11367d8e6e3116 Michal Simek 2021-03-10 1281 /* Apply all the settings for the new state - pinconf after */
11367d8e6e3116 Michal Simek 2021-03-10 1282 list_for_each_entry(setting, &state->settings, node) {
11367d8e6e3116 Michal Simek 2021-03-10 1283 switch (setting->type) {
11367d8e6e3116 Michal Simek 2021-03-10 1284 case PIN_MAP_TYPE_MUX_GROUP:
11367d8e6e3116 Michal Simek 2021-03-10 1285 break;
Same. We probably just want to initialize it in the declaration.
11367d8e6e3116 Michal Simek 2021-03-10 1286 case PIN_MAP_TYPE_CONFIGS_PIN:
1e2082b5207217 Stephen Warren 2012-03-02 1287 case PIN_MAP_TYPE_CONFIGS_GROUP:
1e2082b5207217 Stephen Warren 2012-03-02 1288 ret = pinconf_apply_setting(setting);
1e2082b5207217 Stephen Warren 2012-03-02 1289 break;
1e2082b5207217 Stephen Warren 2012-03-02 1290 default:
1e2082b5207217 Stephen Warren 2012-03-02 1291 ret = -EINVAL;
1e2082b5207217 Stephen Warren 2012-03-02 1292 break;
1e2082b5207217 Stephen Warren 2012-03-02 1293 }
3102a76cfbf9ac Richard Genoud 2013-03-25 1294
42fed7ba44e4e8 Patrice Chotard 2013-04-11 1295 if (ret < 0) {
3102a76cfbf9ac Richard Genoud 2013-03-25 1296 goto unapply_new_state;
6e5e959dde0d92 Stephen Warren 2012-03-02 1297 }
036f394dd77f81 Benjamin Gaignard 2019-05-22 1298
b672a87ae5ab07 Linus Walleij 2019-05-24 1299 /* Do not link hogs (circular dependency) */
b672a87ae5ab07 Linus Walleij 2019-05-24 1300 if (p != setting->pctldev->p)
036f394dd77f81 Benjamin Gaignard 2019-05-22 1301 pinctrl_link_add(setting->pctldev, p->dev);
42fed7ba44e4e8 Patrice Chotard 2013-04-11 1302 }
6e5e959dde0d92 Stephen Warren 2012-03-02 1303
3102a76cfbf9ac Richard Genoud 2013-03-25 1304 p->state = state;
3102a76cfbf9ac Richard Genoud 2013-03-25 1305
6e5e959dde0d92 Stephen Warren 2012-03-02 1306 return 0;
3102a76cfbf9ac Richard Genoud 2013-03-25 1307
3102a76cfbf9ac Richard Genoud 2013-03-25 1308 unapply_new_state:
da58751ca2490d Richard Genoud 2013-03-28 1309 dev_err(p->dev, "Error applying setting, reverse things back\n");
3102a76cfbf9ac Richard Genoud 2013-03-25 1310
3102a76cfbf9ac Richard Genoud 2013-03-25 1311 list_for_each_entry(setting2, &state->settings, node) {
3102a76cfbf9ac Richard Genoud 2013-03-25 1312 if (&setting2->node == &setting->node)
3102a76cfbf9ac Richard Genoud 2013-03-25 1313 break;
af606177713163 Richard Genoud 2013-03-29 1314 /*
af606177713163 Richard Genoud 2013-03-29 1315 * All we can do here is pinmux_disable_setting.
af606177713163 Richard Genoud 2013-03-29 1316 * That means that some pins are muxed differently now
af606177713163 Richard Genoud 2013-03-29 1317 * than they were before applying the setting (We can't
af606177713163 Richard Genoud 2013-03-29 1318 * "unmux a pin"!), but it's not a big deal since the pins
af606177713163 Richard Genoud 2013-03-29 1319 * are free to be muxed by another apply_setting.
af606177713163 Richard Genoud 2013-03-29 1320 */
af606177713163 Richard Genoud 2013-03-29 1321 if (setting2->type == PIN_MAP_TYPE_MUX_GROUP)
af606177713163 Richard Genoud 2013-03-29 1322 pinmux_disable_setting(setting2);
3102a76cfbf9ac Richard Genoud 2013-03-25 1323 }
8009d5ff00df6a Richard Genoud 2013-03-28 1324
385d94246b05f7 Richard Genoud 2013-03-29 1325 /* There's no infinite recursive loop here because p->state is NULL */
385d94246b05f7 Richard Genoud 2013-03-29 1326 if (old_state)
42fed7ba44e4e8 Patrice Chotard 2013-04-11 1327 pinctrl_select_state(p, old_state);
6e5e959dde0d92 Stephen Warren 2012-03-02 1328
6e5e959dde0d92 Stephen Warren 2012-03-02 1329 return ret;
befe5bdfbb698b Linus Walleij 2012-02-09 1330 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months
[kbuild] [linux-next:master 12597/13745] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:222 dcn21_set_backlight_level() error: we previously assumed 'panel_cntl' could be null (see line 213)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 50b8b1d699ac313c0a07a3c185ffb23aecab8abb
commit: e922057b556d37c54f8f88e44f7d7b731d6365b1 [12597/13745] drm/amd/display: Added support for multiple eDP BL control
config: x86_64-randconfig-m001-20210419 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:222 dcn21_set_backlight_level() error: we previously assumed 'panel_cntl' could be null (see line 213)
vim +/panel_cntl +222 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c
474ac4a875ca6f Yongqiang Sun 2020-04-27 198 bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
474ac4a875ca6f Yongqiang Sun 2020-04-27 199 uint32_t backlight_pwm_u16_16,
474ac4a875ca6f Yongqiang Sun 2020-04-27 200 uint32_t frame_ramp)
474ac4a875ca6f Yongqiang Sun 2020-04-27 201 {
474ac4a875ca6f Yongqiang Sun 2020-04-27 202 union dmub_rb_cmd cmd;
474ac4a875ca6f Yongqiang Sun 2020-04-27 203 struct dc_context *dc = pipe_ctx->stream->ctx;
474ac4a875ca6f Yongqiang Sun 2020-04-27 204 struct abm *abm = pipe_ctx->stream_res.abm;
474ac4a875ca6f Yongqiang Sun 2020-04-27 205 uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
474ac4a875ca6f Yongqiang Sun 2020-04-27 206 struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
474ac4a875ca6f Yongqiang Sun 2020-04-27 207
474ac4a875ca6f Yongqiang Sun 2020-04-27 208 if (dc->dc->res_pool->dmcu) {
474ac4a875ca6f Yongqiang Sun 2020-04-27 209 dce110_set_backlight_level(pipe_ctx, backlight_pwm_u16_16, frame_ramp);
474ac4a875ca6f Yongqiang Sun 2020-04-27 210 return true;
474ac4a875ca6f Yongqiang Sun 2020-04-27 211 }
474ac4a875ca6f Yongqiang Sun 2020-04-27 212
474ac4a875ca6f Yongqiang Sun 2020-04-27 @213 if (abm && panel_cntl)
^^^^^^^^^^
This code assumed "panel_cntl" can be NULL
474ac4a875ca6f Yongqiang Sun 2020-04-27 214 dmub_abm_set_pipe(abm, otg_inst, SET_ABM_PIPE_NORMAL, panel_cntl->inst);
474ac4a875ca6f Yongqiang Sun 2020-04-27 215
148816f93fa0db Wyatt Wood 2021-01-18 216 memset(&cmd, 0, sizeof(cmd));
474ac4a875ca6f Yongqiang Sun 2020-04-27 217 cmd.abm_set_backlight.header.type = DMUB_CMD__ABM;
474ac4a875ca6f Yongqiang Sun 2020-04-27 218 cmd.abm_set_backlight.header.sub_type = DMUB_CMD__ABM_SET_BACKLIGHT;
474ac4a875ca6f Yongqiang Sun 2020-04-27 219 cmd.abm_set_backlight.abm_set_backlight_data.frame_ramp = frame_ramp;
474ac4a875ca6f Yongqiang Sun 2020-04-27 220 cmd.abm_set_backlight.abm_set_backlight_data.backlight_user_level = backlight_pwm_u16_16;
e922057b556d37 Jake Wang 2021-04-01 221 cmd.abm_set_backlight.abm_set_backlight_data.version = DMUB_CMD_ABM_SET_BACKLIGHT_VERSION_1;
e922057b556d37 Jake Wang 2021-04-01 @222 cmd.abm_set_backlight.abm_set_backlight_data.panel_mask = (0x01 << panel_cntl->inst);
^^^^^^^^^^^^^^^^
Unchecked dereference
474ac4a875ca6f Yongqiang Sun 2020-04-27 223 cmd.abm_set_backlight.header.payload_bytes = sizeof(struct dmub_cmd_abm_set_backlight_data);
474ac4a875ca6f Yongqiang Sun 2020-04-27 224
474ac4a875ca6f Yongqiang Sun 2020-04-27 225 dc_dmub_srv_cmd_queue(dc->dmub_srv, &cmd);
474ac4a875ca6f Yongqiang Sun 2020-04-27 226 dc_dmub_srv_cmd_execute(dc->dmub_srv);
474ac4a875ca6f Yongqiang Sun 2020-04-27 227 dc_dmub_srv_wait_idle(dc->dmub_srv);
474ac4a875ca6f Yongqiang Sun 2020-04-27 228
474ac4a875ca6f Yongqiang Sun 2020-04-27 229 return true;
474ac4a875ca6f Yongqiang Sun 2020-04-27 230 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 5 months