From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Haren Myneni <haren@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
msuchanek@suse.de, mahesh@linux.ibm.com, tyreld@linux.ibm.com,
hbabu@us.ibm.com, haren@linux.ibm.com
Subject: Re: [PATCH 5/6] powerpc/pseries: Add ibm,get-dynamic-sensor-state RTAS call support
Date: Thu, 9 Jan 2025 10:44:40 +0300 [thread overview]
Message-ID: <b4313bdb-29ba-42c1-9011-4bb558d056ba@stanley.mountain> (raw)
In-Reply-To: <20250104204652.388720-6-haren@linux.ibm.com>
Hi Haren,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Haren-Myneni/powerpc-pseries-Define-common-functions-for-RTAS-sequence-HCALLs/20250105-045010
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20250104204652.388720-6-haren%40linux.ibm.com
patch subject: [PATCH 5/6] powerpc/pseries: Add ibm,get-dynamic-sensor-state RTAS call support
config: powerpc64-randconfig-r071-20250108 (https://download.01.org/0day-ci/archive/20250109/202501090552.UzEfb4QU-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 096551537b2a747a3387726ca618ceeb3950e9bc)
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/202501090552.UzEfb4QU-lkp@intel.com/
New smatch warnings:
arch/powerpc/platforms/pseries/papr-indices.c:496 papr_dynamic_sensor_ioc_get() warn: inconsistent returns 'global &rtas_ibm_get_dynamic_sensor_state_lock'.
Old smatch warnings:
arch/powerpc/platforms/pseries/papr-indices.c:438 papr_dynamic_indicator_ioc_set() warn: inconsistent returns 'global &rtas_ibm_set_dynamic_indicator_lock'.
vim +496 arch/powerpc/platforms/pseries/papr-indices.c
e44fb25ad9fa03 Haren Myneni 2025-01-04 452 static long papr_dynamic_sensor_ioc_get(struct papr_indices_io_block __user *ubuf)
e44fb25ad9fa03 Haren Myneni 2025-01-04 453 {
e44fb25ad9fa03 Haren Myneni 2025-01-04 454 struct papr_indices_io_block kbuf;
e44fb25ad9fa03 Haren Myneni 2025-01-04 455 struct rtas_work_area *work_area;
e44fb25ad9fa03 Haren Myneni 2025-01-04 456 s32 fwrc, token, ret;
e44fb25ad9fa03 Haren Myneni 2025-01-04 457 u32 rets;
e44fb25ad9fa03 Haren Myneni 2025-01-04 458
e44fb25ad9fa03 Haren Myneni 2025-01-04 459 token = rtas_function_token(RTAS_FN_IBM_GET_DYNAMIC_SENSOR_STATE);
e44fb25ad9fa03 Haren Myneni 2025-01-04 460 if (token == RTAS_UNKNOWN_SERVICE)
e44fb25ad9fa03 Haren Myneni 2025-01-04 461 return -ENOENT;
e44fb25ad9fa03 Haren Myneni 2025-01-04 462
e44fb25ad9fa03 Haren Myneni 2025-01-04 463 mutex_lock(&rtas_ibm_get_dynamic_sensor_state_lock);
e44fb25ad9fa03 Haren Myneni 2025-01-04 464 work_area = papr_dynamic_indice_buf_from_user(ubuf, &kbuf);
e44fb25ad9fa03 Haren Myneni 2025-01-04 465 if (IS_ERR(work_area))
e44fb25ad9fa03 Haren Myneni 2025-01-04 466 return PTR_ERR(work_area);
Add an unlock, same as with the _set() function.
e44fb25ad9fa03 Haren Myneni 2025-01-04 467
e44fb25ad9fa03 Haren Myneni 2025-01-04 468 do {
e44fb25ad9fa03 Haren Myneni 2025-01-04 469 fwrc = rtas_call(token, 2, 2, &rets,
e44fb25ad9fa03 Haren Myneni 2025-01-04 470 kbuf.dynamic_param.token,
e44fb25ad9fa03 Haren Myneni 2025-01-04 471 rtas_work_area_phys(work_area));
e44fb25ad9fa03 Haren Myneni 2025-01-04 472 } while (rtas_busy_delay(fwrc));
e44fb25ad9fa03 Haren Myneni 2025-01-04 473
e44fb25ad9fa03 Haren Myneni 2025-01-04 474 rtas_work_area_free(work_area);
e44fb25ad9fa03 Haren Myneni 2025-01-04 475 mutex_unlock(&rtas_ibm_get_dynamic_sensor_state_lock);
e44fb25ad9fa03 Haren Myneni 2025-01-04 476
e44fb25ad9fa03 Haren Myneni 2025-01-04 477 switch (fwrc) {
e44fb25ad9fa03 Haren Myneni 2025-01-04 478 case RTAS_IBM_DYNAMIC_INDICE_SUCCESS:
e44fb25ad9fa03 Haren Myneni 2025-01-04 479 if (put_user(rets, &ubuf->dynamic_param.state))
e44fb25ad9fa03 Haren Myneni 2025-01-04 480 ret = -EFAULT;
e44fb25ad9fa03 Haren Myneni 2025-01-04 481 else
e44fb25ad9fa03 Haren Myneni 2025-01-04 482 ret = 0;
e44fb25ad9fa03 Haren Myneni 2025-01-04 483 break;
e44fb25ad9fa03 Haren Myneni 2025-01-04 484 case RTAS_IBM_DYNAMIC_INDICE_NO_INDICATOR: /* No such indicator */
e44fb25ad9fa03 Haren Myneni 2025-01-04 485 ret = -EOPNOTSUPP;
e44fb25ad9fa03 Haren Myneni 2025-01-04 486 break;
e44fb25ad9fa03 Haren Myneni 2025-01-04 487 default:
e44fb25ad9fa03 Haren Myneni 2025-01-04 488 pr_err("unexpected ibm,get-dynamic-sensor result %d\n",
e44fb25ad9fa03 Haren Myneni 2025-01-04 489 fwrc);
e44fb25ad9fa03 Haren Myneni 2025-01-04 490 fallthrough;
e44fb25ad9fa03 Haren Myneni 2025-01-04 491 case RTAS_IBM_DYNAMIC_INDICE_HW_ERROR: /* Hardware/platform error */
e44fb25ad9fa03 Haren Myneni 2025-01-04 492 ret = -EIO;
e44fb25ad9fa03 Haren Myneni 2025-01-04 493 break;
e44fb25ad9fa03 Haren Myneni 2025-01-04 494 }
e44fb25ad9fa03 Haren Myneni 2025-01-04 495
e44fb25ad9fa03 Haren Myneni 2025-01-04 @496 return ret;
e44fb25ad9fa03 Haren Myneni 2025-01-04 497 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-01-09 7:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 20:46 [PATCH 0/6] Add character devices for indices and platform-dump RTAS Haren Myneni
2025-01-04 20:46 ` [PATCH 1/6] powerpc/pseries: Define common functions for RTAS sequence HCALLs Haren Myneni
2025-01-05 2:53 ` kernel test robot
2025-01-04 20:46 ` [PATCH 2/6] powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls Haren Myneni
2025-01-04 20:46 ` [PATCH 3/6] powerpc/pseries: Add papr-indices char driver for ibm,get-indices HCALL Haren Myneni
2025-01-05 3:45 ` kernel test robot
2025-01-04 20:46 ` [PATCH 4/6] powerpc/pseries: Add ibm,set-dynamic-indicator RTAS call support Haren Myneni
2025-01-09 7:38 ` Dan Carpenter
2025-01-04 20:46 ` [PATCH 5/6] powerpc/pseries: Add ibm,get-dynamic-sensor-state " Haren Myneni
2025-01-09 7:44 ` Dan Carpenter [this message]
2025-01-04 20:46 ` [PATCH 6/6] powerpc/pseries: Add papr-platform-dump character driver for dump retrieval Haren Myneni
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=b4313bdb-29ba-42c1-9011-4bb558d056ba@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=haren@linux.ibm.com \
--cc=hbabu@us.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.com \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=npiggin@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=tyreld@linux.ibm.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