mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mario Limonciello <mario.limonciello@dell.com>
Cc: kbuild-all@01.org, dvhart@infradead.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>,
	quasisec@google.com, pali.rohar@gmail.com, rjw@rjwysocki.net,
	mjg59@google.com, hch@lst.de, Greg KH <greg@kroah.com>,
	Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
	Mario Limonciello <mario.limonciello@dell.com>
Subject: Re: [PATCH v8 14/15] platform/x86: wmi: create userspace interface for drivers
Date: Tue, 17 Oct 2017 11:58:46 +0800	[thread overview]
Message-ID: <201710171001.QvikJXhg%fengguang.wu@intel.com> (raw)
In-Reply-To: <f1e7105994dc973dea649f1fb6b0c58b0760c31b.1507958847.git.mario.limonciello@dell.com>

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

Hi Mario,

[auto build test WARNING on platform-drivers-x86/for-next]
[also build test WARNING on next-20171016]
[cannot apply to v4.14-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mario-Limonciello/Introduce-support-for-Dell-SMBIOS-over-WMI/20171017-103109
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: i386-randconfig-x002-201742 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/ioport.h:12:0,
                    from include/linux/acpi.h:25,
                    from drivers/platform/x86/wmi.c:36:
   drivers/platform/x86/wmi.c: In function 'match_ioctl':
   drivers/platform/x86/wmi.c:861:14: error: 'struct wmi_driver' has no member named 'compat_ioctl'; did you mean 'unlocked_ioctl'?
      if (wdriver->compat_ioctl)
                 ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/platform/x86/wmi.c:861:3: note: in expansion of macro 'if'
      if (wdriver->compat_ioctl)
      ^~
   drivers/platform/x86/wmi.c:861:14: error: 'struct wmi_driver' has no member named 'compat_ioctl'; did you mean 'unlocked_ioctl'?
      if (wdriver->compat_ioctl)
                 ^
   include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/platform/x86/wmi.c:861:3: note: in expansion of macro 'if'
      if (wdriver->compat_ioctl)
      ^~
   drivers/platform/x86/wmi.c:861:14: error: 'struct wmi_driver' has no member named 'compat_ioctl'; did you mean 'unlocked_ioctl'?
      if (wdriver->compat_ioctl)
                 ^
   include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/platform/x86/wmi.c:861:3: note: in expansion of macro 'if'
      if (wdriver->compat_ioctl)
      ^~
   drivers/platform/x86/wmi.c:862:17: error: 'struct wmi_driver' has no member named 'compat_ioctl'; did you mean 'unlocked_ioctl'?
       ret = wdriver->compat_ioctl(&wblock->dev, cmd, arg);
                    ^~
   At top level:
   drivers/platform/x86/wmi.c:877:13: warning: 'wmi_compat_ioctl' defined but not used [-Wunused-function]
    static long wmi_compat_ioctl(struct file *filp, unsigned int cmd,
                ^~~~~~~~~~~~~~~~

vim +/if +861 drivers/platform/x86/wmi.c

   802	
   803	static long match_ioctl(struct file *filp, unsigned int cmd, unsigned long arg,
   804				int compat)
   805	{
   806		struct wmi_ioctl_buffer __user *input =
   807			(struct wmi_ioctl_buffer __user *) arg;
   808		struct wmi_driver *wdriver = NULL;
   809		struct wmi_block *wblock = NULL;
   810		struct wmi_block *next = NULL;
   811		const char *driver_name;
   812		u64 size;
   813		int ret;
   814	
   815		if (_IOC_TYPE(cmd) != WMI_IOC)
   816			return -ENOTTY;
   817	
   818		driver_name = filp->f_path.dentry->d_iname;
   819	
   820		list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
   821			wdriver = container_of(wblock->dev.dev.driver,
   822						struct wmi_driver, driver);
   823			if (!wdriver)
   824				continue;
   825			if (strcmp(driver_name, wdriver->driver.name) == 0)
   826				break;
   827		}
   828	
   829		if (!wdriver)
   830			return -ENODEV;
   831	
   832		/* make sure we're not calling a higher instance than exists*/
   833		if (_IOC_NR(cmd) >= wblock->gblock.instance_count)
   834			return -EINVAL;
   835	
   836		/* check that required buffer size was declared by driver */
   837		if (!wblock->req_buf_size) {
   838			dev_err(&wblock->dev.dev, "Required buffer size not set\n");
   839			return -EINVAL;
   840		}
   841		if (get_user(size, &input->length)) {
   842			dev_dbg(&wblock->dev.dev, "Read length from user failed\n");
   843			return -EFAULT;
   844		}
   845		/* if it's too small, abort */
   846		if (size < wblock->req_buf_size) {
   847			dev_err(&wblock->dev.dev,
   848				"Buffer %lld too small, need at least %lld\n",
   849				size, wblock->req_buf_size);
   850			return -EINVAL;
   851		}
   852		/* if it's too big, warn, driver will only use what is needed */
   853		if (size > wblock->req_buf_size)
   854			dev_warn(&wblock->dev.dev,
   855				"Buffer %lld is bigger than required %lld\n",
   856				size, wblock->req_buf_size);
   857	
   858		if (!try_module_get(wdriver->driver.owner))
   859			return -EBUSY;
   860		if (compat) {
 > 861			if (wdriver->compat_ioctl)
   862				ret = wdriver->compat_ioctl(&wblock->dev, cmd, arg);
   863			else
   864				ret = -ENODEV;
   865		} else
   866			ret = wdriver->unlocked_ioctl(&wblock->dev, cmd, arg);
   867		module_put(wdriver->driver.owner);
   868	
   869		return ret;
   870	}
   871	static long wmi_unlocked_ioctl(struct file *filp, unsigned int cmd,
   872				       unsigned long arg)
   873	{
   874		return match_ioctl(filp, cmd, arg, 0);
   875	}
   876	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2017-10-17  3:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  5:32 [PATCH v8 00/15] Introduce support for Dell SMBIOS over WMI Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 01/15] platform/x86: wmi: Add new method wmidev_evaluate_method Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 02/15] platform/x86: dell-wmi: increase severity of some failures Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 03/15] platform/x86: dell-wmi: clean up wmi descriptor check Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 04/15] platform/x86: dell-wmi: allow 32k return size in the descriptor Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 05/15] platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 06/15] platform/x86: wmi: Don't allow drivers to get each other's GUIDs Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 07/15] platform/x86: dell-smbios: only run if proper oem string is detected Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 08/15] platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens Mario Limonciello
2017-10-17  6:37   ` kbuild test robot
2017-10-14  5:32 ` [PATCH v8 09/15] platform/x86: dell-smbios: Introduce dispatcher for SMM calls Mario Limonciello
2017-10-17  3:49   ` kbuild test robot
2017-10-17  4:14   ` [PATCH] platform/x86: dell-smbios: fix semicolon.cocci warnings kbuild test robot
2017-10-17  4:14   ` [PATCH v8 09/15] platform/x86: dell-smbios: Introduce dispatcher for SMM calls kbuild test robot
2017-10-17  4:20   ` kbuild test robot
2017-10-14  5:32 ` [PATCH v8 10/15] platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 11/15] platform/x86: dell-smbios-smm: test for WSMT Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 12/15] platform/x86: dell-smbios: Add filtering support Mario Limonciello
2017-10-17  4:11   ` kbuild test robot
2017-10-14  5:32 ` [PATCH v8 13/15] platform/x86: wmi: Add sysfs attribute for required_buffer_size Mario Limonciello
2017-10-14  5:32 ` [PATCH v8 14/15] platform/x86: wmi: create userspace interface for drivers Mario Limonciello
2017-10-17  3:58   ` kbuild test robot [this message]
2017-10-14  5:32 ` [PATCH v8 15/15] platform/x86: dell-smbios-wmi: introduce userspace interface Mario Limonciello
2017-10-16  2:45 ` [PATCH v8 00/15] Introduce support for Dell SMBIOS over WMI Edward O'Callaghan
2017-10-16  7:33 ` Pali Rohár
2017-10-16 13:23   ` Mario.Limonciello
2017-10-16 13:37     ` Pali Rohár
2017-10-16 13:48       ` Mario.Limonciello
2017-10-16 21:56         ` Darren Hart
2017-10-17 14:22           ` Mario.Limonciello

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=201710171001.QvikJXhg%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=hch@lst.de \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=mjg59@google.com \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=quasisec@google.com \
    --cc=rjw@rjwysocki.net \
    /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

all inboxes | Powered by JetHome®