linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations
@ 2025-11-11 18:19 kernel test robot
  2025-11-11 19:01 ` Pasha Tatashin
  2025-11-11 19:10 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: kernel test robot @ 2025-11-11 18:19 UTC (permalink / raw)
  To: Pasha Tatashin
  Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2666975a8905776d306bee01c5d98a0395bda1c9
commit: 74602408d6248999ca8a567c46ce0f78204d6e89 [7210/7661] liveupdate: luo_file: implement file systems callbacks
config: x86_64-buildonly-randconfig-001-20251112 (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-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/202511120222.vMZm9rD4-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     571 |                 get_file(luo_file->file);
         |                 ^
   kernel/liveupdate/luo_file.c:584:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     584 |                 get_file(luo_file->file);
         |                 ^
   2 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for OF_GPIO
   Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
   Selected by [y]:
   - GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
   WARNING: unmet direct dependencies detected for MFD_STMFX
   Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
   Selected by [y]:
   - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y] && HAS_IOMEM [=y]
   WARNING: unmet direct dependencies detected for GPIO_SYSCON
   Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
   Selected by [y]:
   - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
   WARNING: unmet direct dependencies detected for I2C_K1
   Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n]
   Selected by [y]:
   - MFD_SPACEMIT_P1 [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]


vim +/get_file +571 kernel/liveupdate/luo_file.c

   519	
   520	/**
   521	 * luo_retrieve_file - Restores a preserved file from a session by its token.
   522	 * @session: The session from which to retrieve the file.
   523	 * @token:   The unique token identifying the file to be restored.
   524	 * @filep:   Output parameter; on success, this is populated with a pointer
   525	 *           to the newly retrieved 'struct file'.
   526	 *
   527	 * This function is the primary mechanism for recreating a file in the new
   528	 * kernel after a live update. It searches the session's list of deserialized
   529	 * files for an entry matching the provided @token.
   530	 *
   531	 * The operation is idempotent: if a file has already been successfully
   532	 * retrieved, this function will simply return a pointer to the existing
   533	 * 'struct file' and report success without re-executing the retrieve
   534	 * operation. This is handled by checking the 'retrieved' flag under a lock.
   535	 *
   536	 * File retrieval can happen in any order; it is not bound by the order of
   537	 * preservation.
   538	 *
   539	 * Context: Can be called from an ioctl or other in-kernel code in the new
   540	 *          kernel.
   541	 * Return: 0 on success. Returns a negative errno on failure:
   542	 *         -ENOENT if no file with the matching token is found.
   543	 *         Any error code returned by the handler's .retrieve() op.
   544	 */
   545	int luo_retrieve_file(struct luo_session *session, u64 token,
   546			      struct file **filep)
   547	{
   548		struct liveupdate_file_op_args args = {0};
   549		struct luo_file *luo_file;
   550		int err;
   551	
   552		lockdep_assert_held(&session->mutex);
   553	
   554		if (list_empty(&session->files_list))
   555			return -ENOENT;
   556	
   557		list_for_each_entry(luo_file, &session->files_list, list) {
   558			if (luo_file->token == token)
   559				break;
   560		}
   561	
   562		if (luo_file->token != token)
   563			return -ENOENT;
   564	
   565		guard(mutex)(&luo_file->mutex);
   566		if (luo_file->retrieved) {
   567			/*
   568			 * Someone is asking for this file again, so get a reference
   569			 * for them.
   570			 */
 > 571			get_file(luo_file->file);
   572			*filep = luo_file->file;
   573			return 0;
   574		}
   575	
   576		args.handler = luo_file->fh;
   577		args.session = (struct liveupdate_session *)session;
   578		args.serialized_data = luo_file->serialized_data;
   579		err = luo_file->fh->ops->retrieve(&args);
   580		if (!err) {
   581			luo_file->file = args.file;
   582	
   583			/* Get reference so we can keep this file in LUO until finish */
   584			get_file(luo_file->file);
   585			*filep = luo_file->file;
   586			luo_file->retrieved = true;
   587		}
   588	
   589		return err;
   590	}
   591	

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations
  2025-11-11 18:19 [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2025-11-11 19:01 ` Pasha Tatashin
  2025-11-11 19:10 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Pasha Tatashin @ 2025-11-11 19:01 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List

On Tue, Nov 11, 2025 at 1:20 PM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   2666975a8905776d306bee01c5d98a0395bda1c9
> commit: 74602408d6248999ca8a567c46ce0f78204d6e89 [7210/7661] liveupdate: luo_file: implement file systems callbacks
> config: x86_64-buildonly-randconfig-001-20251112 (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-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/202511120222.vMZm9rD4-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      571 |                 get_file(luo_file->file);
>          |                 ^
>    kernel/liveupdate/luo_file.c:584:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      584 |                 get_file(luo_file->file);
>          |                 ^
>    2 errors generated.

Thanks, the fs.h header is missing from the luo_file.c:

diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c
index d5197149b3b7..adc411dbfead 100644
--- a/kernel/liveupdate/luo_file.c
+++ b/kernel/liveupdate/luo_file.c
@@ -97,6 +97,7 @@
 #include <linux/cleanup.h>
 #include <linux/err.h>
 #include <linux/file.h>
+#include <linux/fs.h>
 #include <linux/kexec_handover.h>
 #include <linux/liveupdate.h>
 #include <linux/liveupdate/abi/luo.h>


>
> Kconfig warnings: (for reference only)
>    WARNING: unmet direct dependencies detected for OF_GPIO
>    Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
>    Selected by [y]:
>    - GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
>    WARNING: unmet direct dependencies detected for MFD_STMFX
>    Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
>    Selected by [y]:
>    - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y] && HAS_IOMEM [=y]
>    WARNING: unmet direct dependencies detected for GPIO_SYSCON
>    Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
>    Selected by [y]:
>    - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
>    WARNING: unmet direct dependencies detected for I2C_K1
>    Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n]
>    Selected by [y]:
>    - MFD_SPACEMIT_P1 [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]
>
>
> vim +/get_file +571 kernel/liveupdate/luo_file.c
>
>    519
>    520  /**
>    521   * luo_retrieve_file - Restores a preserved file from a session by its token.
>    522   * @session: The session from which to retrieve the file.
>    523   * @token:   The unique token identifying the file to be restored.
>    524   * @filep:   Output parameter; on success, this is populated with a pointer
>    525   *           to the newly retrieved 'struct file'.
>    526   *
>    527   * This function is the primary mechanism for recreating a file in the new
>    528   * kernel after a live update. It searches the session's list of deserialized
>    529   * files for an entry matching the provided @token.
>    530   *
>    531   * The operation is idempotent: if a file has already been successfully
>    532   * retrieved, this function will simply return a pointer to the existing
>    533   * 'struct file' and report success without re-executing the retrieve
>    534   * operation. This is handled by checking the 'retrieved' flag under a lock.
>    535   *
>    536   * File retrieval can happen in any order; it is not bound by the order of
>    537   * preservation.
>    538   *
>    539   * Context: Can be called from an ioctl or other in-kernel code in the new
>    540   *          kernel.
>    541   * Return: 0 on success. Returns a negative errno on failure:
>    542   *         -ENOENT if no file with the matching token is found.
>    543   *         Any error code returned by the handler's .retrieve() op.
>    544   */
>    545  int luo_retrieve_file(struct luo_session *session, u64 token,
>    546                        struct file **filep)
>    547  {
>    548          struct liveupdate_file_op_args args = {0};
>    549          struct luo_file *luo_file;
>    550          int err;
>    551
>    552          lockdep_assert_held(&session->mutex);
>    553
>    554          if (list_empty(&session->files_list))
>    555                  return -ENOENT;
>    556
>    557          list_for_each_entry(luo_file, &session->files_list, list) {
>    558                  if (luo_file->token == token)
>    559                          break;
>    560          }
>    561
>    562          if (luo_file->token != token)
>    563                  return -ENOENT;
>    564
>    565          guard(mutex)(&luo_file->mutex);
>    566          if (luo_file->retrieved) {
>    567                  /*
>    568                   * Someone is asking for this file again, so get a reference
>    569                   * for them.
>    570                   */
>  > 571                  get_file(luo_file->file);
>    572                  *filep = luo_file->file;
>    573                  return 0;
>    574          }
>    575
>    576          args.handler = luo_file->fh;
>    577          args.session = (struct liveupdate_session *)session;
>    578          args.serialized_data = luo_file->serialized_data;
>    579          err = luo_file->fh->ops->retrieve(&args);
>    580          if (!err) {
>    581                  luo_file->file = args.file;
>    582
>    583                  /* Get reference so we can keep this file in LUO until finish */
>    584                  get_file(luo_file->file);
>    585                  *filep = luo_file->file;
>    586                  luo_file->retrieved = true;
>    587          }
>    588
>    589          return err;
>    590  }
>    591
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations
  2025-11-11 18:19 [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations kernel test robot
  2025-11-11 19:01 ` Pasha Tatashin
@ 2025-11-11 19:10 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2025-11-11 19:10 UTC (permalink / raw)
  To: kernel test robot
  Cc: Pasha Tatashin, llvm, oe-kbuild-all, Linux Memory Management List

On Wed, 12 Nov 2025 02:19:06 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   2666975a8905776d306bee01c5d98a0395bda1c9
> commit: 74602408d6248999ca8a567c46ce0f78204d6e89 [7210/7661] liveupdate: luo_file: implement file systems callbacks
> config: x86_64-buildonly-randconfig-001-20251112 (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251112/202511120222.vMZm9rD4-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/202511120222.vMZm9rD4-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      571 |                 get_file(luo_file->file);
>          |                 ^

Thanks.

--- a/kernel/liveupdate/luo_file.c~liveupdate-luo_file-implement-file-systems-callbacks-fix
+++ a/kernel/liveupdate/luo_file.c
@@ -102,6 +102,7 @@
 #include <linux/liveupdate/abi/luo.h>
 #include <linux/module.h>
 #include <linux/rwsem.h>
+#include <linux/fs.h>
 #include <linux/sizes.h>
 #include <linux/slab.h>
 #include <linux/string.h>
_




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-11 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-11 18:19 [linux-next:master 7210/7661] kernel/liveupdate/luo_file.c:571:3: error: call to undeclared function 'get_file'; ISO C99 and later do not support implicit function declarations kernel test robot
2025-11-11 19:01 ` Pasha Tatashin
2025-11-11 19:10 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox