All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
@ 2021-09-29 14:08 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-09-29 14:08 UTC (permalink / raw)
  Cc: kbuild-all, llvm

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

In-Reply-To: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
References: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
TO: Yang Li <yang.lee@linux.alibaba.com>
TO: gregkh@linuxfoundation.org
CC: linux-kernel@vger.kernel.org
CC: Yang Li <yang.lee@linux.alibaba.com>

Hi Yang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.15-rc3 next-20210922]
[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/Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: x86_64-randconfig-r002-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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/0day-ci/linux/commit/eedc73d4f330cf7a8d18d64f327837ae9a00d003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
        git checkout eedc73d4f330cf7a8d18d64f327837ae9a00d003
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

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 >>):

>> drivers/pci/pci-sysfs.o: warning: objtool: pci_write_rom() falls through to next function pci_dev_reset_attr_is_visible()
--
>> drivers/base/core.o: warning: objtool: device_release() falls through to next function device_namespace()
>> drivers/base/core.o: warning: objtool: device_namespace() falls through to next function device_get_ownership()
>> drivers/base/core.o: warning: objtool: device_get_ownership() falls through to next function dev_attr_show()
>> drivers/base/core.o: warning: objtool: dev_uevent() falls through to next function device_create_release()
--
>> drivers/base/devcoredump.o: warning: objtool: devcd_data_read() falls through to next function devcd_data_write()
--
>> drivers/misc/eeprom/eeprom.o: warning: objtool: eeprom_read() falls through to next function kobj_to_dev()
--
>> drivers/misc/eeprom/idt_89hpesx.o: warning: objtool: eeprom_read() falls through to next function eeprom_write()
>> drivers/misc/eeprom/idt_89hpesx.o: warning: objtool: eeprom_write() falls through to next function kobj_to_dev()

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33241 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
@ 2021-09-29 14:08 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-09-29 14:08 UTC (permalink / raw)
  To: kbuild-all

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

In-Reply-To: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
References: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
TO: Yang Li <yang.lee@linux.alibaba.com>
TO: gregkh(a)linuxfoundation.org
CC: linux-kernel(a)vger.kernel.org
CC: Yang Li <yang.lee@linux.alibaba.com>

Hi Yang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.15-rc3 next-20210922]
[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/Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: x86_64-randconfig-r002-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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/0day-ci/linux/commit/eedc73d4f330cf7a8d18d64f327837ae9a00d003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
        git checkout eedc73d4f330cf7a8d18d64f327837ae9a00d003
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

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 >>):

>> drivers/pci/pci-sysfs.o: warning: objtool: pci_write_rom() falls through to next function pci_dev_reset_attr_is_visible()
--
>> drivers/base/core.o: warning: objtool: device_release() falls through to next function device_namespace()
>> drivers/base/core.o: warning: objtool: device_namespace() falls through to next function device_get_ownership()
>> drivers/base/core.o: warning: objtool: device_get_ownership() falls through to next function dev_attr_show()
>> drivers/base/core.o: warning: objtool: dev_uevent() falls through to next function device_create_release()
--
>> drivers/base/devcoredump.o: warning: objtool: devcd_data_read() falls through to next function devcd_data_write()
--
>> drivers/misc/eeprom/eeprom.o: warning: objtool: eeprom_read() falls through to next function kobj_to_dev()
--
>> drivers/misc/eeprom/idt_89hpesx.o: warning: objtool: eeprom_read() falls through to next function eeprom_write()
>> drivers/misc/eeprom/idt_89hpesx.o: warning: objtool: eeprom_write() falls through to next function kobj_to_dev()

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
  2021-03-01  9:13 Yang Li
@ 2021-11-06 21:41   ` kernel test robot
  2021-11-06 21:41   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-06 21:41 UTC (permalink / raw)
  To: Yang Li, gregkh; +Cc: llvm, kbuild-all, linux-kernel, Yang Li

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

Hi Yang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.15 next-20211106]
[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/Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: arm64-buildonly-randconfig-r006-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/eedc73d4f330cf7a8d18d64f327837ae9a00d003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
        git checkout eedc73d4f330cf7a8d18d64f327837ae9a00d003
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

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 >>):

   In file included from arch/arm64/kernel/asm-offsets.c:10:
   In file included from include/linux/arm_sdei.h:8:
   In file included from include/acpi/ghes.h:5:
   In file included from include/acpi/apei.h:9:
   In file included from include/linux/acpi.h:15:
>> include/linux/device.h:609:1: error: all paths through this function will call itself [-Werror,-Winfinite-recursion]
   {
   ^
   1 error generated.
   make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1219: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:219: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +609 include/linux/device.h

287905e68dd298 Saravana Kannan    2020-05-21  607  
a4232963757e62 Lars-Peter Clausen 2012-07-03  608  static inline struct device *kobj_to_dev(struct kobject *kobj)
a4232963757e62 Lars-Peter Clausen 2012-07-03 @609  {
eedc73d4f330cf Yang Li            2021-03-01  610  	return kobj_to_dev(kobj);
a4232963757e62 Lars-Peter Clausen 2012-07-03  611  }
a4232963757e62 Lars-Peter Clausen 2012-07-03  612  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47462 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
@ 2021-11-06 21:41   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-06 21:41 UTC (permalink / raw)
  To: kbuild-all

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

Hi Yang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.15 next-20211106]
[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/Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: arm64-buildonly-randconfig-r006-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/eedc73d4f330cf7a8d18d64f327837ae9a00d003
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Yang-Li/driver-core-Switch-to-using-the-new-API-kobj_to_dev/20210929-102216
        git checkout eedc73d4f330cf7a8d18d64f327837ae9a00d003
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

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 >>):

   In file included from arch/arm64/kernel/asm-offsets.c:10:
   In file included from include/linux/arm_sdei.h:8:
   In file included from include/acpi/ghes.h:5:
   In file included from include/acpi/apei.h:9:
   In file included from include/linux/acpi.h:15:
>> include/linux/device.h:609:1: error: all paths through this function will call itself [-Werror,-Winfinite-recursion]
   {
   ^
   1 error generated.
   make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1219: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:219: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +609 include/linux/device.h

287905e68dd298 Saravana Kannan    2020-05-21  607  
a4232963757e62 Lars-Peter Clausen 2012-07-03  608  static inline struct device *kobj_to_dev(struct kobject *kobj)
a4232963757e62 Lars-Peter Clausen 2012-07-03 @609  {
eedc73d4f330cf Yang Li            2021-03-01  610  	return kobj_to_dev(kobj);
a4232963757e62 Lars-Peter Clausen 2012-07-03  611  }
a4232963757e62 Lars-Peter Clausen 2012-07-03  612  

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
  2021-03-01  9:13 Yang Li
@ 2021-03-01  9:26 ` Greg KH
  2021-11-06 21:41   ` kernel test robot
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-03-01  9:26 UTC (permalink / raw)
  To: Yang Li; +Cc: linux-kernel

On Mon, Mar 01, 2021 at 05:13:24PM +0800, Yang Li wrote:
> fixed the following coccicheck:
> ./include/linux/device.h:590:46-47: WARNING opportunity for
> kobj_to_dev()
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  include/linux/device.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/device.h b/include/linux/device.h
> index ba66073..31d7137 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -587,7 +587,7 @@ struct device_link {
>  
>  static inline struct device *kobj_to_dev(struct kobject *kobj)
>  {
> -	return container_of(kobj, struct device, kobj);
> +	return kobj_to_dev(kobj);
>  }

Did you test this change?  Please do so...

{sigh}

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] driver core: Switch to using the new API kobj_to_dev()
@ 2021-03-01  9:13 Yang Li
  2021-03-01  9:26 ` Greg KH
  2021-11-06 21:41   ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Li @ 2021-03-01  9:13 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Yang Li

fixed the following coccicheck:
./include/linux/device.h:590:46-47: WARNING opportunity for
kobj_to_dev()

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 include/linux/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index ba66073..31d7137 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -587,7 +587,7 @@ struct device_link {
 
 static inline struct device *kobj_to_dev(struct kobject *kobj)
 {
-	return container_of(kobj, struct device, kobj);
+	return kobj_to_dev(kobj);
 }
 
 /**
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-06 21:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 14:08 [PATCH] driver core: Switch to using the new API kobj_to_dev() kernel test robot
2021-09-29 14:08 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01  9:13 Yang Li
2021-03-01  9:26 ` Greg KH
2021-11-06 21:41 ` kernel test robot
2021-11-06 21:41   ` kernel test robot

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.