Linux USB
 help / color / mirror / Atom feed
From: "Rui Miguel Silva" <rui.silva@linaro.org>
To: "kernel test robot" <lkp@intel.com>
Cc: <clang-built-linux@googlegroups.com>, <kbuild-all@lists.01.org>,
	<linux-usb@vger.kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: [usb:usb-testing 54/97] drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
Date: Thu, 19 Aug 2021 08:47:37 +0100	[thread overview]
Message-ID: <CDNBNHH65Z6Z.3P3H9W04XAHDB@arch-thunder> (raw)
In-Reply-To: <202108190619.wLK5u4fO-lkp@intel.com>

Hi,
On Wed Aug 18, 2021 at 11:09 PM WEST, kernel test robot wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> head:   e4788edc730a0d2b26e1ae1f08fbb3f635b92dbb
> commit: 7de14c88272c05d86fce83a5cead36832ce3a424 [54/97] usb: isp1760: remove debug message as error
> config: riscv-randconfig-c006-20210818 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
> 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://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=7de14c88272c05d86fce83a5cead36832ce3a424
>         git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
>         git fetch --no-tags usb usb-testing
>         git checkout 7de14c88272c05d86fce83a5cead36832ce3a424
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer 
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> clang-analyzer warnings: (new ones prefixed by >>)
>                    ^      ~
>    drivers/target/target_core_configfs.c:2627:23: warning: Value stored to 'alua_lu_gp_cg' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
>            struct config_group *alua_lu_gp_cg = &lu_gp->lu_gp_group;
>                                 ^~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:2627:23: note: Value stored to 'alua_lu_gp_cg' during its initialization is never read
>            struct config_group *alua_lu_gp_cg = &lu_gp->lu_gp_group;
>                                 ^~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:2731:2: warning: Value stored to 'alua_lu_gp_ci' is never read [clang-analyzer-deadcode.DeadStores]
>            alua_lu_gp_ci = &alua_lu_gp_cg->cg_item;
>            ^               ~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:2731:2: note: Value stored to 'alua_lu_gp_ci' is never read
>            alua_lu_gp_ci = &alua_lu_gp_cg->cg_item;
>            ^               ~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:2748:25: warning: Value stored to 'lu_gp' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
>            struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item),
>                                   ^~~~~
>    drivers/target/target_core_configfs.c:2748:25: note: Value stored to 'lu_gp' during its initialization is never read
>            struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item),
>                                   ^~~~~
>    drivers/target/target_core_configfs.c:3026:23: warning: Value stored to 'alua_tg_pt_gp_cg' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
>            struct config_group *alua_tg_pt_gp_cg = &tg_pt_gp->tg_pt_gp_group;
>                                 ^~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:3026:23: note: Value stored to 'alua_tg_pt_gp_cg' during its initialization is never read
>            struct config_group *alua_tg_pt_gp_cg = &tg_pt_gp->tg_pt_gp_group;
>                                 ^~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:3163:2: warning: Value stored to 'alua_tg_pt_gp_ci' is never read [clang-analyzer-deadcode.DeadStores]
>            alua_tg_pt_gp_ci = &alua_tg_pt_gp_cg->cg_item;
>            ^                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:3163:2: note: Value stored to 'alua_tg_pt_gp_ci' is never read
>            alua_tg_pt_gp_ci = &alua_tg_pt_gp_cg->cg_item;
>            ^                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/target/target_core_configfs.c:3179:28: warning: Value stored to 'tg_pt_gp' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
>            struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item),
>                                      ^~~~~~~~
>    drivers/target/target_core_configfs.c:3179:28: note: Value stored to 'tg_pt_gp' during its initialization is never read
>            struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item),
>                                      ^~~~~~~~
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    6 warnings generated.
>    drivers/misc/eeprom/at24.c:334:2: warning: Value stored to 'client' is never read [clang-analyzer-deadcode.DeadStores]
>            client = at24_client->client;
>            ^        ~~~~~~~~~~~~~~~~~~~
>    drivers/misc/eeprom/at24.c:334:2: note: Value stored to 'client' is never read
>            client = at24_client->client;
>            ^        ~~~~~~~~~~~~~~~~~~~
>    drivers/misc/eeprom/at24.c:397:2: warning: Value stored to 'client' is never read [clang-analyzer-deadcode.DeadStores]
>            client = at24_client->client;
>            ^        ~~~~~~~~~~~~~~~~~~~
>    drivers/misc/eeprom/at24.c:397:2: note: Value stored to 'client' is never read
>            client = at24_client->client;
>            ^        ~~~~~~~~~~~~~~~~~~~
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    5 warnings generated.
>    drivers/usb/isp1760/isp1760-core.c:490:2: warning: Value stored to 'udc_enabled' is never read [clang-analyzer-deadcode.DeadStores]
>            udc_enabled = ((devflags & ISP1760_FLAG_ISP1763) ||
>            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/usb/isp1760/isp1760-core.c:490:2: note: Value stored to 'udc_enabled' is never read
>            udc_enabled = ((devflags & ISP1760_FLAG_ISP1763) ||
>            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    4 warnings generated.
>    Suppressed 4 warnings (4 in non-user code).
>    Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
>    9 warnings generated.
> >> drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
>            scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);
>            ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

yeah, this is desired behaviour, this read is only to make sure  that
we make something different than the pattern to test go over the bus.
However I will take a look to this warning and other clang warnings
that I am seeing in this report.

------
Cheers,
     Rui

  reply	other threads:[~2021-08-19  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 22:09 [usb:usb-testing 54/97] drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2021-08-19  7:47 ` Rui Miguel Silva [this message]
2021-08-19 14:59   ` Greg Kroah-Hartman
2021-08-19 15:06     ` Alan Stern

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=CDNBNHH65Z6Z.3P3H9W04XAHDB@arch-thunder \
    --to=rui.silva@linaro.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkp@intel.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