From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [mcgrof-next:20210427-sysfs-fix-races-v4 3/3] drivers/base/bus.c:42:18: warning: no previous prototype for function 'bus_get'
Date: Fri, 18 Jun 2021 12:17:42 +0800 [thread overview]
Message-ID: <202106181236.7zIjLcPS-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3621 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210427-sysfs-fix-races-v4
head: 177cab73f0f242ce77398095d9c54d76d7fa46df
commit: 177cab73f0f242ce77398095d9c54d76d7fa46df [3/3] drivers/base/core: refcount kobject and bus on device attribute read / store
config: powerpc-randconfig-r002-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=177cab73f0f242ce77398095d9c54d76d7fa46df
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20210427-sysfs-fix-races-v4
git checkout 177cab73f0f242ce77398095d9c54d76d7fa46df
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/base/bus.c:11:
In file included from include/linux/async.h:12:
In file included from include/linux/list.h:9:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> drivers/base/bus.c:42:18: warning: no previous prototype for function 'bus_get' [-Wmissing-prototypes]
struct bus_type *bus_get(struct bus_type *bus)
^
drivers/base/bus.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct bus_type *bus_get(struct bus_type *bus)
^
static
>> drivers/base/bus.c:51:6: warning: no previous prototype for function 'bus_put' [-Wmissing-prototypes]
void bus_put(struct bus_type *bus)
^
drivers/base/bus.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void bus_put(struct bus_type *bus)
^
static
3 warnings generated.
vim +/bus_get +42 drivers/base/bus.c
34
35 #define DRIVER_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
36 struct driver_attribute driver_attr_##_name = \
37 __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
38
39 static int __must_check bus_rescan_devices_helper(struct device *dev,
40 void *data);
41
> 42 struct bus_type *bus_get(struct bus_type *bus)
43 {
44 if (bus) {
45 kset_get(&bus->p->subsys);
46 return bus;
47 }
48 return NULL;
49 }
50
> 51 void bus_put(struct bus_type *bus)
52 {
53 if (bus)
54 kset_put(&bus->p->subsys);
55 }
56
---
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: 27354 bytes --]
reply other threads:[~2021-06-18 4:17 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=202106181236.7zIjLcPS-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.