From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC Patch v2 1/3] i2c debug counters as sysfs attributes
Date: Sun, 05 Dec 2021 08:40:28 +0800 [thread overview]
Message-ID: <202112050811.jZxEi6SN-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4459 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211203023728.3699610-2-suichen@google.com>
References: <20211203023728.3699610-2-suichen@google.com>
TO: Sui Chen <suichen@google.com>
Hi Sui,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on linux/master linus/master v5.16-rc3 next-20211203]
[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/Sui-Chen/I2C-statistics-as-sysfs-attributes/20211203-103913
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20211203 (https://download.01.org/0day-ci/archive/20211205/202112050811.jZxEi6SN-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 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/i2c/i2c-dev.c:866 i2c_adapter_stats_register_counter() error: uninitialized symbol 'ret'.
vim +/ret +866 drivers/i2c/i2c-dev.c
16ccbe6d6d8b9a Sui Chen 2021-12-02 835
16ccbe6d6d8b9a Sui Chen 2021-12-02 836 void i2c_adapter_stats_register_counter(struct i2c_adapter* adapter,
16ccbe6d6d8b9a Sui Chen 2021-12-02 837 const char* counter_name, void* data_source) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 838 int ret;
16ccbe6d6d8b9a Sui Chen 2021-12-02 839 if (adapter->stats == NULL) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 840 i2c_adapter_create_stats_folder(adapter);
16ccbe6d6d8b9a Sui Chen 2021-12-02 841 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 842
16ccbe6d6d8b9a Sui Chen 2021-12-02 843 if (!strcmp(counter_name, "ber_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 844 adapter->stats->ber_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 845 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_ber_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 846 } else if (!strcmp(counter_name, "nack_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 847 adapter->stats->nack_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 848 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_nack_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 849 } else if (!strcmp(counter_name, "rec_succ_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 850 adapter->stats->rec_succ_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 851 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_rec_succ_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 852 } else if (!strcmp(counter_name, "rec_fail_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 853 adapter->stats->rec_fail_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 854 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_rec_fail_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 855 } else if (!strcmp(counter_name, "timeout_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 856 adapter->stats->timeout_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 857 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_timeout_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 858 } else if (!strcmp(counter_name, "i2c_speed")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 859 adapter->stats->i2c_speed = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 860 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_i2c_speed.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 861 } else if (!strcmp(counter_name, "tx_complete_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 862 adapter->stats->tx_complete_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 863 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_tx_complete_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 864 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 865
16ccbe6d6d8b9a Sui Chen 2021-12-02 @866 if (ret) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 867 printk("Failed to create sysfs file for %s", counter_name);
16ccbe6d6d8b9a Sui Chen 2021-12-02 868 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 869 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 870
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC Patch v2 1/3] i2c debug counters as sysfs attributes
Date: Mon, 06 Dec 2021 17:03:07 +0300 [thread overview]
Message-ID: <202112050811.jZxEi6SN-lkp@intel.com> (raw)
In-Reply-To: <20211203023728.3699610-2-suichen@google.com>
[-- Attachment #1: Type: text/plain, Size: 3827 bytes --]
Hi Sui,
url: https://github.com/0day-ci/linux/commits/Sui-Chen/I2C-statistics-as-sysfs-attributes/20211203-103913
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-randconfig-m001-20211203 (https://download.01.org/0day-ci/archive/20211205/202112050811.jZxEi6SN-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 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/i2c/i2c-dev.c:866 i2c_adapter_stats_register_counter() error: uninitialized symbol 'ret'.
vim +/ret +866 drivers/i2c/i2c-dev.c
16ccbe6d6d8b9a Sui Chen 2021-12-02 836 void i2c_adapter_stats_register_counter(struct i2c_adapter* adapter,
16ccbe6d6d8b9a Sui Chen 2021-12-02 837 const char* counter_name, void* data_source) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 838 int ret;
16ccbe6d6d8b9a Sui Chen 2021-12-02 839 if (adapter->stats == NULL) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 840 i2c_adapter_create_stats_folder(adapter);
16ccbe6d6d8b9a Sui Chen 2021-12-02 841 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 842
16ccbe6d6d8b9a Sui Chen 2021-12-02 843 if (!strcmp(counter_name, "ber_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 844 adapter->stats->ber_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 845 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_ber_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 846 } else if (!strcmp(counter_name, "nack_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 847 adapter->stats->nack_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 848 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_nack_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 849 } else if (!strcmp(counter_name, "rec_succ_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 850 adapter->stats->rec_succ_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 851 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_rec_succ_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 852 } else if (!strcmp(counter_name, "rec_fail_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 853 adapter->stats->rec_fail_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 854 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_rec_fail_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 855 } else if (!strcmp(counter_name, "timeout_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 856 adapter->stats->timeout_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 857 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_timeout_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 858 } else if (!strcmp(counter_name, "i2c_speed")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 859 adapter->stats->i2c_speed = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 860 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_i2c_speed.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 861 } else if (!strcmp(counter_name, "tx_complete_cnt")) {
16ccbe6d6d8b9a Sui Chen 2021-12-02 862 adapter->stats->tx_complete_cnt = data_source;
16ccbe6d6d8b9a Sui Chen 2021-12-02 863 ret = sysfs_create_file(adapter->stats->kobj, &dev_attr_tx_complete_cnt.attr);
16ccbe6d6d8b9a Sui Chen 2021-12-02 864 }
No else path.
16ccbe6d6d8b9a Sui Chen 2021-12-02 865
16ccbe6d6d8b9a Sui Chen 2021-12-02 @866 if (ret) {
^^^
16ccbe6d6d8b9a Sui Chen 2021-12-02 867 printk("Failed to create sysfs file for %s", counter_name);
16ccbe6d6d8b9a Sui Chen 2021-12-02 868 }
16ccbe6d6d8b9a Sui Chen 2021-12-02 869 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-12-05 0:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 0:40 kernel test robot [this message]
2021-12-06 14:03 ` [RFC Patch v2 1/3] i2c debug counters as sysfs attributes Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-12-05 1:43 kernel test robot
2021-12-03 2:37 [RFC Patch v2 0/3] I2C statistics " Sui Chen
2021-12-03 2:37 ` Sui Chen
2021-12-03 2:37 ` [RFC Patch v2 1/3] i2c debug counters " Sui Chen
2021-12-03 2:37 ` Sui Chen
2021-12-03 2:50 ` Joe Perches
2021-12-03 2:50 ` Joe Perches
2021-12-03 5:35 ` Sui Chen
2021-12-03 5:35 ` Sui Chen
2021-12-03 5:54 ` Joe Perches
2021-12-03 5:54 ` Joe Perches
2021-12-03 12:36 ` kernel test robot
2021-12-03 14:18 ` kernel test robot
2021-12-03 2:37 ` [RFC Patch v2 2/3] i2c: npcm7xx: add tx_complete counter Sui Chen
2021-12-03 2:37 ` Sui Chen
2021-12-03 2:37 ` [RFC Patch v2 3/3] add npcm7xx debug counters as sysfs attributes Sui Chen
2021-12-03 2:37 ` Sui Chen
2021-12-03 21:15 ` kernel test robot
2021-12-03 16:37 ` [RFC Patch v2 0/3] I2C statistics " Wolfram Sang
2021-12-03 16:37 ` Wolfram Sang
2021-12-07 16:00 ` Sui Chen
2022-01-03 9:44 ` Wolfram Sang
2022-01-03 9:44 ` Wolfram Sang
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=202112050811.jZxEi6SN-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.