All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS
Date: Fri, 17 Jul 2020 22:22:14 +0800	[thread overview]
Message-ID: <202007172217.32CuObRZ%lkp@intel.com> (raw)
In-Reply-To: <20200716223627.253936-1-daniel.gutson@eclypsium.com>

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

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on soc/for-next linus/master v5.8-rc5 next-20200716]
[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/Daniel-Gutson/Firmware-security-information-in-SYSFS/20200717-071308
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git fadbfc38dde26d31e901c3c85cf01332cb6a2224
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

>> drivers/misc/firmware_security_data.c:51:2: error: member reference type 'struct attribute' is not a pointer; did you mean to use '.'?
           sysfs_attr_init(new_data->kobj_attr.attr);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/sysfs.h:55:8: note: expanded from macro 'sysfs_attr_init'
           (attr)->key = &__key;                           \
           ~~~~~~^
>> drivers/misc/firmware_security_data.c:51:2: error: expression is not assignable
           sysfs_attr_init(new_data->kobj_attr.attr);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/sysfs.h:55:14: note: expanded from macro 'sysfs_attr_init'
           (attr)->key = &__key;                           \
           ~~~~~~~~~~~ ^
   2 errors generated.

vim +51 drivers/misc/firmware_security_data.c

    34	
    35	int register_firmware_security_data_callback(
    36		const char *name, ssize_t (*callback)(char *buf, void *private_data),
    37		void *private_data)
    38	{
    39		int retval;
    40	
    41		struct firmware_security_data *new_data;
    42	
    43		if (name == NULL || name[0] == 0)
    44			return -EINVAL;
    45	
    46		new_data = kmalloc(sizeof(struct firmware_security_data), GFP_KERNEL);
    47		if (new_data == NULL)
    48			return -ENOMEM;
    49	
    50		/* initialize attributes: */
  > 51		sysfs_attr_init(new_data->kobj_attr.attr);
    52		new_data->kobj_attr.attr.name = name;
    53		new_data->kobj_attr.attr.mode = 0664;
    54		new_data->kobj_attr.show = internal_callback;
    55		new_data->kobj_attr.store = NULL;
    56	
    57		new_data->callback = callback;
    58		new_data->private_data = private_data;
    59	
    60		/* attempt to create the file: */
    61		retval = sysfs_create_file(firmware_data_kobj,
    62					   &new_data->kobj_attr.attr);
    63		if (retval == 0) {
    64			/* append to the list of entries: */
    65			INIT_LIST_HEAD(&new_data->list_node);
    66			mutex_lock(&entries_mutex);
    67			list_add(&new_data->list_node, &entries);
    68			mutex_unlock(&entries_mutex);
    69		} else {
    70			kfree(new_data);
    71		}
    72	
    73		return retval;
    74	}
    75	EXPORT_SYMBOL_GPL(register_firmware_security_data_callback);
    76	

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

  parent reply	other threads:[~2020-07-17 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 22:36 [PATCH] [PATCH] Firmware security information in SYSFS Daniel Gutson
2020-07-17  6:28 ` Greg Kroah-Hartman
2020-07-17 14:40   ` Arnd Bergmann
2020-07-17 14:54     ` Greg Kroah-Hartman
     [not found]     ` <CAFmMkTFLm9mw5-8Dj_7rhP2KBcLUoJ1WcQCJv5_k+QRsmJPxjg@mail.gmail.com>
2020-07-17 14:57       ` Greg Kroah-Hartman
     [not found]         ` <CAFmMkTEsm7CRBzEJSCjkhCT7NHvRUXzcgchExbnfFbwPjT0YFg@mail.gmail.com>
2020-07-21 10:52           ` Greg Kroah-Hartman
     [not found]             ` <CAFmMkTGtG6p48o9qSzYqQs8mJXiGAMw7b5wp2LLAmwcdhn2u4A@mail.gmail.com>
2020-07-21 18:26               ` Greg Kroah-Hartman
2020-07-21 20:44                 ` Arnd Bergmann
2020-07-17 15:02       ` Arnd Bergmann
2020-07-17 14:22 ` kernel test robot [this message]
2020-07-17 14:48 ` Arnd Bergmann
     [not found]   ` <CAFmMkTG3rMtmNxYf0jXgGN7zJgK2U8Ogtrd4yH0Ee1rC7pf9Mg@mail.gmail.com>
2020-07-17 15:39     ` Arnd Bergmann
     [not found]       ` <CAFmMkTF23JVfCe-ynBzbYQ_eF=z6fKCPdA6DbTrJ9OFYxGBWkQ@mail.gmail.com>
2020-07-21 20:50         ` Arnd Bergmann

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=202007172217.32CuObRZ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.