[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202011301341.OpQJ5zR4-lkp@intel.com>
Date: Mon, 30 Nov 2020 13:37:02 +0800
From: kernel test robot <lkp@...el.com>
To: Anant Thazhemadam <anant.thazhemadam@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kbuild-all@...ts.01.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/15] usb: misc: emi26: update to use
usb_control_msg_send()
Hi Anant,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on balbi-usb/testing/next peter.chen-usb/ci-for-usb-next v5.10-rc6 next-20201127]
[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/Anant-Thazhemadam/drivers-usb-misc-update-to-use-usb_control_msg_-send-recv/20201130-093816
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/bd85eb79b555200026380c4f93e83c4a667564e5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anant-Thazhemadam/drivers-usb-misc-update-to-use-usb_control_msg_-send-recv/20201130-093816
git checkout bd85eb79b555200026380c4f93e83c4a667564e5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/usb/misc/emi26.c: In function 'emi26_load_firmware':
>> drivers/usb/misc/emi26.c:201:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
201 | }
| ^
vim +201 drivers/usb/misc/emi26.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 60
^1da177e4c3f415 Linus Torvalds 2005-04-16 61 static int emi26_load_firmware (struct usb_device *dev)
^1da177e4c3f415 Linus Torvalds 2005-04-16 62 {
ae93a55bf948753 David Woodhouse 2008-05-30 63 const struct firmware *loader_fw = NULL;
ae93a55bf948753 David Woodhouse 2008-05-30 64 const struct firmware *bitstream_fw = NULL;
ae93a55bf948753 David Woodhouse 2008-05-30 65 const struct firmware *firmware_fw = NULL;
ae93a55bf948753 David Woodhouse 2008-05-30 66 const struct ihex_binrec *rec;
b412284b9698456 Greg Kroah-Hartman 2012-04-20 67 int err = -ENOMEM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 68 int i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 69 __u32 addr; /* Address to write */
bd85eb79b555200 Anant Thazhemadam 2020-11-30 70 __u8 buf[FW_LOAD_SIZE];
^1da177e4c3f415 Linus Torvalds 2005-04-16 71
ae93a55bf948753 David Woodhouse 2008-05-30 72 err = request_ihex_firmware(&loader_fw, "emi26/loader.fw", &dev->dev);
ae93a55bf948753 David Woodhouse 2008-05-30 73 if (err)
ae93a55bf948753 David Woodhouse 2008-05-30 74 goto nofw;
ae93a55bf948753 David Woodhouse 2008-05-30 75
ae93a55bf948753 David Woodhouse 2008-05-30 76 err = request_ihex_firmware(&bitstream_fw, "emi26/bitstream.fw",
ae93a55bf948753 David Woodhouse 2008-05-30 77 &dev->dev);
ae93a55bf948753 David Woodhouse 2008-05-30 78 if (err)
ae93a55bf948753 David Woodhouse 2008-05-30 79 goto nofw;
ae93a55bf948753 David Woodhouse 2008-05-30 80
ae93a55bf948753 David Woodhouse 2008-05-30 81 err = request_ihex_firmware(&firmware_fw, "emi26/firmware.fw",
ae93a55bf948753 David Woodhouse 2008-05-30 82 &dev->dev);
ae93a55bf948753 David Woodhouse 2008-05-30 83 if (err) {
ae93a55bf948753 David Woodhouse 2008-05-30 84 nofw:
fd3f1917e345d85 Greg Kroah-Hartman 2008-08-14 85 dev_err(&dev->dev, "%s - request_firmware() failed\n",
fd3f1917e345d85 Greg Kroah-Hartman 2008-08-14 86 __func__);
ae93a55bf948753 David Woodhouse 2008-05-30 87 goto wraperr;
ae93a55bf948753 David Woodhouse 2008-05-30 88 }
ae93a55bf948753 David Woodhouse 2008-05-30 89
^1da177e4c3f415 Linus Torvalds 2005-04-16 90 /* Assert reset (stop the CPU in the EMI) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 91 err = emi26_set_reset(dev,1);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 92 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 93 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 94
ae93a55bf948753 David Woodhouse 2008-05-30 95 rec = (const struct ihex_binrec *)loader_fw->data;
^1da177e4c3f415 Linus Torvalds 2005-04-16 96 /* 1. We need to put the loader for the FPGA into the EZ-USB */
ae93a55bf948753 David Woodhouse 2008-05-30 97 while (rec) {
ae93a55bf948753 David Woodhouse 2008-05-30 98 err = emi26_writememory(dev, be32_to_cpu(rec->addr),
ae93a55bf948753 David Woodhouse 2008-05-30 99 rec->data, be16_to_cpu(rec->len),
ae93a55bf948753 David Woodhouse 2008-05-30 100 ANCHOR_LOAD_INTERNAL);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 101 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 102 goto wraperr;
ae93a55bf948753 David Woodhouse 2008-05-30 103 rec = ihex_next_binrec(rec);
^1da177e4c3f415 Linus Torvalds 2005-04-16 104 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 105
^1da177e4c3f415 Linus Torvalds 2005-04-16 106 /* De-assert reset (let the CPU run) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 107 err = emi26_set_reset(dev,0);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 108 if (err < 0)
cf4cf0bb89cbff9 Oliver Neukum 2007-10-25 109 goto wraperr;
16c23f7d88cbcce Monty 2006-05-09 110 msleep(250); /* let device settle */
^1da177e4c3f415 Linus Torvalds 2005-04-16 111
^1da177e4c3f415 Linus Torvalds 2005-04-16 112 /* 2. We upload the FPGA firmware into the EMI
^1da177e4c3f415 Linus Torvalds 2005-04-16 113 * Note: collect up to 1023 (yes!) bytes and send them with
^1da177e4c3f415 Linus Torvalds 2005-04-16 114 * a single request. This is _much_ faster! */
ae93a55bf948753 David Woodhouse 2008-05-30 115 rec = (const struct ihex_binrec *)bitstream_fw->data;
^1da177e4c3f415 Linus Torvalds 2005-04-16 116 do {
^1da177e4c3f415 Linus Torvalds 2005-04-16 117 i = 0;
ae93a55bf948753 David Woodhouse 2008-05-30 118 addr = be32_to_cpu(rec->addr);
^1da177e4c3f415 Linus Torvalds 2005-04-16 119
^1da177e4c3f415 Linus Torvalds 2005-04-16 120 /* intel hex records are terminated with type 0 element */
ae93a55bf948753 David Woodhouse 2008-05-30 121 while (rec && (i + be16_to_cpu(rec->len) < FW_LOAD_SIZE)) {
bd85eb79b555200 Anant Thazhemadam 2020-11-30 122 memcpy(&buf[i], rec->data, be16_to_cpu(rec->len));
ae93a55bf948753 David Woodhouse 2008-05-30 123 i += be16_to_cpu(rec->len);
ae93a55bf948753 David Woodhouse 2008-05-30 124 rec = ihex_next_binrec(rec);
^1da177e4c3f415 Linus Torvalds 2005-04-16 125 }
bd85eb79b555200 Anant Thazhemadam 2020-11-30 126 err = emi26_writememory(dev, addr, &buf, i, ANCHOR_LOAD_FPGA);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 127 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 128 goto wraperr;
327d74f6b65ddc8 Marcin Slusarz 2009-01-04 129 } while (rec);
^1da177e4c3f415 Linus Torvalds 2005-04-16 130
^1da177e4c3f415 Linus Torvalds 2005-04-16 131 /* Assert reset (stop the CPU in the EMI) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 132 err = emi26_set_reset(dev,1);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 133 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 134 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 135
^1da177e4c3f415 Linus Torvalds 2005-04-16 136 /* 3. We need to put the loader for the firmware into the EZ-USB (again...) */
ae93a55bf948753 David Woodhouse 2008-05-30 137 for (rec = (const struct ihex_binrec *)loader_fw->data;
ae93a55bf948753 David Woodhouse 2008-05-30 138 rec; rec = ihex_next_binrec(rec)) {
ae93a55bf948753 David Woodhouse 2008-05-30 139 err = emi26_writememory(dev, be32_to_cpu(rec->addr),
ae93a55bf948753 David Woodhouse 2008-05-30 140 rec->data, be16_to_cpu(rec->len),
ae93a55bf948753 David Woodhouse 2008-05-30 141 ANCHOR_LOAD_INTERNAL);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 142 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 143 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 144 }
16c23f7d88cbcce Monty 2006-05-09 145 msleep(250); /* let device settle */
^1da177e4c3f415 Linus Torvalds 2005-04-16 146
^1da177e4c3f415 Linus Torvalds 2005-04-16 147 /* De-assert reset (let the CPU run) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 148 err = emi26_set_reset(dev,0);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 149 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 150 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 151
^1da177e4c3f415 Linus Torvalds 2005-04-16 152 /* 4. We put the part of the firmware that lies in the external RAM into the EZ-USB */
ae93a55bf948753 David Woodhouse 2008-05-30 153
ae93a55bf948753 David Woodhouse 2008-05-30 154 for (rec = (const struct ihex_binrec *)firmware_fw->data;
ae93a55bf948753 David Woodhouse 2008-05-30 155 rec; rec = ihex_next_binrec(rec)) {
ae93a55bf948753 David Woodhouse 2008-05-30 156 if (!INTERNAL_RAM(be32_to_cpu(rec->addr))) {
ae93a55bf948753 David Woodhouse 2008-05-30 157 err = emi26_writememory(dev, be32_to_cpu(rec->addr),
ae93a55bf948753 David Woodhouse 2008-05-30 158 rec->data, be16_to_cpu(rec->len),
ae93a55bf948753 David Woodhouse 2008-05-30 159 ANCHOR_LOAD_EXTERNAL);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 160 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 161 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 162 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 163 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 164
^1da177e4c3f415 Linus Torvalds 2005-04-16 165 /* Assert reset (stop the CPU in the EMI) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 166 err = emi26_set_reset(dev,1);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 167 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 168 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 169
ae93a55bf948753 David Woodhouse 2008-05-30 170 for (rec = (const struct ihex_binrec *)firmware_fw->data;
ae93a55bf948753 David Woodhouse 2008-05-30 171 rec; rec = ihex_next_binrec(rec)) {
ae93a55bf948753 David Woodhouse 2008-05-30 172 if (INTERNAL_RAM(be32_to_cpu(rec->addr))) {
ae93a55bf948753 David Woodhouse 2008-05-30 173 err = emi26_writememory(dev, be32_to_cpu(rec->addr),
ae93a55bf948753 David Woodhouse 2008-05-30 174 rec->data, be16_to_cpu(rec->len),
ae93a55bf948753 David Woodhouse 2008-05-30 175 ANCHOR_LOAD_INTERNAL);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 176 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 177 goto wraperr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 178 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 179 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 180
^1da177e4c3f415 Linus Torvalds 2005-04-16 181 /* De-assert reset (let the CPU run) */
^1da177e4c3f415 Linus Torvalds 2005-04-16 182 err = emi26_set_reset(dev,0);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 183 if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16 184 goto wraperr;
16c23f7d88cbcce Monty 2006-05-09 185 msleep(250); /* let device settle */
^1da177e4c3f415 Linus Torvalds 2005-04-16 186
^1da177e4c3f415 Linus Torvalds 2005-04-16 187 /* return 1 to fail the driver inialization
^1da177e4c3f415 Linus Torvalds 2005-04-16 188 * and give real driver change to load */
^1da177e4c3f415 Linus Torvalds 2005-04-16 189 err = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 190
^1da177e4c3f415 Linus Torvalds 2005-04-16 191 wraperr:
b412284b9698456 Greg Kroah-Hartman 2012-04-20 192 if (err < 0)
b412284b9698456 Greg Kroah-Hartman 2012-04-20 193 dev_err(&dev->dev,"%s - error loading firmware: error = %d\n",
b412284b9698456 Greg Kroah-Hartman 2012-04-20 194 __func__, err);
b412284b9698456 Greg Kroah-Hartman 2012-04-20 195
ae93a55bf948753 David Woodhouse 2008-05-30 196 release_firmware(loader_fw);
ae93a55bf948753 David Woodhouse 2008-05-30 197 release_firmware(bitstream_fw);
ae93a55bf948753 David Woodhouse 2008-05-30 198 release_firmware(firmware_fw);
ae93a55bf948753 David Woodhouse 2008-05-30 199
^1da177e4c3f415 Linus Torvalds 2005-04-16 200 return err;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @201 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 202
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (58894 bytes)
Powered by blists - more mailing lists