All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v8 17/22] counter: Add character device interface
Date: Sat, 13 Feb 2021 08:17:52 +0800	[thread overview]
Message-ID: <202102130858.kbTkF4rB-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <720278e3aaf3f249657ec18d158eca3f962baf8e.1613131238.git.vilhelm.gray@gmail.com>
References: <720278e3aaf3f249657ec18d158eca3f962baf8e.1613131238.git.vilhelm.gray@gmail.com>
TO: William Breathitt Gray <vilhelm.gray@gmail.com>

Hi William,

I love your patch! Perhaps something to improve:

[auto build test WARNING on b72d4f6a5122a78941ce5a3147685d6a44939a75]

url:    https://github.com/0day-ci/linux/commits/William-Breathitt-Gray/Introduce-the-Counter-character-device-interface/20210212-202458
base:   b72d4f6a5122a78941ce5a3147685d6a44939a75
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: x86_64-randconfig-m001-20210211 (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/counter-chrdev.c:406 counter_get_data() error: uninitialized symbol 'ret'.

Old smatch warnings:
drivers/counter/counter-chrdev.c:425 counter_get_data() error: uninitialized symbol 'ret'.

vim +/ret +406 drivers/counter/counter-chrdev.c

fba99317e1558b William Breathitt Gray 2021-02-12  377  
fba99317e1558b William Breathitt Gray 2021-02-12  378  static int counter_get_data(struct counter_device *const counter,
fba99317e1558b William Breathitt Gray 2021-02-12  379  			    const struct counter_comp_node *const comp_node,
fba99317e1558b William Breathitt Gray 2021-02-12  380  			    u64 *const value)
fba99317e1558b William Breathitt Gray 2021-02-12  381  {
fba99317e1558b William Breathitt Gray 2021-02-12  382  	const struct counter_comp *const comp = &comp_node->comp;
fba99317e1558b William Breathitt Gray 2021-02-12  383  	void *const parent = comp_node->parent;
fba99317e1558b William Breathitt Gray 2021-02-12  384  	u8 value_u8 = 0;
fba99317e1558b William Breathitt Gray 2021-02-12  385  	u32 value_u32 = 0;
fba99317e1558b William Breathitt Gray 2021-02-12  386  	int ret;
fba99317e1558b William Breathitt Gray 2021-02-12  387  
fba99317e1558b William Breathitt Gray 2021-02-12  388  	if (comp_node->component.type == COUNTER_COMPONENT_NONE)
fba99317e1558b William Breathitt Gray 2021-02-12  389  		return 0;
fba99317e1558b William Breathitt Gray 2021-02-12  390  
fba99317e1558b William Breathitt Gray 2021-02-12  391  	switch (comp->type) {
fba99317e1558b William Breathitt Gray 2021-02-12  392  	case COUNTER_COMP_U8:
fba99317e1558b William Breathitt Gray 2021-02-12  393  	case COUNTER_COMP_BOOL:
fba99317e1558b William Breathitt Gray 2021-02-12  394  		switch (comp_node->component.scope) {
fba99317e1558b William Breathitt Gray 2021-02-12  395  		case COUNTER_SCOPE_DEVICE:
fba99317e1558b William Breathitt Gray 2021-02-12  396  			ret = comp->device_u8_read(counter, &value_u8);
fba99317e1558b William Breathitt Gray 2021-02-12  397  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  398  		case COUNTER_SCOPE_SIGNAL:
fba99317e1558b William Breathitt Gray 2021-02-12  399  			ret = comp->signal_u8_read(counter, parent, &value_u8);
fba99317e1558b William Breathitt Gray 2021-02-12  400  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  401  		case COUNTER_SCOPE_COUNT:
fba99317e1558b William Breathitt Gray 2021-02-12  402  			ret = comp->count_u8_read(counter, parent, &value_u8);
fba99317e1558b William Breathitt Gray 2021-02-12  403  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  404  		}
fba99317e1558b William Breathitt Gray 2021-02-12  405  		*value = value_u8;
fba99317e1558b William Breathitt Gray 2021-02-12 @406  		return ret;
fba99317e1558b William Breathitt Gray 2021-02-12  407  	case COUNTER_COMP_SIGNAL_LEVEL:
fba99317e1558b William Breathitt Gray 2021-02-12  408  	case COUNTER_COMP_FUNCTION:
fba99317e1558b William Breathitt Gray 2021-02-12  409  	case COUNTER_COMP_ENUM:
fba99317e1558b William Breathitt Gray 2021-02-12  410  	case COUNTER_COMP_COUNT_DIRECTION:
fba99317e1558b William Breathitt Gray 2021-02-12  411  	case COUNTER_COMP_COUNT_MODE:
fba99317e1558b William Breathitt Gray 2021-02-12  412  		switch (comp_node->component.scope) {
fba99317e1558b William Breathitt Gray 2021-02-12  413  		case COUNTER_SCOPE_DEVICE:
fba99317e1558b William Breathitt Gray 2021-02-12  414  			ret = comp->device_u32_read(counter, &value_u32);
fba99317e1558b William Breathitt Gray 2021-02-12  415  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  416  		case COUNTER_SCOPE_SIGNAL:
fba99317e1558b William Breathitt Gray 2021-02-12  417  			ret = comp->signal_u32_read(counter, parent,
fba99317e1558b William Breathitt Gray 2021-02-12  418  						    &value_u32);
fba99317e1558b William Breathitt Gray 2021-02-12  419  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  420  		case COUNTER_SCOPE_COUNT:
fba99317e1558b William Breathitt Gray 2021-02-12  421  			ret = comp->count_u32_read(counter, parent, &value_u32);
fba99317e1558b William Breathitt Gray 2021-02-12  422  			break;
fba99317e1558b William Breathitt Gray 2021-02-12  423  		}
fba99317e1558b William Breathitt Gray 2021-02-12  424  		*value = value_u32;
fba99317e1558b William Breathitt Gray 2021-02-12  425  		return ret;
fba99317e1558b William Breathitt Gray 2021-02-12  426  	case COUNTER_COMP_U64:
fba99317e1558b William Breathitt Gray 2021-02-12  427  		switch (comp_node->component.scope) {
fba99317e1558b William Breathitt Gray 2021-02-12  428  		case COUNTER_SCOPE_DEVICE:
fba99317e1558b William Breathitt Gray 2021-02-12  429  			return comp->device_u64_read(counter, value);
fba99317e1558b William Breathitt Gray 2021-02-12  430  		case COUNTER_SCOPE_SIGNAL:
fba99317e1558b William Breathitt Gray 2021-02-12  431  			return comp->signal_u64_read(counter, parent, value);
fba99317e1558b William Breathitt Gray 2021-02-12  432  		case COUNTER_SCOPE_COUNT:
fba99317e1558b William Breathitt Gray 2021-02-12  433  			return comp->count_u64_read(counter, parent, value);
fba99317e1558b William Breathitt Gray 2021-02-12  434  		default:
fba99317e1558b William Breathitt Gray 2021-02-12  435  			return -EINVAL;
fba99317e1558b William Breathitt Gray 2021-02-12  436  		}
fba99317e1558b William Breathitt Gray 2021-02-12  437  	case COUNTER_COMP_SYNAPSE_ACTION:
fba99317e1558b William Breathitt Gray 2021-02-12  438  		ret = comp->action_read(counter, parent, comp->priv,
fba99317e1558b William Breathitt Gray 2021-02-12  439  					&value_u32);
fba99317e1558b William Breathitt Gray 2021-02-12  440  		*value = value_u32;
fba99317e1558b William Breathitt Gray 2021-02-12  441  		return ret;
fba99317e1558b William Breathitt Gray 2021-02-12  442  	default:
fba99317e1558b William Breathitt Gray 2021-02-12  443  		return -EINVAL;
fba99317e1558b William Breathitt Gray 2021-02-12  444  	}
fba99317e1558b William Breathitt Gray 2021-02-12  445  }
fba99317e1558b William Breathitt Gray 2021-02-12  446  

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

             reply	other threads:[~2021-02-13  0:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  0:17 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-12 12:13 [PATCH v8 00/22] Introduce the Counter character device interface William Breathitt Gray
2021-02-12 12:13 ` [PATCH v8 17/22] counter: Add " William Breathitt Gray
2021-02-12 12:13   ` William Breathitt Gray
2021-02-14 18:06   ` Jonathan Cameron
2021-02-14 18:06     ` Jonathan Cameron
2021-02-24  5:34     ` William Breathitt Gray
2021-02-24  5:34       ` William Breathitt Gray
2021-02-15  9:24   ` Oleksij Rempel
2021-02-15  9:24     ` Oleksij Rempel
2021-02-16  1:53     ` William Breathitt Gray
2021-02-16  1:53       ` William Breathitt Gray

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=202102130858.kbTkF4rB-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.