From: kernel test robot <lkp@intel.com>
To: David Gow <davidgow@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Benjamin Berg <benjamin.berg@intel.com>,
Maxime Ripard <maxime@cerno.tech>
Subject: [linux-next:master 4218/8413] lib/kunit/test.c:764:38: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type
Date: Tue, 13 Jun 2023 01:27:02 +0800 [thread overview]
Message-ID: <202306130136.ZO9p5nTK-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 53ab6975c12d1ad86c599a8927e8c698b144d669
commit: 57e3cded99e9c840bc5310878d0a7f4e7768a296 [4218/8413] kunit: kmalloc_array: Use kunit_add_action()
config: hexagon-randconfig-r045-20230612 (https://download.01.org/0day-ci/archive/20230613/202306130136.ZO9p5nTK-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=57e3cded99e9c840bc5310878d0a7f4e7768a296
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 57e3cded99e9c840bc5310878d0a7f4e7768a296
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash lib/kunit/
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/202306130136.ZO9p5nTK-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> lib/kunit/test.c:764:38: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
764 | if (kunit_add_action_or_reset(test, (kunit_action_t *)kfree, data) != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~
lib/kunit/test.c:776:29: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
776 | kunit_release_action(test, (kunit_action_t *)kfree, (void *)ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +764 lib/kunit/test.c
754
755 void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp)
756 {
757 void *data;
758
759 data = kmalloc_array(n, size, gfp);
760
761 if (!data)
762 return NULL;
763
> 764 if (kunit_add_action_or_reset(test, (kunit_action_t *)kfree, data) != 0)
765 return NULL;
766
767 return data;
768 }
769 EXPORT_SYMBOL_GPL(kunit_kmalloc_array);
770
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-06-12 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202306130136.ZO9p5nTK-lkp@intel.com \
--to=lkp@intel.com \
--cc=benjamin.berg@intel.com \
--cc=davidgow@google.com \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=maxime@cerno.tech \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=skhan@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).