From: kernel test robot <lkp@intel.com>
To: Alexey Klimov <klimov.linux@gmail.com>, linux-watchdog@vger.kernel.org
Cc: kbuild-all@lists.01.org, wim@linux-watchdog.org,
linux@roeck-us.net, oneukum@suse.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, atishp@rivosinc.com,
atishp@atishpatra.org, yury.norov@gmail.com, aklimov@redhat.com,
atomlin@redhat.com, klimov.linux@gmail.com
Subject: Re: [PATCH v4] watchdog: add driver for StreamLabs USB watchdog device
Date: Sun, 17 Jul 2022 05:07:02 +0800 [thread overview]
Message-ID: <202207170459.ZyslrGcE-lkp@intel.com> (raw)
In-Reply-To: <20220715234442.3910204-1-klimov.linux@gmail.com>
Hi Alexey,
I love your patch! Perhaps something to improve:
[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v5.19-rc6 next-20220715]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Alexey-Klimov/watchdog-add-driver-for-StreamLabs-USB-watchdog-device/20220717-000621
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: arc-randconfig-s032-20220717 (https://download.01.org/0day-ci/archive/20220717/202207170459.ZyslrGcE-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/897fbad1d3a4917a703454a9f79728c6af44d0a4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Alexey-Klimov/watchdog-add-driver-for-StreamLabs-USB-watchdog-device/20220717-000621
git checkout 897fbad1d3a4917a703454a9f79728c6af44d0a4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash drivers/watchdog/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/watchdog/streamlabs_wdt.c:70:23: sparse: sparse: restricted __le16 degrades to integer
>> drivers/watchdog/streamlabs_wdt.c:96:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
drivers/watchdog/streamlabs_wdt.c:96:16: sparse: expected unsigned short [usertype]
drivers/watchdog/streamlabs_wdt.c:96:16: sparse: got restricted __le16 [usertype]
drivers/watchdog/streamlabs_wdt.c:97:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
drivers/watchdog/streamlabs_wdt.c:97:16: sparse: expected unsigned short [usertype]
drivers/watchdog/streamlabs_wdt.c:97:16: sparse: got restricted __le16 [usertype]
drivers/watchdog/streamlabs_wdt.c:98:16: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
drivers/watchdog/streamlabs_wdt.c:98:16: sparse: expected unsigned short [usertype]
drivers/watchdog/streamlabs_wdt.c:98:16: sparse: got restricted __le16 [usertype]
vim +70 drivers/watchdog/streamlabs_wdt.c
57
58 static bool nowayout = WATCHDOG_NOWAYOUT;
59 module_param(nowayout, bool, 0);
60 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
61 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
62
63 /*
64 * This function is used to check if watchdog actually changed
65 * its state to disabled that is reported in first two bytes of response
66 * message.
67 */
68 static int usb_streamlabs_wdt_check_stop(u16 *buf)
69 {
> 70 if (buf[0] != cpu_to_le16(STREAMLABS_CMD_STOP))
71 return -EINVAL;
72
73 return 0;
74 }
75
76 static int usb_streamlabs_wdt_validate_response(u8 *buf)
77 {
78 /*
79 * If watchdog device understood the command it will acknowledge
80 * with values 1,2,3,4 at indexes 10, 11, 12, 13 in response message
81 * when response treated as 8bit message.
82 */
83 if (buf[10] != 1 || buf[11] != 2 || buf[12] != 3 || buf[13] != 4)
84 return -EPROTO;
85
86 return 0;
87 }
88
89 static void usb_streamlabs_wdt_prepare_buf(u16 *buf, u16 cmd,
90 unsigned long timeout_msec)
91 {
92 /*
93 * remaining elements expected to be zero everytime during
94 * communication
95 */
> 96 buf[0] = cpu_to_le16(cmd);
97 buf[1] = cpu_to_le16(0x8000);
98 buf[3] = cpu_to_le16(timeout_msec);
99 buf[5] = 0x0;
100 buf[6] = 0x0;
101 }
102
--
0-DAY CI Kernel Test Service
https://01.org/lkp
prev parent reply other threads:[~2022-07-16 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 23:44 [PATCH v4] watchdog: add driver for StreamLabs USB watchdog device Alexey Klimov
2022-07-16 12:32 ` Guenter Roeck
2022-07-18 1:23 ` Alexey Klimov
2022-07-18 2:17 ` Guenter Roeck
2022-07-16 21:07 ` kernel test robot [this message]
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=202207170459.ZyslrGcE-lkp@intel.com \
--to=lkp@intel.com \
--cc=aklimov@redhat.com \
--cc=atishp@atishpatra.org \
--cc=atishp@rivosinc.com \
--cc=atomlin@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=klimov.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=oneukum@suse.com \
--cc=wim@linux-watchdog.org \
--cc=yury.norov@gmail.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