public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Matthew Garrett <matthewgarrett@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, rui.zhang@intel.com,
	nisha.aram@intel.com, Matthew Garrett <mjg59@google.com>
Subject: Re: [PATCH 2/3] thermal/int340x_thermal: Export OEM vendor variables
Date: Tue, 14 Apr 2020 08:06:38 +0800	[thread overview]
Message-ID: <202004140831.Z4UV4ycg%lkp@intel.com> (raw)
In-Reply-To: <20200413210644.201801-2-matthewgarrett@google.com>

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

Hi Matthew,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on linux/master soc-thermal/next v5.7-rc1 next-20200413]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Matthew-Garrett/thermal-int340x_thermal-Export-GDDV/20200414-052440
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8f3d9f354286745c751374f5f1fcafee6b3f3136
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/kobject.h:20:0,
                    from include/linux/module.h:20,
                    from drivers/thermal/intel/int340x_thermal/int3400_thermal.c:9:
   drivers/thermal/intel/int340x_thermal/int3400_thermal.c: In function 'evaluate_odvp':
>> drivers/thermal/intel/int340x_thermal/int3400_thermal.c:298:20: error: 'attr' undeclared (first use in this function); did you mean 'iattr'?
       sysfs_attr_init(attr->attr);
                       ^
   include/linux/sysfs.h:55:3: note: in definition of macro 'sysfs_attr_init'
     (attr)->key = &__key;    \
      ^~~~
   drivers/thermal/intel/int340x_thermal/int3400_thermal.c:298:20: note: each undeclared identifier is reported only once for each function it appears in
       sysfs_attr_init(attr->attr);
                       ^
   include/linux/sysfs.h:55:3: note: in definition of macro 'sysfs_attr_init'
     (attr)->key = &__key;    \
      ^~~~

vim +298 drivers/thermal/intel/int340x_thermal/int3400_thermal.c

   257	
   258	static int evaluate_odvp(struct int3400_thermal_priv *priv)
   259	{
   260		struct acpi_buffer odvp = { ACPI_ALLOCATE_BUFFER, NULL };
   261		union acpi_object *obj = NULL;
   262		acpi_status status;
   263		int i, ret;
   264	
   265		status = acpi_evaluate_object(priv->adev->handle, "ODVP", NULL, &odvp);
   266		if (ACPI_FAILURE(status)) {
   267			ret = -EINVAL;
   268			goto out_err;
   269		}
   270	
   271		obj = odvp.pointer;
   272		if (obj->type != ACPI_TYPE_PACKAGE) {
   273			ret = -EINVAL;
   274			goto out_err;
   275		}
   276	
   277		if (priv->odvp == NULL) {
   278			priv->odvp_count = obj->package.count;
   279			priv->odvp = kmalloc_array(priv->odvp_count, sizeof(int),
   280					     GFP_KERNEL);
   281			if (!priv->odvp) {
   282				ret = -ENOMEM;
   283				goto out_err;
   284			}
   285		}
   286	
   287		if (priv->odvp_attrs == NULL) {
   288			priv->odvp_attrs = kcalloc(priv->odvp_count,
   289						   sizeof(struct odvp_attr),
   290						   GFP_KERNEL);
   291			if (!priv->odvp_attrs) {
   292				ret = -ENOMEM;
   293				goto out_err;
   294			}
   295			for (i = 0; i < priv->odvp_count; i++) {
   296				struct odvp_attr *odvp = &priv->odvp_attrs[i];
   297	
 > 298				sysfs_attr_init(attr->attr);
   299				odvp->priv = priv;
   300				odvp->odvp = i;
   301				odvp->attr.attr.name = kasprintf(GFP_KERNEL,
   302								 "odvp%d", i);
   303	
   304				if (!odvp->attr.attr.name) {
   305					ret = -ENOMEM;
   306					goto out_err;
   307				}
   308				odvp->attr.attr.mode = 0444;
   309				odvp->attr.show = odvp_show;
   310				odvp->attr.store = NULL;
   311				ret = sysfs_create_file(&priv->pdev->dev.kobj,
   312							&odvp->attr.attr);
   313				if (ret)
   314					goto out_err;
   315			}
   316		}
   317	
   318		for (i = 0; i < obj->package.count; i++) {
   319			if (obj->package.elements[i].type == ACPI_TYPE_INTEGER)
   320				priv->odvp[i] = obj->package.elements[i].integer.value;
   321		}
   322	
   323		kfree(obj);
   324		return 0;
   325	
   326	out_err:
   327		cleanup_odvp(priv);
   328		kfree(obj);
   329		return ret;
   330	}
   331	

---
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: 72528 bytes --]

  reply	other threads:[~2020-04-14  0:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 21:06 [PATCH 1/3] thermal/int340x_thermal: Export GDDV Matthew Garrett
2020-04-13 21:06 ` [PATCH 2/3] thermal/int340x_thermal: Export OEM vendor variables Matthew Garrett
2020-04-14  0:06   ` kbuild test robot [this message]
2020-04-13 21:06 ` [PATCH 3/3] thermal/int340x_thermal: Don't require IDSP to exist Matthew Garrett

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=202004140831.Z4UV4ycg%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthewgarrett@google.com \
    --cc=mjg59@google.com \
    --cc=nisha.aram@intel.com \
    --cc=rui.zhang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox