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 3/21] drivers/counter/counter-chrdev.c:396 counter_get_data() error: uninitialized symbol 'value_u8'.
Date: Tue, 15 Dec 2020 12:39:34 +0800	[thread overview]
Message-ID: <202012151243.V5Ql3Ylo-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5786 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:   dc99d06b0f101cff0b3157b1cb49e28e95387c46
commit: d698926a635b0cf342b9b18e04b5f15701834158 [3/21] counter: Add character device interface
:::::: branch date: 29 hours ago
:::::: commit date: 33 hours ago
config: x86_64-randconfig-m001-20201213 (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>

smatch warnings:
drivers/counter/counter-chrdev.c:396 counter_get_data() error: uninitialized symbol 'value_u8'.

vim +/value_u8 +396 drivers/counter/counter-chrdev.c

d698926a635b0cf William Breathitt Gray 2020-11-22  361  
d698926a635b0cf William Breathitt Gray 2020-11-22  362  static int counter_get_data(struct counter_device *const counter,
d698926a635b0cf William Breathitt Gray 2020-11-22  363  			    const struct counter_comp_node *const comp_node,
d698926a635b0cf William Breathitt Gray 2020-11-22  364  			    u64 *const value)
d698926a635b0cf William Breathitt Gray 2020-11-22  365  {
d698926a635b0cf William Breathitt Gray 2020-11-22  366  	const struct counter_comp *const comp = &comp_node->comp;
d698926a635b0cf William Breathitt Gray 2020-11-22  367  	void *const parent = comp_node->parent;
d698926a635b0cf William Breathitt Gray 2020-11-22  368  	int err = 0;
d698926a635b0cf William Breathitt Gray 2020-11-22  369  	u8 value_u8;
d698926a635b0cf William Breathitt Gray 2020-11-22  370  
d698926a635b0cf William Breathitt Gray 2020-11-22  371  	/* Dummy components don't have data so return early */
d698926a635b0cf William Breathitt Gray 2020-11-22  372  	if (comp_node->component.type == COUNTER_COMPONENT_DUMMY)
d698926a635b0cf William Breathitt Gray 2020-11-22  373  		return 0;
d698926a635b0cf William Breathitt Gray 2020-11-22  374  
d698926a635b0cf William Breathitt Gray 2020-11-22  375  	switch (comp->type) {
d698926a635b0cf William Breathitt Gray 2020-11-22  376  	case COUNTER_COMP_U8:
d698926a635b0cf William Breathitt Gray 2020-11-22  377  	case COUNTER_COMP_BOOL:
d698926a635b0cf William Breathitt Gray 2020-11-22  378  	case COUNTER_COMP_SIGNAL_LEVEL:
d698926a635b0cf William Breathitt Gray 2020-11-22  379  	case COUNTER_COMP_FUNCTION:
d698926a635b0cf William Breathitt Gray 2020-11-22  380  	case COUNTER_COMP_ENUM:
d698926a635b0cf William Breathitt Gray 2020-11-22  381  	case COUNTER_COMP_COUNT_DIRECTION:
d698926a635b0cf William Breathitt Gray 2020-11-22  382  	case COUNTER_COMP_COUNT_MODE:
d698926a635b0cf William Breathitt Gray 2020-11-22  383  		switch (comp_node->component.scope) {
d698926a635b0cf William Breathitt Gray 2020-11-22  384  		case COUNTER_SCOPE_DEVICE:
d698926a635b0cf William Breathitt Gray 2020-11-22  385  			err = comp->device_u8_read(counter, &value_u8);
d698926a635b0cf William Breathitt Gray 2020-11-22  386  			break;
d698926a635b0cf William Breathitt Gray 2020-11-22  387  		case COUNTER_SCOPE_SIGNAL:
d698926a635b0cf William Breathitt Gray 2020-11-22  388  			err = comp->signal_u8_read(counter, parent, &value_u8);
d698926a635b0cf William Breathitt Gray 2020-11-22  389  			break;
d698926a635b0cf William Breathitt Gray 2020-11-22  390  		case COUNTER_SCOPE_COUNT:
d698926a635b0cf William Breathitt Gray 2020-11-22  391  			err = comp->count_u8_read(counter, parent, &value_u8);
d698926a635b0cf William Breathitt Gray 2020-11-22  392  			break;
d698926a635b0cf William Breathitt Gray 2020-11-22  393  		}
d698926a635b0cf William Breathitt Gray 2020-11-22  394  		if (err)
d698926a635b0cf William Breathitt Gray 2020-11-22  395  			return err;
d698926a635b0cf William Breathitt Gray 2020-11-22 @396  		*value = value_u8;
d698926a635b0cf William Breathitt Gray 2020-11-22  397  		break;
d698926a635b0cf William Breathitt Gray 2020-11-22  398  	case COUNTER_COMP_U64:
d698926a635b0cf William Breathitt Gray 2020-11-22  399  		switch (comp_node->component.scope) {
d698926a635b0cf William Breathitt Gray 2020-11-22  400  		case COUNTER_SCOPE_DEVICE:
d698926a635b0cf William Breathitt Gray 2020-11-22  401  			return comp->device_u64_read(counter, value);
d698926a635b0cf William Breathitt Gray 2020-11-22  402  		case COUNTER_SCOPE_SIGNAL:
d698926a635b0cf William Breathitt Gray 2020-11-22  403  			return comp->signal_u64_read(counter, parent, value);
d698926a635b0cf William Breathitt Gray 2020-11-22  404  		case COUNTER_SCOPE_COUNT:
d698926a635b0cf William Breathitt Gray 2020-11-22  405  			return comp->count_u64_read(counter, parent, value);
d698926a635b0cf William Breathitt Gray 2020-11-22  406  		}
d698926a635b0cf William Breathitt Gray 2020-11-22  407  		break;
d698926a635b0cf William Breathitt Gray 2020-11-22  408  	case COUNTER_COMP_SYNAPSE_ACTION:
d698926a635b0cf William Breathitt Gray 2020-11-22  409  		err = comp->action_read(counter, parent, comp->priv, &value_u8);
d698926a635b0cf William Breathitt Gray 2020-11-22  410  		if (err)
d698926a635b0cf William Breathitt Gray 2020-11-22  411  			return err;
d698926a635b0cf William Breathitt Gray 2020-11-22  412  		*value = value_u8;
d698926a635b0cf William Breathitt Gray 2020-11-22  413  		break;
d698926a635b0cf William Breathitt Gray 2020-11-22  414  	}
d698926a635b0cf William Breathitt Gray 2020-11-22  415  
d698926a635b0cf William Breathitt Gray 2020-11-22  416  	return 0;
d698926a635b0cf William Breathitt Gray 2020-11-22  417  }
d698926a635b0cf William Breathitt Gray 2020-11-22  418  

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

             reply	other threads:[~2020-12-15  4:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15  4:39 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-15  8:00 [dlech-linux:bone-counter 3/21] drivers/counter/counter-chrdev.c:396 counter_get_data() error: uninitialized symbol 'value_u8' Dan Carpenter
2020-12-15  8:00 ` 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=202012151243.V5Ql3Ylo-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.