From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Ronak Jain <ronak.jain@amd.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Subject: drivers/firmware/xilinx/zynqmp.c:677 zynqmp_pm_query_data() warn: missing error code? 'ret'
Date: Mon, 6 Jan 2025 14:16:06 +0300 [thread overview]
Message-ID: <5e13987d-3bdd-45e9-b16a-b2ece68c4571@stanley.mountain> (raw)
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@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.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
reply other threads:[~2025-01-06 11:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e13987d-3bdd-45e9-b16a-b2ece68c4571@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=jay.buddhabhatti@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=monstr@monstr.eu \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=ronak.jain@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®