drivers/usb/misc/usbtest.c:2148:1: warning: the frame size of 1216 bytes is larger than 1024 bytes
From: kbuild test robot
Date: Tue Dec 24 2019 - 21:05:27 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 46cf053efec6a3a5f343fead837777efe8252a46
commit: 7505576d1c1ac0cfe85fdf90999433dd8b673012 MIPS: add support for SGI Octane (IP30)
date: 8 weeks ago
config: mips-randconfig-a001-20191225 (attached as .config)
compiler: mips64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7505576d1c1ac0cfe85fdf90999433dd8b673012
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
drivers/usb/misc/usbtest.c: In function 'test_queue':
>> drivers/usb/misc/usbtest.c:2148:1: warning: the frame size of 1216 bytes is larger than 1024 bytes [-Wframe-larger-than=]
}
^
vim +2148 drivers/usb/misc/usbtest.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 2036
^1da177e4c3f415 Linus Torvalds 2005-04-16 2037 static int
18fc4ebdc705747 Deepa Dinamani 2015-11-04 2038 test_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param,
084fb206a91f72b Martin Fuzzey 2011-01-16 2039 int pipe, struct usb_endpoint_descriptor *desc, unsigned offset)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2040 {
145f48c518edb94 Peter Chen 2015-10-13 2041 struct transfer_context context;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2042 struct usb_device *udev;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2043 unsigned i;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2044 unsigned long packets = 0;
9da2150f59e885d Alan Stern 2006-05-22 2045 int status = 0;
c53439fbd15600e Tobin C. Harding 2018-03-09 2046 struct urb *urbs[MAX_SGLEN];
^1da177e4c3f415 Linus Torvalds 2005-04-16 2047
cb84f56861eb333 Dan Carpenter 2017-09-30 2048 if (!param->sglen || param->iterations > UINT_MAX / param->sglen)
cb84f56861eb333 Dan Carpenter 2017-09-30 2049 return -EINVAL;
cb84f56861eb333 Dan Carpenter 2017-09-30 2050
c53439fbd15600e Tobin C. Harding 2018-03-09 2051 if (param->sglen > MAX_SGLEN)
c53439fbd15600e Tobin C. Harding 2018-03-09 2052 return -EINVAL;
c53439fbd15600e Tobin C. Harding 2018-03-09 2053
f55055b4648416a Huang Rui 2013-10-21 2054 memset(&context, 0, sizeof(context));
^1da177e4c3f415 Linus Torvalds 2005-04-16 2055 context.count = param->iterations * param->sglen;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2056 context.dev = dev;
145f48c518edb94 Peter Chen 2015-10-13 2057 context.is_iso = !!desc;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2058 init_completion(&context.done);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2059 spin_lock_init(&context.lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2060
^1da177e4c3f415 Linus Torvalds 2005-04-16 2061 udev = testdev_to_usbdev(dev);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2062
^1da177e4c3f415 Linus Torvalds 2005-04-16 2063 for (i = 0; i < param->sglen; i++) {
145f48c518edb94 Peter Chen 2015-10-13 2064 if (context.is_iso)
^1da177e4c3f415 Linus Torvalds 2005-04-16 2065 urbs[i] = iso_alloc_urb(udev, pipe, desc,
084fb206a91f72b Martin Fuzzey 2011-01-16 2066 param->length, offset);
145f48c518edb94 Peter Chen 2015-10-13 2067 else
145f48c518edb94 Peter Chen 2015-10-13 2068 urbs[i] = complicated_alloc_urb(udev, pipe,
145f48c518edb94 Peter Chen 2015-10-13 2069 param->length, 0);
145f48c518edb94 Peter Chen 2015-10-13 2070
^1da177e4c3f415 Linus Torvalds 2005-04-16 2071 if (!urbs[i]) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2072 status = -ENOMEM;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2073 goto fail;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2074 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2075 packets += urbs[i]->number_of_packets;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2076 urbs[i]->context = &context;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2077 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2078 packets *= param->iterations;
145f48c518edb94 Peter Chen 2015-10-13 2079
145f48c518edb94 Peter Chen 2015-10-13 2080 if (context.is_iso) {
0d1ec194721f844 Peter Chen 2019-02-12 2081 int transaction_num;
0d1ec194721f844 Peter Chen 2019-02-12 2082
0d1ec194721f844 Peter Chen 2019-02-12 2083 if (udev->speed >= USB_SPEED_SUPER)
0d1ec194721f844 Peter Chen 2019-02-12 2084 transaction_num = ss_isoc_get_packet_num(udev, pipe);
0d1ec194721f844 Peter Chen 2019-02-12 2085 else
0d1ec194721f844 Peter Chen 2019-02-12 2086 transaction_num = usb_endpoint_maxp_mult(desc);
0d1ec194721f844 Peter Chen 2019-02-12 2087
145f48c518edb94 Peter Chen 2015-10-13 2088 dev_info(&dev->intf->dev,
145f48c518edb94 Peter Chen 2015-10-13 2089 "iso period %d %sframes, wMaxPacket %d, transactions: %d\n",
145f48c518edb94 Peter Chen 2015-10-13 2090 1 << (desc->bInterval - 1),
0d1ec194721f844 Peter Chen 2019-02-12 2091 (udev->speed >= USB_SPEED_HIGH) ? "micro" : "",
efdd17e66718306 Felipe Balbi 2016-09-28 2092 usb_endpoint_maxp(desc),
0d1ec194721f844 Peter Chen 2019-02-12 2093 transaction_num);
145f48c518edb94 Peter Chen 2015-10-13 2094
28ffd79c31a7bed David Brownell 2008-04-25 2095 dev_info(&dev->intf->dev,
a0c9d0defcdadd3 Peter Chen 2015-08-17 2096 "total %lu msec (%lu packets)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 2097 (packets * (1 << (desc->bInterval - 1)))
0d1ec194721f844 Peter Chen 2019-02-12 2098 / ((udev->speed >= USB_SPEED_HIGH) ? 8 : 1),
^1da177e4c3f415 Linus Torvalds 2005-04-16 2099 packets);
145f48c518edb94 Peter Chen 2015-10-13 2100 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2101
^1da177e4c3f415 Linus Torvalds 2005-04-16 2102 spin_lock_irq(&context.lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2103 for (i = 0; i < param->sglen; i++) {
9da2150f59e885d Alan Stern 2006-05-22 2104 ++context.pending;
54e6ecb23951b19 Christoph Lameter 2006-12-06 2105 status = usb_submit_urb(urbs[i], GFP_ATOMIC);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2106 if (status < 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2107 ERROR(dev, "submit iso[%d], error %d\n", i, status);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2108 if (i == 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2109 spin_unlock_irq(&context.lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2110 goto fail;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2111 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2112
^1da177e4c3f415 Linus Torvalds 2005-04-16 2113 simple_free_urb(urbs[i]);
e10e1bec8e6654d Ming Lei 2010-08-02 2114 urbs[i] = NULL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2115 context.pending--;
9da2150f59e885d Alan Stern 2006-05-22 2116 context.submit_error = 1;
9da2150f59e885d Alan Stern 2006-05-22 2117 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2118 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2119 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2120 spin_unlock_irq(&context.lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2121
^1da177e4c3f415 Linus Torvalds 2005-04-16 2122 wait_for_completion(&context.done);
9da2150f59e885d Alan Stern 2006-05-22 2123
e10e1bec8e6654d Ming Lei 2010-08-02 2124 for (i = 0; i < param->sglen; i++) {
e10e1bec8e6654d Ming Lei 2010-08-02 2125 if (urbs[i])
e10e1bec8e6654d Ming Lei 2010-08-02 2126 simple_free_urb(urbs[i]);
e10e1bec8e6654d Ming Lei 2010-08-02 2127 }
9da2150f59e885d Alan Stern 2006-05-22 2128 /*
9da2150f59e885d Alan Stern 2006-05-22 2129 * Isochronous transfers are expected to fail sometimes. As an
9da2150f59e885d Alan Stern 2006-05-22 2130 * arbitrary limit, we will report an error if any submissions
9da2150f59e885d Alan Stern 2006-05-22 2131 * fail or if the transfer failure rate is > 10%.
9da2150f59e885d Alan Stern 2006-05-22 2132 */
9da2150f59e885d Alan Stern 2006-05-22 2133 if (status != 0)
9da2150f59e885d Alan Stern 2006-05-22 2134 ;
9da2150f59e885d Alan Stern 2006-05-22 2135 else if (context.submit_error)
9da2150f59e885d Alan Stern 2006-05-22 2136 status = -EACCES;
145f48c518edb94 Peter Chen 2015-10-13 2137 else if (context.errors >
145f48c518edb94 Peter Chen 2015-10-13 2138 (context.is_iso ? context.packet_count / 10 : 0))
9da2150f59e885d Alan Stern 2006-05-22 2139 status = -EIO;
9da2150f59e885d Alan Stern 2006-05-22 2140 return status;
^1da177e4c3f415 Linus Torvalds 2005-04-16 2141
^1da177e4c3f415 Linus Torvalds 2005-04-16 2142 fail:
^1da177e4c3f415 Linus Torvalds 2005-04-16 2143 for (i = 0; i < param->sglen; i++) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 2144 if (urbs[i])
^1da177e4c3f415 Linus Torvalds 2005-04-16 2145 simple_free_urb(urbs[i]);
^1da177e4c3f415 Linus Torvalds 2005-04-16 2146 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2147 return status;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @2148 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 2149
:::::: The code at line 2148 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip