linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bill Wendling <morbo@google.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-scsi@vger.kernel.org, clang-built-linux@googlegroups.com,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Ariel Elior <aelior@marvell.com>,
	Sudarsana Kalluru <skalluru@marvell.com>,
	GR-everest-linux-l2@marvell.com,
	"David S . Miller" <davem@davemloft.net>
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/3] base: remove unused variable 'no_warn'
Date: Wed, 14 Jul 2021 20:15:10 +0800	[thread overview]
Message-ID: <202107142012.rH1YJ99H-lkp@intel.com> (raw)
In-Reply-To: <20210714091747.2814370-2-morbo@google.com>

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

Hi Bill,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on linux/master driver-core/driver-core-testing mkp-scsi/for-next ipvs/master linus/master v5.14-rc1 next-20210714]
[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/Bill-Wendling/Fix-clang-Wunused-but-set-variable-warnings/20210714-172029
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: powerpc-redwood_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
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/f6c4b007fc8c907719d883faae424f2cf3bb100c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bill-Wendling/Fix-clang-Wunused-but-set-variable-warnings/20210714-172029
        git checkout f6c4b007fc8c907719d883faae424f2cf3bb100c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):

   drivers/base/module.c: In function 'module_add_driver':
>> drivers/base/module.c:61:2: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result [-Wunused-result]
      61 |  sysfs_create_link(&drv->p->kobj, &mk->kobj, "module");
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/base/module.c:65:3: warning: ignoring return value of 'sysfs_create_link', declared with attribute warn_unused_result [-Wunused-result]
      65 |   sysfs_create_link(mk->drivers_dir, &drv->p->kobj, driver_name);
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/sysfs_create_link +61 drivers/base/module.c

    32	
    33	void module_add_driver(struct module *mod, struct device_driver *drv)
    34	{
    35		char *driver_name;
    36		struct module_kobject *mk = NULL;
    37	
    38		if (!drv)
    39			return;
    40	
    41		if (mod)
    42			mk = &mod->mkobj;
    43		else if (drv->mod_name) {
    44			struct kobject *mkobj;
    45	
    46			/* Lookup built-in module entry in /sys/modules */
    47			mkobj = kset_find_obj(module_kset, drv->mod_name);
    48			if (mkobj) {
    49				mk = container_of(mkobj, struct module_kobject, kobj);
    50				/* remember our module structure */
    51				drv->p->mkobj = mk;
    52				/* kset_find_obj took a reference */
    53				kobject_put(mkobj);
    54			}
    55		}
    56	
    57		if (!mk)
    58			return;
    59	
    60		/* Don't check return codes; these calls are idempotent */
  > 61		sysfs_create_link(&drv->p->kobj, &mk->kobj, "module");
    62		driver_name = make_driver_name(drv);
    63		if (driver_name) {
    64			module_create_drivers_dir(mk);
    65			sysfs_create_link(mk->drivers_dir, &drv->p->kobj, driver_name);
    66			kfree(driver_name);
    67		}
    68	}
    69	

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

  reply	other threads:[~2021-07-14 12:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  9:17 [PATCH 0/3] Fix clang -Wunused-but-set-variable warnings Bill Wendling
2021-07-14  9:17 ` [PATCH 1/3] base: remove unused variable 'no_warn' Bill Wendling
2021-07-14 12:15   ` kernel test robot [this message]
2021-07-14  9:17 ` [PATCH 2/3] bnx2x: remove unused variable 'cur_data_offset' Bill Wendling
2021-07-14  9:17 ` [PATCH 3/3] scsi: qla2xxx: remove unused variable 'status' Bill Wendling
2021-07-26 20:19 ` [PATCH v2 0/3] Fix clang -Wunused-but-set-variable warnings Bill Wendling
2021-07-26 20:19   ` [PATCH v2 1/3] base: mark 'no_warn' as unused Bill Wendling
2021-07-26 20:47     ` Nathan Chancellor
2021-07-26 21:01       ` Bill Wendling
2021-07-27  5:27       ` Greg Kroah-Hartman
2021-07-27  6:15         ` Bill Wendling
2021-07-27  6:41           ` Greg Kroah-Hartman
2021-07-27  7:08             ` Bill Wendling
2021-07-27  7:12               ` Greg Kroah-Hartman
2021-07-27  7:15                 ` Bill Wendling
2021-07-27 17:39             ` Nick Desaulniers
2021-07-27 17:42               ` Nick Desaulniers
2021-07-27 17:59               ` Greg Kroah-Hartman
2021-07-27 18:31                 ` Nick Desaulniers
2021-07-27 18:44                   ` Greg Kroah-Hartman
2021-07-27 19:02                     ` Nick Desaulniers
2021-07-27 19:23                 ` Bill Wendling
2021-07-27 20:13                 ` Segher Boessenkool
2021-07-27 20:22                   ` Bill Wendling
2021-07-27 20:24                     ` Bill Wendling
2021-07-27 18:32               ` Nathan Chancellor
2021-07-27 19:04                 ` Nick Desaulniers
2021-07-27 19:10                   ` Nathan Chancellor
2021-07-27 19:12                 ` Bill Wendling
2021-07-26 20:19   ` [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset' Bill Wendling
2021-07-26 20:36     ` Nathan Chancellor
2021-07-26 20:19   ` [PATCH v2 3/3] scsi: qla2xxx: remove unused variable 'status' Bill Wendling
2021-07-26 20:40     ` Nathan Chancellor
2021-07-27  3:14     ` Martin K. Petersen
2021-07-29  3:38   ` [PATCH v2 0/3] Fix clang -Wunused-but-set-variable warnings Martin K. Petersen

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=202107142012.rH1YJ99H-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=GR-everest-linux-l2@marvell.com \
    --cc=aelior@marvell.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=skalluru@marvell.com \
    /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).