Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH RFC 1/5] platform/x86: firmware_attributes_class: Add device initialization methods
       [not found] <20250509-fw-attrs-api-v1-1-258afed65bfa@gmail.com>
@ 2025-05-09 23:29 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-09 23:29 UTC (permalink / raw)
  To: Kurt Borja; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-09 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250509-fw-attrs-api-v1-1-258afed65bfa@gmail.com>
2025-05-09 23:29 ` [PATCH RFC 1/5] platform/x86: firmware_attributes_class: Add device initialization methods kernel test robot

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