* re: V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices
@ 2012-10-10 7:16 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-10-10 7:16 UTC (permalink / raw)
To: liplianin; +Cc: linux-media
Hello Igor M. Liplianin,
The patch 141cc35e2d29: "V4L/DVB (13678): Add support for yet another
DvbWorld, TeVii and Prof USB devices" from Nov 27, 2009, leads to the
following Sparse warning:
drivers/media/usb/dvb-usb/dw2102.c:288:36: error: bad constant
expression
CHECK drivers/media/usb/dvb-usb/dw2102.c
drivers/media/usb/dvb-usb/dw2102.c:288:36: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:305:44: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:315:44: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:381:53: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:410:52: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:443:36: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:461:44: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:543:47: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:570:52: error: bad constant expression
drivers/media/usb/dvb-usb/dw2102.c:582:52: error: bad constant expression
CC [M] drivers/media/usb/dvb-usb/dw2102.o
284 switch (num) {
285 case 2: {
286 /* read */
287 /* first write first register number */
288 u8 ibuf[msg[1].len + 2], obuf[3];
^^^^^^^^^^^^^^
The kernel has an 8k stack so the worry is that len could larger than
that.
289 obuf[0] = msg[0].addr << 1;
290 obuf[1] = msg[0].len;
291 obuf[2] = msg[0].buf[0];
292 dw210x_op_rw(d->udev, 0xc2, 0, 0,
293 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
294 /* second read registers */
295 dw210x_op_rw(d->udev, 0xc3, 0xd1 , 0,
296 ibuf, msg[1].len + 2, DW210X_READ_MSG);
297 memcpy(msg[1].buf, ibuf + 2, msg[1].len);
298
299 break;
300 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-10 7:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 7:16 V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox