Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kurt Borja <kuurtb@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFC 1/5] platform/x86: firmware_attributes_class: Add device initialization methods
Date: Sat, 10 May 2025 07:29:36 +0800	[thread overview]
Message-ID: <202505100723.ZomnEYhR-lkp@intel.com> (raw)
In-Reply-To: <20250509-fw-attrs-api-v1-1-258afed65bfa@gmail.com>

Hi Kurt,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on 3c415b1df95c06ae4f9bdb166541ab366b862cc2]

url:    https://github.com/intel-lab-lkp/linux/commits/Kurt-Borja/platform-x86-firmware_attributes_class-Add-device-initialization-methods/20250509-155504
base:   3c415b1df95c06ae4f9bdb166541ab366b862cc2
patch link:    https://lore.kernel.org/r/20250509-fw-attrs-api-v1-1-258afed65bfa%40gmail.com
patch subject: [PATCH RFC 1/5] platform/x86: firmware_attributes_class: Add device initialization methods
config: x86_64-buildonly-randconfig-006-20250510 (https://download.01.org/0day-ci/archive/20250510/202505100723.ZomnEYhR-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505100723.ZomnEYhR-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/202505100723.ZomnEYhR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/platform/x86/firmware_attributes_class.c:88:58: error: call to undeclared function 'MKDEV'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      88 |         dev = device_create(&firmware_attributes_class, parent, MKDEV(0, 0),
         |                                                                 ^
   1 error generated.


vim +/MKDEV +88 drivers/platform/x86/firmware_attributes_class.c

    58	
    59	/**
    60	 * fwat_device_register - Create and register a firmware-attributes class
    61	 *			  device
    62	 * @parent: Parent device
    63	 * @name: Name of the class device
    64	 * @data: Drvdata of the class device
    65	 * @groups: Sysfs groups for the custom `fwat_attrs_ktype` kobj_type
    66	 *
    67	 * NOTE: @groups are attached to the .attrs_kobj of the new fwat_device which
    68	 * has a custom ktype, which makes use of `struct fwat_attribute` to embed
    69	 * attributes.
    70	 *
    71	 * Return: pointer to the new fwat_device on success, ERR_PTR on failure
    72	 */
    73	struct fwat_device *
    74	fwat_device_register(struct device *parent, const char *name, void *data,
    75			     const struct attribute_group **groups)
    76	{
    77		struct fwat_device *fadev;
    78		struct device *dev;
    79		int ret;
    80	
    81		if (!parent || !name)
    82			return ERR_PTR(-EINVAL);
    83	
    84		fadev = kzalloc(sizeof(*fadev), GFP_KERNEL);
    85		if (!fadev)
    86			return ERR_PTR(-ENOMEM);
    87	
  > 88		dev = device_create(&firmware_attributes_class, parent, MKDEV(0, 0),
    89				    data, "%s", name);
    90		if (IS_ERR(dev)) {
    91			kfree(fadev);
    92			return ERR_CAST(dev);
    93		}
    94	
    95		ret = kobject_init_and_add(&fadev->attrs_kobj, &fwat_attrs_ktype, &dev->kobj,
    96					   "attributes");
    97		if (ret)
    98			goto out_kobj_put;
    99	
   100		if (groups) {
   101			ret = sysfs_create_groups(&fadev->attrs_kobj, groups);
   102			if (ret)
   103				goto out_kobj_unregister;
   104		}
   105	
   106		fadev->dev = dev;
   107		fadev->groups = groups;
   108	
   109		kobject_uevent(&fadev->attrs_kobj, KOBJ_ADD);
   110	
   111		return fadev;
   112	
   113	out_kobj_unregister:
   114		kobject_del(&fadev->attrs_kobj);
   115	
   116	out_kobj_put:
   117		kobject_put(&fadev->attrs_kobj);
   118		device_unregister(dev);
   119	
   120		return ERR_PTR(ret);
   121	}
   122	EXPORT_SYMBOL_GPL(fwat_device_register);
   123	

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

           reply	other threads:[~2025-05-09 23:30 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20250509-fw-attrs-api-v1-1-258afed65bfa@gmail.com>]

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=202505100723.ZomnEYhR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kuurtb@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