From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/platform/chrome/cros_ec_proto_test.c:147 cros_ec_proto_test_init() warn: other places set '(struct cros_ec_device)->dout_size' to 'byte' instead of 'array_size'
Date: Fri, 12 May 2023 00:26:06 +0800 [thread overview]
Message-ID: <202305120056.V0DNGOLb-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Tzung-Bi Shih" <tzungbi@kernel.org>
CC: Guenter Roeck <groeck@chromium.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 80e62bc8487b049696e67ad133c503bf7f6806f7
commit: db681eaf7145158fb49eddbdb548692e8bfe7fab platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_prepare_tx()
date: 11 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 11 months ago
config: parisc-randconfig-m041-20230509 (https://download.01.org/0day-ci/archive/20230512/202305120056.V0DNGOLb-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305120056.V0DNGOLb-lkp@intel.com/
smatch warnings:
drivers/platform/chrome/cros_ec_proto_test.c:147 cros_ec_proto_test_init() warn: other places set '(struct cros_ec_device)->dout_size' to 'byte' instead of 'array_size'
vim +147 drivers/platform/chrome/cros_ec_proto_test.c
db681eaf7145158 Tzung-Bi Shih 2022-05-18 134
db681eaf7145158 Tzung-Bi Shih 2022-05-18 135 static int cros_ec_proto_test_init(struct kunit *test)
db681eaf7145158 Tzung-Bi Shih 2022-05-18 136 {
db681eaf7145158 Tzung-Bi Shih 2022-05-18 137 struct cros_ec_proto_test_priv *priv;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 138 struct cros_ec_device *ec_dev;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 139
db681eaf7145158 Tzung-Bi Shih 2022-05-18 140 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
db681eaf7145158 Tzung-Bi Shih 2022-05-18 141 if (!priv)
db681eaf7145158 Tzung-Bi Shih 2022-05-18 142 return -ENOMEM;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 143 test->priv = priv;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 144
db681eaf7145158 Tzung-Bi Shih 2022-05-18 145 ec_dev = &priv->ec_dev;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 146 ec_dev->dout = (u8 *)priv->dout;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 @147 ec_dev->dout_size = ARRAY_SIZE(priv->dout);
db681eaf7145158 Tzung-Bi Shih 2022-05-18 148 ec_dev->din = (u8 *)priv->din;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 149 ec_dev->din_size = ARRAY_SIZE(priv->din);
db681eaf7145158 Tzung-Bi Shih 2022-05-18 150 ec_dev->proto_version = EC_HOST_REQUEST_VERSION;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 151
db681eaf7145158 Tzung-Bi Shih 2022-05-18 152 priv->msg = (struct cros_ec_command *)priv->_msg;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 153
db681eaf7145158 Tzung-Bi Shih 2022-05-18 154 return 0;
db681eaf7145158 Tzung-Bi Shih 2022-05-18 155 }
db681eaf7145158 Tzung-Bi Shih 2022-05-18 156
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-05-11 16:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202305120056.V0DNGOLb-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.