llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Christian Brauner <christianvanbrauner@gmail.com>
Subject: [brauner-github:work.fd.prepare.scoped 38/51] arch/powerpc/platforms/pseries/papr-platform-dump.c:344:13: error: expected ';' after return statement
Date: Sun, 23 Nov 2025 12:39:14 +0800	[thread overview]
Message-ID: <202511231423.4weNFSVC-lkp@intel.com> (raw)

tree:   https://github.com/brauner/linux.git work.fd.prepare.scoped
head:   09ba3707485de081133d97c9bdc7fa364d318f46
commit: 50297133917dafcd5d8924120ff66dc108351f57 [38/51] pseries: convert papr_platform_dump_create_handle() to FD_PREPARE()
config: powerpc64-randconfig-002-20251123 (https://download.01.org/0day-ci/archive/20251123/202511231423.4weNFSVC-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251123/202511231423.4weNFSVC-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511231423.4weNFSVC-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/powerpc/platforms/pseries/papr-platform-dump.c:344:13: error: expected ';' after return statement
     344 |                 return err
         |                           ^
         |                           ;
   1 error generated.


vim +344 arch/powerpc/platforms/pseries/papr-platform-dump.c

   281	
   282	/**
   283	 * papr_platform_dump_create_handle() - Create a fd-based handle for
   284	 * reading platform dump
   285	 *
   286	 * Handler for PAPR_PLATFORM_DUMP_IOC_CREATE_HANDLE ioctl command
   287	 * Allocates RTAS parameter struct and work area and attached to the
   288	 * file descriptor for reading by user space with the multiple RTAS
   289	 * calls until the dump is completed. This memory allocation is freed
   290	 * when the file is released.
   291	 *
   292	 * Multiple dump requests with different IDs are allowed at the same
   293	 * time, but not with the same dump ID. So if the user space is
   294	 * already opened file descriptor for the specific dump ID, return
   295	 * -EALREADY for the next request.
   296	 *
   297	 * @dump_tag: Dump ID for the dump requested to retrieve from the
   298	 *		hypervisor
   299	 *
   300	 * Return: The installed fd number if successful, -ve errno otherwise.
   301	 */
   302	static long papr_platform_dump_create_handle(u64 dump_tag)
   303	{
   304		struct ibm_platform_dump_params *params, *tmp;
   305		u64 param_dump_tag;
   306		int err;
   307	
   308		/*
   309		 * Return failure if the user space is already opened FD for
   310		 * the specific dump ID. This check will prevent multiple dump
   311		 * requests for the same dump ID at the same time. Generally
   312		 * should not expect this, but in case.
   313		 */
   314		list_for_each_entry(params, &platform_dump_list, list) {
   315			param_dump_tag = (u64) (((u64)params->dump_tag_hi << 32) |
   316						params->dump_tag_lo);
   317			if (dump_tag == param_dump_tag) {
   318				pr_err("Platform dump for ID(%llu) is already in progress\n",
   319						dump_tag);
   320				return -EALREADY;
   321			}
   322		}
   323	
   324		params =  kzalloc(sizeof(struct ibm_platform_dump_params),
   325				GFP_KERNEL_ACCOUNT);
   326		if (!params)
   327			return -ENOMEM;
   328	
   329		params->work_area = rtas_work_area_alloc(SZ_4K);
   330		params->buf_length = SZ_4K;
   331		params->dump_tag_hi = (u32)(dump_tag >> 32);
   332		params->dump_tag_lo = (u32)(dump_tag & 0x00000000ffffffffULL);
   333		params->status = RTAS_IBM_PLATFORM_DUMP_START;
   334	
   335		FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC,
   336			   anon_inode_getfile_fmode("[papr-platform-dump]",
   337						    &papr_platform_dump_handle_ops,
   338						    (void *)params, O_RDONLY,
   339						    FMODE_LSEEK | FMODE_PREAD));
   340		err = ACQUIRE_ERR(fd_prepare, &fdf);
   341		if (err) {
   342			rtas_work_area_free(params->work_area);
   343			kfree(params);
 > 344			return err
   345		}
   346	
   347		list_add(&params->list, &platform_dump_list);
   348	
   349		pr_info("%s (%d) initiated platform dump for dump tag %llu\n",
   350			current->comm, current->pid, dump_tag);
   351		return fd_publish(fdf);
   352	}
   353	

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

                 reply	other threads:[~2025-11-23  4:39 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=202511231423.4weNFSVC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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).