linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Laurent Dufour <ldufour@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
	tyreld@linux.ibm.com, kbuild-all@lists.01.org
Subject: Re: [PATCH v5] powerpc/pseries: read the lpar name from the firmware
Date: Mon, 10 Jan 2022 21:33:00 +0800	[thread overview]
Message-ID: <202201102154.a95OQEPr-lkp@intel.com> (raw)
In-Reply-To: <20220106161339.74656-1-ldufour@linux.ibm.com>

Hi Laurent,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on linux/master linus/master v5.16 next-20220110]
[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/Laurent-Dufour/powerpc-pseries-read-the-lpar-name-from-the-firmware/20220107-001503
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r026-20220106 (https://download.01.org/0day-ci/archive/20220110/202201102154.a95OQEPr-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.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/5cf0dea6e919e93ff3088f87acd40e84608a6861
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Laurent-Dufour/powerpc-pseries-read-the-lpar-name-from-the-firmware/20220107-001503
        git checkout 5cf0dea6e919e93ff3088f87acd40e84608a6861
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/platforms/pseries/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/powerpc/platforms/pseries/lparcfg.c:257: warning: Function parameter or member 'm' not described in 'parse_mpp_data'
   arch/powerpc/platforms/pseries/lparcfg.c:295: warning: Function parameter or member 'm' not described in 'parse_mpp_x_data'
   arch/powerpc/platforms/pseries/lparcfg.c:334: warning: Function parameter or member 'm' not described in 'read_RTAS_lpar_name'
>> arch/powerpc/platforms/pseries/lparcfg.c:334: warning: expecting prototype for Read the lpar name using the RTAS ibm,get-system(). Prototype was for read_RTAS_lpar_name() instead
>> arch/powerpc/platforms/pseries/lparcfg.c:378: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Read the LPAR name from the Device Tree.
   arch/powerpc/platforms/pseries/lparcfg.c:678: warning: Function parameter or member 'entitlement' not described in 'update_mpp'
   arch/powerpc/platforms/pseries/lparcfg.c:678: warning: Function parameter or member 'weight' not described in 'update_mpp'


vim +334 arch/powerpc/platforms/pseries/lparcfg.c

   323	
   324	/**
   325	 * Read the lpar name using the RTAS ibm,get-system-parameter call.
   326	 *
   327	 * The name read through this call is updated if changes are made by the end
   328	 * user on the hypervisor side.
   329	 *
   330	 * Some hypervisor (like Qemu) may not provide this value. In that case, a non
   331	 * null value is returned.
   332	 */
   333	static int read_RTAS_lpar_name(struct seq_file *m)
 > 334	{
   335		int rc, len, token;
   336		union {
   337			char raw_buffer[GET_SYS_PARM_BUF_SIZE];
   338			struct {
   339				__be16 len;
   340				char name[GET_SYS_PARM_BUF_SIZE-2];
   341			};
   342		} *local_buffer;
   343	
   344		token = rtas_token("ibm,get-system-parameter");
   345		if (token == RTAS_UNKNOWN_SERVICE)
   346			return -EINVAL;
   347	
   348		local_buffer = kmalloc(sizeof(*local_buffer), GFP_KERNEL);
   349		if (!local_buffer)
   350			return -ENOMEM;
   351	
   352		do {
   353			spin_lock(&rtas_data_buf_lock);
   354			memset(rtas_data_buf, 0, sizeof(*local_buffer));
   355			rc = rtas_call(token, 3, 1, NULL, SPLPAR_LPAR_NAME_TOKEN,
   356				       __pa(rtas_data_buf), sizeof(*local_buffer));
   357			if (!rc)
   358				memcpy(local_buffer->raw_buffer, rtas_data_buf,
   359				       sizeof(local_buffer->raw_buffer));
   360			spin_unlock(&rtas_data_buf_lock);
   361		} while (rtas_busy_delay(rc));
   362	
   363		if (!rc) {
   364			/* Force end of string */
   365			len = min((int) be16_to_cpu(local_buffer->len),
   366				  (int) sizeof(local_buffer->name)-1);
   367			local_buffer->name[len] = '\0';
   368	
   369			seq_printf(m, "partition_name=%s\n", local_buffer->name);
   370		} else
   371			rc = -ENODATA;
   372	
   373		kfree(local_buffer);
   374		return rc;
   375	}
   376	
   377	/**
 > 378	 * Read the LPAR name from the Device Tree.
   379	 *
   380	 * The value read in the DT is not updated if the end-user is touching the LPAR
   381	 * name on the hypervisor side.
   382	 */
   383	static int read_DT_lpar_name(struct seq_file *m)
   384	{
   385		struct device_node *rootdn;
   386		const char *name;
   387	
   388		rootdn = of_find_node_by_path("/");
   389		if (!rootdn)
   390			return -ENOENT;
   391	
   392		name = of_get_property(rootdn, "ibm,partition-name", NULL);
   393		if (!name)
   394			return -ENOENT;
   395	
   396		seq_printf(m, "partition_name=%s\n", name);
   397		return 0;
   398	}
   399	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

  parent reply	other threads:[~2022-01-10 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 16:13 [PATCH v5] powerpc/pseries: read the lpar name from the firmware Laurent Dufour
2022-01-06 21:13 ` Nathan Lynch
2022-01-06 21:38 ` Tyrel Datwyler
2022-01-11 22:40   ` Michael Ellerman
2022-01-12 13:10     ` Laurent Dufour
2022-01-10 13:33 ` kernel test robot [this message]
2022-02-15  5:26 ` Michael Ellerman

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=202201102154.a95OQEPr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nathanl@linux.ibm.com \
    --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;
as well as URLs for NNTP newsgroup(s).