All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Gow <davidgow@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 2/2] kunit: Add APIs for managing devices
Date: Sat, 25 Mar 2023 23:14:34 +0800	[thread overview]
Message-ID: <202303252216.4ChgDLYh-lkp@intel.com> (raw)
In-Reply-To: <20230325043104.3761770-3-davidgow@google.com>

Hi David,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc3]
[cannot apply to next-20230324]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Gow/kunit-resource-Add-kunit_defer-functionality/20230325-123304
patch link:    https://lore.kernel.org/r/20230325043104.3761770-3-davidgow%40google.com
patch subject: [RFC PATCH 2/2] kunit: Add APIs for managing devices
config: hexagon-randconfig-r041-20230322 (https://download.01.org/0day-ci/archive/20230325/202303252216.4ChgDLYh-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # https://github.com/intel-lab-lkp/linux/commit/489de1f44af455844bbc158f03f5940c2707992d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Gow/kunit-resource-Add-kunit_defer-functionality/20230325-123304
        git checkout 489de1f44af455844bbc158f03f5940c2707992d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash lib/kunit/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303252216.4ChgDLYh-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> lib/kunit/device.c:57:20: warning: cast from 'void (*)(struct device *)' to 'kunit_defer_function_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
           kunit_defer(test, (kunit_defer_function_t)device_unregister, &kunit_dev->dev, GFP_KERNEL);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/kunit/device.c:32:16: warning: no previous prototype for function 'kunit_device_register' [-Wmissing-prototypes]
   struct device *kunit_device_register(struct kunit *test, const char *name)
                  ^
   lib/kunit/device.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct device *kunit_device_register(struct kunit *test, const char *name)
   ^
   static 
   lib/kunit/device.c:65:28: warning: cast from 'void (*)(struct device *)' to 'kunit_defer_function_t' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
           kunit_defer_trigger(test, (kunit_defer_function_t)device_unregister, dev);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/kunit/device.c:63:6: warning: no previous prototype for function 'kunit_device_unregister' [-Wmissing-prototypes]
   void kunit_device_unregister(struct kunit *test, struct device *dev)
        ^
   lib/kunit/device.c:63:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void kunit_device_unregister(struct kunit *test, struct device *dev)
   ^
   static 
   4 warnings generated.


vim +57 lib/kunit/device.c

    31	
  > 32	struct device *kunit_device_register(struct kunit *test, const char *name)
    33	{
    34		struct kunit_device *kunit_dev;
    35		int err = -ENOMEM;
    36	
    37		kunit_dev = kzalloc(sizeof(struct kunit_device), GFP_KERNEL);
    38		if (!kunit_dev)
    39			return ERR_PTR(err);
    40	
    41		kunit_dev->owner = test;
    42	
    43		err = dev_set_name(&kunit_dev->dev, "%s.%s", test->name, name);
    44		if (err) {
    45			kfree(kunit_dev);
    46			return ERR_PTR(err);
    47		}
    48	
    49		kunit_dev->dev.release = kunit_device_release;
    50	
    51		err = device_register(&kunit_dev->dev);
    52		if (err) {
    53			put_device(&kunit_dev->dev);
    54			return ERR_PTR(err);
    55		}
    56	
  > 57		kunit_defer(test, (kunit_defer_function_t)device_unregister, &kunit_dev->dev, GFP_KERNEL);
    58	
    59		return &kunit_dev->dev;
    60	}
    61	EXPORT_SYMBOL_GPL(kunit_device_register);
    62	
  > 63	void kunit_device_unregister(struct kunit *test, struct device *dev)

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

  parent reply	other threads:[~2023-03-25 15:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25  4:31 [RFC PATCH 0/2] KUnit device API proposal David Gow
2023-03-25  4:31 ` [RFC PATCH 1/2] kunit: resource: Add kunit_defer() functionality David Gow
2023-03-26  6:33   ` Matti Vaittinen
2023-03-27 13:56   ` Maxime Ripard
2023-03-30  7:38   ` Benjamin Berg
2023-03-25  4:31 ` [RFC PATCH 2/2] kunit: Add APIs for managing devices David Gow
2023-03-25  6:04   ` kernel test robot
2023-03-25  6:28   ` Greg Kroah-Hartman
2023-03-25 15:14   ` kernel test robot [this message]
2023-03-27 13:57   ` Maxime Ripard

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=202303252216.4ChgDLYh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davidgow@google.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 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.