All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [dlech-linux:bone-counter 1/12] drivers/counter/microchip-tcb-capture.c:173 mchp_tc_count_action_read() warn: bitwise AND condition is false here
Date: Wed, 14 Oct 2020 19:52:45 +0800	[thread overview]
Message-ID: <202010141941.mSPXXAud-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
TO: William Breathitt Gray <vilhelm.gray@gmail.com>
CC: David Lechner <david@lechnology.com>

tree:   https://github.com/dlech/linux bone-counter
head:   f8f0ad10f30b5c1bea1a22f5de5dc9f2c6b7db1a
commit: 5251e7147d627fbe13308dc390347dc16efeb85b [1/12] counter: Internalize sysfs interface code
:::::: branch date: 10 hours ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20201014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/counter/microchip-tcb-capture.c:173 mchp_tc_count_action_read() warn: bitwise AND condition is false here
drivers/counter/counter-sysfs.c:109 counter_comp_u8_show() error: uninitialized symbol 'err'.
drivers/counter/counter-sysfs.c:114 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:233 counter_comp_u64_show() error: uninitialized symbol 'err'.
drivers/counter/counter-sysfs.c:236 counter_comp_u64_show() error: uninitialized symbol 'data'.

Old smatch warnings:
drivers/counter/counter-sysfs.c:116 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:118 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:120 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:122 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:124 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:126 counter_comp_u8_show() error: uninitialized symbol 'data'.
drivers/counter/counter-sysfs.c:131 counter_comp_u8_show() error: uninitialized symbol 'data'.

vim +173 drivers/counter/microchip-tcb-capture.c

106b104137fd5f0 Kamel Bouhara          2020-07-06  160  
5251e7147d627fb William Breathitt Gray 2020-09-26  161  static int mchp_tc_count_action_read(struct counter_device *counter,
106b104137fd5f0 Kamel Bouhara          2020-07-06  162  				     struct counter_count *count,
106b104137fd5f0 Kamel Bouhara          2020-07-06  163  				     struct counter_synapse *synapse,
5251e7147d627fb William Breathitt Gray 2020-09-26  164  				     u8 *action)
106b104137fd5f0 Kamel Bouhara          2020-07-06  165  {
106b104137fd5f0 Kamel Bouhara          2020-07-06  166  	struct mchp_tc_data *const priv = counter->priv;
106b104137fd5f0 Kamel Bouhara          2020-07-06  167  	u32 cmr;
106b104137fd5f0 Kamel Bouhara          2020-07-06  168  
106b104137fd5f0 Kamel Bouhara          2020-07-06  169  	regmap_read(priv->regmap, ATMEL_TC_REG(priv->channel[0], CMR), &cmr);
106b104137fd5f0 Kamel Bouhara          2020-07-06  170  
5251e7147d627fb William Breathitt Gray 2020-09-26  171  	*action = COUNTER_SYNAPSE_ACTION_NONE;
106b104137fd5f0 Kamel Bouhara          2020-07-06  172  
106b104137fd5f0 Kamel Bouhara          2020-07-06 @173  	if (cmr & ATMEL_TC_ETRGEDG_NONE)
5251e7147d627fb William Breathitt Gray 2020-09-26  174  		*action = COUNTER_SYNAPSE_ACTION_NONE;
106b104137fd5f0 Kamel Bouhara          2020-07-06  175  	else if (cmr & ATMEL_TC_ETRGEDG_RISING)
5251e7147d627fb William Breathitt Gray 2020-09-26  176  		*action = COUNTER_SYNAPSE_ACTION_RISING_EDGE;
106b104137fd5f0 Kamel Bouhara          2020-07-06  177  	else if (cmr & ATMEL_TC_ETRGEDG_FALLING)
5251e7147d627fb William Breathitt Gray 2020-09-26  178  		*action = COUNTER_SYNAPSE_ACTION_FALLING_EDGE;
106b104137fd5f0 Kamel Bouhara          2020-07-06  179  	else if (cmr & ATMEL_TC_ETRGEDG_BOTH)
5251e7147d627fb William Breathitt Gray 2020-09-26  180  		*action = COUNTER_SYNAPSE_ACTION_BOTH_EDGES;
106b104137fd5f0 Kamel Bouhara          2020-07-06  181  
106b104137fd5f0 Kamel Bouhara          2020-07-06  182  	return 0;
106b104137fd5f0 Kamel Bouhara          2020-07-06  183  }
106b104137fd5f0 Kamel Bouhara          2020-07-06  184  

:::::: The code at line 173 was first introduced by commit
:::::: 106b104137fd5f0dbcafadd7ad566b86ec183466 counter: Add microchip TCB capture counter

:::::: TO: Kamel Bouhara <kamel.bouhara@bootlin.com>
:::::: CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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

             reply	other threads:[~2020-10-14 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 11:52 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-14 14:40 [dlech-linux:bone-counter 1/12] drivers/counter/microchip-tcb-capture.c:173 mchp_tc_count_action_read() warn: bitwise AND condition is false here Dan Carpenter

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=202010141941.mSPXXAud-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@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.