All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrew Jeffery <andrew@aj.id.au>,
	openipmi-developer@lists.sourceforge.net,
	openbmc@lists.ozlabs.org, minyard@acm.org
Cc: kbuild-all@lists.01.org, tmaimon77@gmail.com,
	avifishman70@gmail.com, venture@google.com,
	tali.perry1@gmail.com, clang-built-linux@googlegroups.com,
	robh+dt@kernel.org, lee.jones@linaro.org
Subject: Re: [PATCH 12/19] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc
Date: Sun, 21 Feb 2021 21:55:49 +0800	[thread overview]
Message-ID: <202102212109.UynDOAdE-lkp@intel.com> (raw)
In-Reply-To: <20210219142523.3464540-13-andrew@aj.id.au>

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

Hi Andrew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on robh/for-next v5.11]
[cannot apply to joel-aspeed/for-next next-20210219]
[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/Andrew-Jeffery/ipmi-Allow-raw-access-to-KCS-devices/20210219-223144
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git d19db80a366576d3ffadf2508ed876b4c1faf959
config: riscv-randconfig-r036-20210221 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/abe0bf80e7a3bf00fd82f8d73e9c0e2205bc2fca
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrew-Jeffery/ipmi-Allow-raw-access-to-KCS-devices/20210219-223144
        git checkout abe0bf80e7a3bf00fd82f8d73e9c0e2205bc2fca
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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/char/ipmi/kcs_bmc_cdev_ipmi.c:521:2: warning: variable 'priv' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
           list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:629:7: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:530:7: note: uninitialized use occurs here
           if (!priv)
                ^~~~
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:521:2: note: remove the condition if it is always true
           list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
           ^
   include/linux/list.h:629:7: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                ^
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:518:27: note: initialize the variable 'priv' to silence this warning
           struct kcs_bmc_ipmi *priv, *pos;
                                    ^
                                     = NULL
   1 warning generated.


vim +521 drivers/char/ipmi/kcs_bmc_cdev_ipmi.c

   515	
   516	int kcs_bmc_ipmi_detach_cdev(struct kcs_bmc_device *kcs_bmc)
   517	{
   518		struct kcs_bmc_ipmi *priv, *pos;
   519	
   520		spin_lock_irq(&kcs_bmc_ipmi_instances_lock);
 > 521		list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
   522			if (pos->client.dev == kcs_bmc) {
   523				priv = pos;
   524				list_del(&pos->entry);
   525				break;
   526			}
   527		}
   528		spin_unlock_irq(&kcs_bmc_ipmi_instances_lock);
   529	
   530		if (!priv)
   531			return 0;
   532	
   533		misc_deregister(&priv->miscdev);
   534		kcs_bmc_disable_device(priv->client.dev, &priv->client);
   535		devm_kfree(kcs_bmc->dev, priv->kbuffer);
   536		devm_kfree(kcs_bmc->dev, priv->data_out);
   537		devm_kfree(kcs_bmc->dev, priv->data_in);
   538		devm_kfree(kcs_bmc->dev, priv);
   539	
   540		return 0;
   541	}
   542	EXPORT_SYMBOL(kcs_bmc_ipmi_detach_cdev);
   543	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 12/19] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc
Date: Sun, 21 Feb 2021 21:55:49 +0800	[thread overview]
Message-ID: <202102212109.UynDOAdE-lkp@intel.com> (raw)
In-Reply-To: <20210219142523.3464540-13-andrew@aj.id.au>

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

Hi Andrew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on robh/for-next v5.11]
[cannot apply to joel-aspeed/for-next next-20210219]
[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/Andrew-Jeffery/ipmi-Allow-raw-access-to-KCS-devices/20210219-223144
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git d19db80a366576d3ffadf2508ed876b4c1faf959
config: riscv-randconfig-r036-20210221 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/abe0bf80e7a3bf00fd82f8d73e9c0e2205bc2fca
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrew-Jeffery/ipmi-Allow-raw-access-to-KCS-devices/20210219-223144
        git checkout abe0bf80e7a3bf00fd82f8d73e9c0e2205bc2fca
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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/char/ipmi/kcs_bmc_cdev_ipmi.c:521:2: warning: variable 'priv' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
           list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:629:7: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:530:7: note: uninitialized use occurs here
           if (!priv)
                ^~~~
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:521:2: note: remove the condition if it is always true
           list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
           ^
   include/linux/list.h:629:7: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                ^
   drivers/char/ipmi/kcs_bmc_cdev_ipmi.c:518:27: note: initialize the variable 'priv' to silence this warning
           struct kcs_bmc_ipmi *priv, *pos;
                                    ^
                                     = NULL
   1 warning generated.


vim +521 drivers/char/ipmi/kcs_bmc_cdev_ipmi.c

   515	
   516	int kcs_bmc_ipmi_detach_cdev(struct kcs_bmc_device *kcs_bmc)
   517	{
   518		struct kcs_bmc_ipmi *priv, *pos;
   519	
   520		spin_lock_irq(&kcs_bmc_ipmi_instances_lock);
 > 521		list_for_each_entry(pos, &kcs_bmc_ipmi_instances, entry) {
   522			if (pos->client.dev == kcs_bmc) {
   523				priv = pos;
   524				list_del(&pos->entry);
   525				break;
   526			}
   527		}
   528		spin_unlock_irq(&kcs_bmc_ipmi_instances_lock);
   529	
   530		if (!priv)
   531			return 0;
   532	
   533		misc_deregister(&priv->miscdev);
   534		kcs_bmc_disable_device(priv->client.dev, &priv->client);
   535		devm_kfree(kcs_bmc->dev, priv->kbuffer);
   536		devm_kfree(kcs_bmc->dev, priv->data_out);
   537		devm_kfree(kcs_bmc->dev, priv->data_in);
   538		devm_kfree(kcs_bmc->dev, priv);
   539	
   540		return 0;
   541	}
   542	EXPORT_SYMBOL(kcs_bmc_ipmi_detach_cdev);
   543	

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

  reply	other threads:[~2021-02-21 13:58 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 14:25 [PATCH 00/19] ipmi: Allow raw access to KCS devices Andrew Jeffery
2021-02-19 14:25 ` Andrew Jeffery
2021-02-19 14:25 ` Andrew Jeffery
2021-02-19 14:25 ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 01/19] dt-bindings: aspeed-lpc: Remove LPC partitioning Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-22  9:04   ` Lee Jones
2021-02-22  9:04     ` Lee Jones
2021-02-22  9:04     ` Lee Jones
2021-02-22  9:04     ` Lee Jones
2021-02-19 14:25 ` [PATCH 02/19] ARM: dts: Remove LPC BMC and Host partitions Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 03/19] ipmi: kcs: aspeed: Adapt to new LPC DTS layout Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 04/19] pinctrl: aspeed-g5: Adapt to new LPC device tree layout Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 05/19] soc: aspeed: " Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 06/19] ipmi: kcs_bmc_aspeed: Use of match data to extract KCS properties Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 07/19] ipmi: kcs_bmc: Make status update atomic Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 08/19] ipmi: kcs_bmc: Rename {read, write}_{status, data}() functions Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` [PATCH 08/19] ipmi: kcs_bmc: Rename {read,write}_{status,data}() functions Andrew Jeffery
2021-02-19 14:25 ` [PATCH 09/19] ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 10/19] ipmi: kcs_bmc: Turn the driver data-structures inside-out Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 11/19] ipmi: kcs_bmc: Split headers into device and client Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 12/19] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-21 13:55   ` kernel test robot [this message]
2021-02-21 13:55     ` kernel test robot
2021-02-19 14:25 ` [PATCH 13/19] ipmi: kcs_bmc: Decouple the IPMI chardev from the core Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 14/19] ipmi: kcs_bmc: Allow clients to control KCS IRQ state Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 15/19] ipmi: kcs_bmc: Add a "raw" character device interface Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-21 13:54   ` kernel test robot
2021-02-21 13:54     ` kernel test robot
2021-02-21 15:36   ` kernel test robot
2021-02-21 15:36     ` kernel test robot
2021-02-19 14:25 ` [PATCH 16/19] dt-bindings: ipmi: Convert ASPEED KCS binding to schema Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-03-05 23:07   ` Rob Herring
2021-03-05 23:07     ` Rob Herring
2021-03-05 23:07     ` Rob Herring
2021-03-05 23:07     ` Rob Herring
2021-03-09  2:45     ` Andrew Jeffery
2021-03-09  2:45       ` Andrew Jeffery
2021-03-09  2:45       ` Andrew Jeffery
2021-03-09  2:45       ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 17/19] dt-bindings: ipmi: Add optional SerIRQ property to ASPEED KCS devices Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-03-05 23:09   ` Rob Herring
2021-03-05 23:09     ` Rob Herring
2021-03-05 23:09     ` Rob Herring
2021-03-05 23:09     ` Rob Herring
2021-03-09  2:44     ` Andrew Jeffery
2021-03-09  2:44       ` Andrew Jeffery
2021-03-09  2:44       ` Andrew Jeffery
2021-03-09  2:44       ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 18/19] ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25 ` [PATCH 19/19] ipmi: kcs_bmc_aspeed: Fix IBFIE typo from datasheet Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery
2021-02-19 14:25   ` Andrew Jeffery

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=202102212109.UynDOAdE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@aj.id.au \
    --cc=avifishman70@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lee.jones@linaro.org \
    --cc=minyard@acm.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=robh+dt@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.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 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.