LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 4/6] powerpc/pseries: Add ibm,set-dynamic-indicator RTAS call support
Date: Thu, 9 Jan 2025 10:38:31 +0300	[thread overview]
Message-ID: <dbbe27ff-c9e8-4956-a63e-d2db2ec624a7@stanley.mountain> (raw)
In-Reply-To: <20250104204652.388720-5-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-5-haren%40linux.ibm.com
patch subject: [PATCH 4/6] powerpc/pseries: Add ibm,set-dynamic-indicator RTAS call support
config: powerpc64-randconfig-r071-20250108 (https://download.01.org/0day-ci/archive/20250109/202501090337.xKCGrblc-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/202501090337.xKCGrblc-lkp@intel.com/

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 +438 arch/powerpc/platforms/pseries/papr-indices.c

3f48afd07934e4 Haren Myneni 2025-01-04  397  static long papr_dynamic_indicator_ioc_set(struct papr_indices_io_block __user *ubuf)
3f48afd07934e4 Haren Myneni 2025-01-04  398  {
3f48afd07934e4 Haren Myneni 2025-01-04  399  	struct papr_indices_io_block kbuf;
3f48afd07934e4 Haren Myneni 2025-01-04  400  	struct rtas_work_area *work_area;
3f48afd07934e4 Haren Myneni 2025-01-04  401  	s32 fwrc, token, ret;
3f48afd07934e4 Haren Myneni 2025-01-04  402  
3f48afd07934e4 Haren Myneni 2025-01-04  403  	token = rtas_function_token(RTAS_FN_IBM_SET_DYNAMIC_INDICATOR);
3f48afd07934e4 Haren Myneni 2025-01-04  404  	if (token == RTAS_UNKNOWN_SERVICE)
3f48afd07934e4 Haren Myneni 2025-01-04  405  		return -ENOENT;
3f48afd07934e4 Haren Myneni 2025-01-04  406  
3f48afd07934e4 Haren Myneni 2025-01-04  407  	mutex_lock(&rtas_ibm_set_dynamic_indicator_lock);
3f48afd07934e4 Haren Myneni 2025-01-04  408  	work_area = papr_dynamic_indice_buf_from_user(ubuf, &kbuf);
3f48afd07934e4 Haren Myneni 2025-01-04  409  	if (IS_ERR(work_area))
3f48afd07934e4 Haren Myneni 2025-01-04  410  		return PTR_ERR(work_area);

mutex_unlock(&rtas_ibm_set_dynamic_indicator_lock); before returning

3f48afd07934e4 Haren Myneni 2025-01-04  411  
3f48afd07934e4 Haren Myneni 2025-01-04  412  	do {
3f48afd07934e4 Haren Myneni 2025-01-04  413  		fwrc = rtas_call(token, 3, 1, NULL,
3f48afd07934e4 Haren Myneni 2025-01-04  414  				kbuf.dynamic_param.token,
3f48afd07934e4 Haren Myneni 2025-01-04  415  				kbuf.dynamic_param.state,
3f48afd07934e4 Haren Myneni 2025-01-04  416  				rtas_work_area_phys(work_area));
3f48afd07934e4 Haren Myneni 2025-01-04  417  	} while (rtas_busy_delay(fwrc));
3f48afd07934e4 Haren Myneni 2025-01-04  418  
3f48afd07934e4 Haren Myneni 2025-01-04  419  	rtas_work_area_free(work_area);
3f48afd07934e4 Haren Myneni 2025-01-04  420  	mutex_unlock(&rtas_ibm_set_dynamic_indicator_lock);
3f48afd07934e4 Haren Myneni 2025-01-04  421  
3f48afd07934e4 Haren Myneni 2025-01-04  422  	switch (fwrc) {
3f48afd07934e4 Haren Myneni 2025-01-04  423  	case RTAS_IBM_DYNAMIC_INDICE_SUCCESS:
3f48afd07934e4 Haren Myneni 2025-01-04  424  		ret = 0;
3f48afd07934e4 Haren Myneni 2025-01-04  425  		break;
3f48afd07934e4 Haren Myneni 2025-01-04  426  	case RTAS_IBM_DYNAMIC_INDICE_NO_INDICATOR:	/* No such indicator */
3f48afd07934e4 Haren Myneni 2025-01-04  427  		ret = -EOPNOTSUPP;
3f48afd07934e4 Haren Myneni 2025-01-04  428  		break;
3f48afd07934e4 Haren Myneni 2025-01-04  429  	default:
3f48afd07934e4 Haren Myneni 2025-01-04  430  		pr_err("unexpected ibm,set-dynamic-indicator result %d\n",
3f48afd07934e4 Haren Myneni 2025-01-04  431  			fwrc);
3f48afd07934e4 Haren Myneni 2025-01-04  432  		fallthrough;
3f48afd07934e4 Haren Myneni 2025-01-04  433  	case RTAS_IBM_DYNAMIC_INDICE_HW_ERROR:	/* Hardware/platform error */
3f48afd07934e4 Haren Myneni 2025-01-04  434  		ret = -EIO;
3f48afd07934e4 Haren Myneni 2025-01-04  435  		break;
3f48afd07934e4 Haren Myneni 2025-01-04  436  	}
3f48afd07934e4 Haren Myneni 2025-01-04  437  
3f48afd07934e4 Haren Myneni 2025-01-04 @438  	return ret;
3f48afd07934e4 Haren Myneni 2025-01-04  439  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



  reply	other threads:[~2025-01-09  7:38 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 [this message]
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
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=dbbe27ff-c9e8-4956-a63e-d2db2ec624a7@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