All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chen Yu <yu.c.chen@intel.com>, linux-acpi@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Ard Biesheuvel <ardb@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ashok Raj <ashok.raj@intel.com>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Mike Rapoport <rppt@kernel.org>, Aubrey Li <aubrey.li@intel.com>
Subject: Re: [PATCH v4 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry
Date: Thu, 21 Oct 2021 14:37:50 +0800	[thread overview]
Message-ID: <202110211416.GX3qiZxp-lkp@intel.com> (raw)
In-Reply-To: <838245e376c7e6fd0fe1ef55d004ed53763846a2.1634310710.git.yu.c.chen@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5495 bytes --]

Hi Chen,

I love your patch! Perhaps something to improve:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on efi/next linus/master v5.15-rc6 next-20211020]
[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/Chen-Yu/Introduce-Platform-Firmware-Runtime-Update-and-Telemetry-drivers/20211016-184349
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-c007-20211021 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8)
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/93acf331ef196b860f6b34a5e9f8b3a249f1a0ce
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chen-Yu/Introduce-Platform-Firmware-Runtime-Update-and-Telemetry-drivers/20211016-184349
        git checkout 93acf331ef196b860f6b34a5e9f8b3a249f1a0ce
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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 >>):

>> drivers/acpi/pfru/pfru_update.c:280:6: warning: no previous prototype for function 'pfru_log_ioctl' [-Wmissing-prototypes]
   long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        ^
   drivers/acpi/pfru/pfru_update.c:280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
   ^
   static 
>> drivers/acpi/pfru/pfru_update.c:338:9: warning: no previous prototype for function 'pfru_log_read' [-Wmissing-prototypes]
   ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
           ^
   drivers/acpi/pfru/pfru_update.c:338:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
   ^
   static 
   2 warnings generated.


vim +/pfru_log_ioctl +280 drivers/acpi/pfru/pfru_update.c

   279	
 > 280	long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
   281	{
   282		struct pfru_log_data_info data_info;
   283		struct pfru_log_info info;
   284		void __user *p;
   285		int ret = 0;
   286	
   287		if (!pfru_log_dev)
   288			return -ENODEV;
   289	
   290		p = (void __user *)arg;
   291	
   292		switch (cmd) {
   293		case PFRU_LOG_IOC_SET_INFO:
   294			if (copy_from_user(&info, p, sizeof(info)))
   295				return -EFAULT;
   296	
   297			if (pfru_valid_revid(info.log_revid))
   298				pfru_log_dev->info.log_revid = info.log_revid;
   299	
   300			if (valid_log_level(info.log_level)) {
   301				ret = set_pfru_log_level(info.log_level);
   302				if (ret)
   303					return ret;
   304				pfru_log_dev->info.log_level = info.log_level;
   305			}
   306	
   307			if (valid_log_type(info.log_type))
   308				pfru_log_dev->info.log_type = info.log_type;
   309	
   310			break;
   311		case PFRU_LOG_IOC_GET_INFO:
   312			ret = get_pfru_log_level(&info.log_level);
   313			if (ret)
   314				return ret;
   315	
   316			info.log_type = pfru_log_dev->info.log_type;
   317			info.log_revid = pfru_log_dev->info.log_revid;
   318			if (copy_to_user(p, &info, sizeof(info)))
   319				ret = -EFAULT;
   320	
   321			break;
   322		case PFRU_LOG_IOC_GET_DATA_INFO:
   323			ret = get_pfru_log_data_info(&data_info, pfru_log_dev->info.log_type);
   324			if (ret)
   325				return ret;
   326	
   327			if (copy_to_user(p, &data_info, sizeof(struct pfru_log_data_info)))
   328				ret = -EFAULT;
   329	
   330			break;
   331		default:
   332			ret = -ENOTTY;
   333			break;
   334		}
   335		return ret;
   336	}
   337	
 > 338	ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
   339			      size_t size, loff_t *off)
   340	{
   341		struct pfru_log_data_info info;
   342		phys_addr_t base_addr;
   343		int buf_size, ret;
   344		char *buf_ptr;
   345	
   346		if (!pfru_log_dev)
   347			return -ENODEV;
   348	
   349		if (*off < 0)
   350			return -EINVAL;
   351	
   352		ret = get_pfru_log_data_info(&info, pfru_log_dev->info.log_type);
   353		if (ret)
   354			return ret;
   355	
   356		base_addr = (phys_addr_t)(info.chunk2_addr_lo | (info.chunk2_addr_hi << 32));
   357		/* pfru update has not been launched yet.*/
   358		if (!base_addr)
   359			return -EBUSY;
   360	
   361		buf_size = info.max_data_size;
   362		if (*off >= buf_size)
   363			return 0;
   364	
   365		buf_ptr = memremap(base_addr, buf_size, MEMREMAP_WB);
   366		if (IS_ERR(buf_ptr))
   367			return PTR_ERR(buf_ptr);
   368	
   369		size = min_t(size_t, size, buf_size - *off);
   370		if (copy_to_user(ubuf, buf_ptr + *off, size))
   371			ret = -EFAULT;
   372		else
   373			ret = 0;
   374	
   375		memunmap(buf_ptr);
   376	
   377		return ret ? ret : size;
   378	}
   379	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35320 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry
Date: Thu, 21 Oct 2021 14:37:50 +0800	[thread overview]
Message-ID: <202110211416.GX3qiZxp-lkp@intel.com> (raw)
In-Reply-To: <838245e376c7e6fd0fe1ef55d004ed53763846a2.1634310710.git.yu.c.chen@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5650 bytes --]

Hi Chen,

I love your patch! Perhaps something to improve:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on efi/next linus/master v5.15-rc6 next-20211020]
[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/Chen-Yu/Introduce-Platform-Firmware-Runtime-Update-and-Telemetry-drivers/20211016-184349
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-c007-20211021 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8)
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/93acf331ef196b860f6b34a5e9f8b3a249f1a0ce
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chen-Yu/Introduce-Platform-Firmware-Runtime-Update-and-Telemetry-drivers/20211016-184349
        git checkout 93acf331ef196b860f6b34a5e9f8b3a249f1a0ce
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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 >>):

>> drivers/acpi/pfru/pfru_update.c:280:6: warning: no previous prototype for function 'pfru_log_ioctl' [-Wmissing-prototypes]
   long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        ^
   drivers/acpi/pfru/pfru_update.c:280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
   ^
   static 
>> drivers/acpi/pfru/pfru_update.c:338:9: warning: no previous prototype for function 'pfru_log_read' [-Wmissing-prototypes]
   ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
           ^
   drivers/acpi/pfru/pfru_update.c:338:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
   ^
   static 
   2 warnings generated.


vim +/pfru_log_ioctl +280 drivers/acpi/pfru/pfru_update.c

   279	
 > 280	long pfru_log_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
   281	{
   282		struct pfru_log_data_info data_info;
   283		struct pfru_log_info info;
   284		void __user *p;
   285		int ret = 0;
   286	
   287		if (!pfru_log_dev)
   288			return -ENODEV;
   289	
   290		p = (void __user *)arg;
   291	
   292		switch (cmd) {
   293		case PFRU_LOG_IOC_SET_INFO:
   294			if (copy_from_user(&info, p, sizeof(info)))
   295				return -EFAULT;
   296	
   297			if (pfru_valid_revid(info.log_revid))
   298				pfru_log_dev->info.log_revid = info.log_revid;
   299	
   300			if (valid_log_level(info.log_level)) {
   301				ret = set_pfru_log_level(info.log_level);
   302				if (ret)
   303					return ret;
   304				pfru_log_dev->info.log_level = info.log_level;
   305			}
   306	
   307			if (valid_log_type(info.log_type))
   308				pfru_log_dev->info.log_type = info.log_type;
   309	
   310			break;
   311		case PFRU_LOG_IOC_GET_INFO:
   312			ret = get_pfru_log_level(&info.log_level);
   313			if (ret)
   314				return ret;
   315	
   316			info.log_type = pfru_log_dev->info.log_type;
   317			info.log_revid = pfru_log_dev->info.log_revid;
   318			if (copy_to_user(p, &info, sizeof(info)))
   319				ret = -EFAULT;
   320	
   321			break;
   322		case PFRU_LOG_IOC_GET_DATA_INFO:
   323			ret = get_pfru_log_data_info(&data_info, pfru_log_dev->info.log_type);
   324			if (ret)
   325				return ret;
   326	
   327			if (copy_to_user(p, &data_info, sizeof(struct pfru_log_data_info)))
   328				ret = -EFAULT;
   329	
   330			break;
   331		default:
   332			ret = -ENOTTY;
   333			break;
   334		}
   335		return ret;
   336	}
   337	
 > 338	ssize_t pfru_log_read(struct file *filp, char __user *ubuf,
   339			      size_t size, loff_t *off)
   340	{
   341		struct pfru_log_data_info info;
   342		phys_addr_t base_addr;
   343		int buf_size, ret;
   344		char *buf_ptr;
   345	
   346		if (!pfru_log_dev)
   347			return -ENODEV;
   348	
   349		if (*off < 0)
   350			return -EINVAL;
   351	
   352		ret = get_pfru_log_data_info(&info, pfru_log_dev->info.log_type);
   353		if (ret)
   354			return ret;
   355	
   356		base_addr = (phys_addr_t)(info.chunk2_addr_lo | (info.chunk2_addr_hi << 32));
   357		/* pfru update has not been launched yet.*/
   358		if (!base_addr)
   359			return -EBUSY;
   360	
   361		buf_size = info.max_data_size;
   362		if (*off >= buf_size)
   363			return 0;
   364	
   365		buf_ptr = memremap(base_addr, buf_size, MEMREMAP_WB);
   366		if (IS_ERR(buf_ptr))
   367			return PTR_ERR(buf_ptr);
   368	
   369		size = min_t(size_t, size, buf_size - *off);
   370		if (copy_to_user(ubuf, buf_ptr + *off, size))
   371			ret = -EFAULT;
   372		else
   373			ret = 0;
   374	
   375		memunmap(buf_ptr);
   376	
   377		return ret ? ret : size;
   378	}
   379	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35320 bytes --]

  parent reply	other threads:[~2021-10-21  6:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16 10:26 [PATCH v4 0/4] Introduce Platform Firmware Runtime Update and Telemetry drivers Chen Yu
2021-10-16 10:31 ` [PATCH v4 1/4] efi: Introduce EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER and corresponding structures Chen Yu
2021-10-16 10:40 ` [PATCH v4 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Chen Yu
2021-10-16 15:16   ` Greg Kroah-Hartman
2021-10-19 16:33     ` Rafael J. Wysocki
2021-10-20  8:00     ` Chen Yu
2021-10-16 10:44 ` [PATCH v4 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry Chen Yu
2021-10-16 15:10   ` Greg Kroah-Hartman
2021-10-20  8:29     ` Chen Yu
2021-10-20  8:27       ` Greg Kroah-Hartman
2021-10-20  8:53         ` Mike Rapoport
2021-10-20  9:17         ` Chen Yu
2021-10-21  6:37   ` kernel test robot [this message]
2021-10-21  6:37     ` kernel test robot
2021-10-16 10:47 ` [PATCH v4 4/4] tools: Introduce power/acpi/pfru/pfru Chen Yu

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=202110211416.GX3qiZxp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=ardb@kernel.org \
    --cc=ashok.raj@intel.com \
    --cc=aubrey.li@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rppt@kernel.org \
    --cc=yu.c.chen@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.