[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5e13987d-3bdd-45e9-b16a-b2ece68c4571@stanley.mountain>
Date: Mon, 6 Jan 2025 14:16:06 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Ronak Jain <ronak.jain@....com>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Michal Simek <monstr@...str.eu>,
Jay Buddhabhatti <jay.buddhabhatti@....com>
Subject: drivers/firmware/xilinx/zynqmp.c:677 zynqmp_pm_query_data() warn:
missing error code? 'ret'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0bc21e701a6ffacfdde7f04f87d664d82e8a13bf
commit: 92fb71333d5737d0296fb968a653dfda4b225175 firmware: xilinx: add support for new SMC call format
date: 3 months ago
config: arm64-randconfig-r073-20250102 (https://download.01.org/0day-ci/archive/20250103/202501031613.wYttNcqY-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202501031613.wYttNcqY-lkp@intel.com/
smatch warnings:
drivers/firmware/xilinx/zynqmp.c:677 zynqmp_pm_query_data() warn: missing error code? 'ret'
vim +/ret +677 drivers/firmware/xilinx/zynqmp.c
6366c1bac3149c Rajan Vaja 2020-04-24 653 int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out)
59ecdd778879f1 Rajan Vaja 2018-09-12 654 {
92fb71333d5737 Ronak Jain 2024-09-19 655 int ret, i = 0;
92fb71333d5737 Ronak Jain 2024-09-19 656 u32 ret_payload[PAYLOAD_ARG_CNT] = {0};
92fb71333d5737 Ronak Jain 2024-09-19 657
92fb71333d5737 Ronak Jain 2024-09-19 658 if (sip_svc_version >= SIP_SVC_PASSTHROUGH_VERSION) {
92fb71333d5737 Ronak Jain 2024-09-19 659 ret = zynqmp_pm_invoke_fw_fn(PM_QUERY_DATA, ret_payload, 4,
92fb71333d5737 Ronak Jain 2024-09-19 660 qdata.qid, qdata.arg1,
92fb71333d5737 Ronak Jain 2024-09-19 661 qdata.arg2, qdata.arg3);
92fb71333d5737 Ronak Jain 2024-09-19 662 /* To support backward compatibility */
92fb71333d5737 Ronak Jain 2024-09-19 663 if (!ret && !ret_payload[0]) {
92fb71333d5737 Ronak Jain 2024-09-19 664 /*
92fb71333d5737 Ronak Jain 2024-09-19 665 * TF-A passes return status on 0th index but
92fb71333d5737 Ronak Jain 2024-09-19 666 * api to get clock name reads data from 0th
92fb71333d5737 Ronak Jain 2024-09-19 667 * index so pass data at 0th index instead of
92fb71333d5737 Ronak Jain 2024-09-19 668 * return status
92fb71333d5737 Ronak Jain 2024-09-19 669 */
92fb71333d5737 Ronak Jain 2024-09-19 670 if (qdata.qid == PM_QID_CLOCK_GET_NAME ||
92fb71333d5737 Ronak Jain 2024-09-19 671 qdata.qid == PM_QID_PINCTRL_GET_FUNCTION_NAME)
92fb71333d5737 Ronak Jain 2024-09-19 672 i = 1;
92fb71333d5737 Ronak Jain 2024-09-19 673
92fb71333d5737 Ronak Jain 2024-09-19 674 for (; i < PAYLOAD_ARG_CNT; i++, out++)
92fb71333d5737 Ronak Jain 2024-09-19 675 *out = ret_payload[i];
92fb71333d5737 Ronak Jain 2024-09-19 676
92fb71333d5737 Ronak Jain 2024-09-19 @677 return ret;
Please just return 0 here.
92fb71333d5737 Ronak Jain 2024-09-19 678 }
92fb71333d5737 Ronak Jain 2024-09-19 679 }
f9627312e20721 Rajan Vaja 2018-09-12 680
92fb71333d5737 Ronak Jain 2024-09-19 681 ret = zynqmp_pm_invoke_fn(PM_QUERY_DATA, out, 4, qdata.qid,
92fb71333d5737 Ronak Jain 2024-09-19 682 qdata.arg1, qdata.arg2, qdata.arg3);
f9627312e20721 Rajan Vaja 2018-09-12 683
f9627312e20721 Rajan Vaja 2018-09-12 684 /*
f9627312e20721 Rajan Vaja 2018-09-12 685 * For clock name query, all bytes in SMC response are clock name
f9627312e20721 Rajan Vaja 2018-09-12 686 * characters and return code is always success. For invalid clocks,
f9627312e20721 Rajan Vaja 2018-09-12 687 * clock name bytes would be zeros.
f9627312e20721 Rajan Vaja 2018-09-12 688 */
f9627312e20721 Rajan Vaja 2018-09-12 689 return qdata.qid == PM_QID_CLOCK_GET_NAME ? 0 : ret;
f9627312e20721 Rajan Vaja 2018-09-12 690 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists