id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f12b44ff2d5ba8eb41210438589a64490ddfedec
Analyze and fix the following issue in the Linux kernel code: [media] gspca - nw80x: Fix the gain, exposure and autogain
Problem Details: The autogain now uses common functions. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index f4c6f407f56e..d2d356e87539 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c @@ -38,6 +38,8 @@ enum e_ctrl { NCTRLS /* number of controls */ }; +#define AUTOGAIN_DEF 1 + /* specif...
bf512b2d9c39af31507f485b15b9b40e2a5c499c
Analyze and fix the following issue in the Linux kernel code: [media] stv0367: signedness bug in stv0367_get_tuner_freq()
Problem Details: We use err to store negative error codes so it should be signed. And if we return an error from stv0367_get_tuner_freq() that needs to be handled properly as well. (param->frequency is a u32). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index 120fed8229a8..0ddcf7e76704 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c @@ -913,7 +913,7 @@ static u32 stv0367_get_tuner_freq(struct dvb_frontend *fe) struct dvb_f...
c6384c886dfed806f07ae2f8ba4d3740b57cde9c
Analyze and fix the following issue in the Linux kernel code: [media] via-camera: Fix OLPC serial check
Problem Details: The code that checks the OLPC serial port is never built at the moment, because CONFIG_OLPC_XO_1_5 doesn't exist and probably won't be added. Fix it so that it gets compiled in, only executes on OLPC laptops, and move the check into the probe routine. The compiler is smart enough to eliminate this co...
```diff diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 3f0146fcf752..8c780c2d937b 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c @@ -25,6 +25,7 @@ #include <linux/via-core.h> #include <linux/via-gpio.h> #include <linux/via_i2c.h> +#include...
a3b55791b5b2b4b6d31ece9b3975466ec2f07b1b
Analyze and fix the following issue in the Linux kernel code: ASoC: tlv320dac33: Fix inconsistent spinlock usage
Problem Details: The lock is used within the interrupt handler. Correct the spinlock usage, and use irqsave/irqrestore flavour of spin_lock/unlock. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 71d7be8ac488..93f38b1d6246 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -670,6 +670,7 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33) { struct snd_soc_codec *c...
1106b6997df7d0c0487e21fd9c9dd2ce3d4a52db
Analyze and fix the following issue in the Linux kernel code: tracing: Fix set_ftrace_filter probe function display
Problem Details: If one or more function probes (like traceon) are enabled, and there's no other function filter, the first probe func is skipped (which one depends on the position in the hash). $ echo sys_open:traceon sys_close:traceon > ./set_ftrace_filter $ cat set_ftrace_filter #### all functions enabled #### sys_...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 888b611897d3..c075f4ea6b94 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1467,7 +1467,7 @@ t_next(struct seq_file *m, void *v, loff_t *pos) return t_hash_next(m, pos); (*pos)++; - iter->pos = *pos; + iter->pos = iter->f...
ee3c35c0827de02de414d08b2ddcbb910c2263ab
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
Problem Details: Since VT1708 didn't support the control of getting connection number, building of headphone control will fail in via_hp_build() function. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 7e317f933a06..1371b57c11e8 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1266,9 +1266,12 @@ static int via_hp_build(struct hda_codec *codec) break; } - nums = snd_hda_get_connections(codec, nid, conn, HD...
0341ccd7557fecafe6a79c55158670cf629d269e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
Problem Details: Add get_codec_type() in via_new_spec() function to make sure getting correct codec type before building mixer controls. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 299a18b735a3..269bb365752b 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -159,6 +159,7 @@ struct via_spec { #endif }; +static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec); static struct via_sp...
169222813eec8403c76394fb7b35ecab98e3c607
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix invalid A-A path volume adjust issue
Problem Details: Modify vt_auto_create_analog_input_ctls() function to fix invalid a-a path volume adjust issue for VT1708S, VT1702 and VT1716S codecs. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 23e58f090469..299a18b735a3 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -2456,7 +2456,14 @@ static int vt_auto_create_analog_input_ctls(struct hda_codec *codec, else type_idx = 0; label = hda_get_auto...
ce0e5a9e81fbb153ee15ca60246c6722f07fc546
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix independent headphone no sound issue
Problem Details: Modify via_independent_hp_put() function to support VT1718S and VT1812 codecs, and fix independent headphone no sound issue. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 5bc9bd983e86..2f605e593957 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1191,8 +1191,16 @@ static int via_independent_hp_put(struct snd_kcontrol *kcontrol, /* Get Independent Mode index of headphone pin widg...
bff5fbf50bd498c217994bd2d41a53ac3141185a
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - VIA: Fix stereo mixer recording no sound issue
Problem Details: Modify function via_mux_enum_put() to fix stereo mixer recording no sound issue. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 63b0054200a8..5bc9bd983e86 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -1101,6 +1101,7 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol, struct hda_codec *codec = snd_kcontrol_chip(kcontrol); s...
7e270941c8f0a11224e383d3d38946451f66fbbf
Analyze and fix the following issue in the Linux kernel code: [media] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attach
Problem Details: On Thu, 17 Feb 2011, Matthias Schwarzott wrote: > On Sunday 06 February 2011, Jesper Juhl wrote: > > If the memory allocation to 'state' succeeds but we jump to the 'error' > > label before 'state' is assigned to fe->tuner_priv, then the call to > > 'zl10036_release(fe)' at the 'error:' label will not...
```diff diff --git a/drivers/media/dvb/frontends/zl10036.c b/drivers/media/dvb/frontends/zl10036.c index 4627f491656b..81aa984c551f 100644 --- a/drivers/media/dvb/frontends/zl10036.c +++ b/drivers/media/dvb/frontends/zl10036.c @@ -463,16 +463,16 @@ struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, c...
35d9f510b67b10338161aba6229d4f55b4000f5b
Analyze and fix the following issue in the Linux kernel code: [media] V4L: videobuf, don't use dma addr as physical
Problem Details: mem->dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU, as a hardware IOMMU can (and most likely) will return a bus address where physical != bus address. So ensure we are remapping (remap_pfn_range) the right page in __videobuf_mmap_ma...
```diff diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index c9691115f2d2..c4742fc15529 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -300,7 +300,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *...
4093a5c4a3f59cba1a085bbf87b6ffdddc5a443d
Analyze and fix the following issue in the Linux kernel code: [media] uvcvideo: Fix descriptor parsing for video output devices
Problem Details: Commit 4057ac6ca9a77c4275b34b5925ab5c99557913b1 V4L/DVB (13505): uvcvideo: Refactor chain scan broke output terminals parsing. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index a1e9dfb52f69..6459b8cba223 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -1264,6 +1264,14 @@ static int uvc_scan_chain_entity(struct uvc_video_chain *chain, break...
38a66824d96de8aeeb915e6f46f0d3fe55828eb1
Analyze and fix the following issue in the Linux kernel code: [media] uvcvideo: Fix uvc_fixup_video_ctrl() format search
Problem Details: The scheme used to index format in uvc_fixup_video_ctrl() is not robust: format index is based on descriptor ordering, which does not necessarily match bFormatIndex ordering. Searching for first matching format will prevent uvc_fixup_video_ctrl() from using the wrong format/frame to make adjustments. ...
```diff diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 5673d673504b..545c0294813d 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -89,15 +89,19 @@ int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit, static void uv...
3d366e28605ebda17d4adf44d524559995157e90
Analyze and fix the following issue in the Linux kernel code: HID: Fix typo Keyoutch -> Keytouch
Problem Details: Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 111da3c6965b..9de9e97149ec 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -185,7 +185,7 @@ config HID_EZKEY Support for Ezkey BTC 8193 keyboard. config HID_KEYTOUCH - tristate "Keyoutch HID devices" + tristate "Keytouch HID devices...
32b98bf8752c5483481f77d48934aba26c967fcd
Analyze and fix the following issue in the Linux kernel code: fbcon: fix situation where fbcon gets deinitialised and can't reinit.
Problem Details: Situation as follow: 2 GPUs + vesafb + kms. GPU 1 is primary, vesafb binds to it as fb0 radeon loads GPU 0 loads as fb1 GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind console, which causes the dummy console to rebind. this means fbcon_deinit gets called, which calls fbcon_exit since t...
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 9c092b8d64e6..c58393402da2 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user) if (oldidx == newidx) return 0; - if (...
2d230e2b2c3111cf4a11619f60dcd158ae84e3ab
Analyze and fix the following issue in the Linux kernel code: ipv4: remove the routes on secondary promotion
Problem Details: The secondary address promotion relies on fib_sync_down_addr to remove all routes created for the secondary addresses when the old primary address is deleted. It does not happen for cases when the primary address is also in another subnet. Fix that by deleting local and broadcast routes for all seconda...
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 6d85800daeb7..2523001f4c9a 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -345,6 +345,17 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, } } + /* On promotion all secondaries from subnet are changing ...
e6abbaa2725a43cf5d26c4c2a5dc6c0f6029ea19
Analyze and fix the following issue in the Linux kernel code: ipv4: fix route deletion for IPs on many subnets
Problem Details: Alex Sidorenko reported for problems with local routes left after IP addresses are deleted. It happens when same IPs are used in more than one subnet for the device. Fix fib_del_ifaddr to restrict the checks for duplicate local and broadcast addresses only to the IFAs that use our primary IFA or anot...
```diff diff --git a/include/net/route.h b/include/net/route.h index 30d6cae3841a..dc102445ec47 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -207,6 +207,7 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); struct in_ifaddr; extern void fib_add_ifaddr(struct in_ifaddr *); ...
3c0f3c605b2572c740f66ea39fe2d125399b20aa
Analyze and fix the following issue in the Linux kernel code: NET: smsc95xx: don't use stack for async writes to the device
Problem Details: The set_multicast operation performs asynchronous writes to the device, with some addresses pointing to the stack. Bad things may happen, and this is trapped CONFIG_DMA_API_DEBUG: [ 5.237762] WARNING: at /build/buildd/linux-linaro-omap-2.6.38/lib/dma-debug.c:867 check_for_stack+0xd4/0x100() [ 5....
```diff diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index bc86f4b6ecc2..727874d9deb6 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -49,6 +49,8 @@ struct smsc95xx_priv { u32 mac_cr; + u32 hash_hi; + u32 hash_lo; spinlock_t mac_cr_lock; bool use_tx_csum; b...
5db2c3ba4de8489a7a064bac463bb8af2c7a1ae4
Analyze and fix the following issue in the Linux kernel code: [media] vb2: Handle return value from start_streaming callback
Problem Details: Fix vb2 not handling return value from start_streaming() callback. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 8c6f04bc4d89..6698c77e0f64 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -1111,6 +1111,7 @@ EXPORT_SYMBOL_GPL(vb2_dqbuf); int vb2_streamon(struct vb2_queue *q, enum v...
4ffabdb35ad59fdb8cb6ad3ff4733694ff0dfc35
Analyze and fix the following issue in the Linux kernel code: [media] vb2: vb2_poll() fix return values for file I/O mode
Problem Details: poll() should be returning poll-specific error values, not E* errors. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index ce032255f3ee..8c6f04bc4d89 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -1364,18 +1364,18 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table ...
6ed9d56086acb3bb4ec003ff6d2f54313774d72b
Analyze and fix the following issue in the Linux kernel code: [media] af9013: reimplement firmware download
Problem Details: Split FW download packages smarter way and bug free. Implementation is based of Andrea Merello's example he provided for tda18218 driver. Count remaining FW bytes down in loop instead of division and modulo combination used earlier. Thanks to: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: ...
```diff diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c index 6f50f0673994..345311c33383 100644 --- a/drivers/media/dvb/frontends/af9013.c +++ b/drivers/media/dvb/frontends/af9013.c @@ -1323,13 +1323,11 @@ static struct dvb_frontend_ops af9013_ops; static int af9013_download_...
582e565caeaccf145e2256b84d4fde827fede72e
Analyze and fix the following issue in the Linux kernel code: [media] af9015: reimplement firmware download
Problem Details: Split FW download packages smarter way and bug free. Implementation is based of Andrea Merello's example he provided for tda18218 driver. Count remaining FW bytes down in loop instead of division and modulo combination used earlier. Thanks-to: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: A...
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 0bbc91f50381..100ebc37e99e 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -665,9 +665,8 @@ error: static int af9015_download_firmware(struct usb_device *udev, const struct f...
c1e13971b19324305b35fafc080b527465214d3c
Analyze and fix the following issue in the Linux kernel code: [media] af9015: enhance RC
Problem Details: Patch from Ian Armstrong. I've encountered a couple of problems with the current af9015 driver as supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've generated this patch against the current v4l-dvb git). Some key-presses are lost. A key-press is only generated upon 'valid'...
```diff diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 8671ca362c81..6457d042b1a0 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -479,6 +479,9 @@ static int af9015_init_endpoint(struct dvb_usb_device *d) ret = af9015_set_reg_bit...
7d47b789ceb456d90a3ace522dbcb2a94d2693ca
Analyze and fix the following issue in the Linux kernel code: [media] gspca - jeilinj / stv06xx: Fix some warnings
Problem Details: Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index 06b777f5379e..36dae38b1e38 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c @@ -183,7 +183,6 @@ static void jlj_dostream(struct work_struct *work) struct sd *dev = container_o...
34fd68bc03c8d656f991bd4f1646ec773179521b
Analyze and fix the following issue in the Linux kernel code: [media] Fix 'ID nv12mt already defined' error
Problem Details: DocBook validation fix. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/v4l/pixfmt-nv12mt.xml b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml index 5cb5bec8b653..7a2855a526c1 100644 --- a/Documentation/DocBook/v4l/pixfmt-nv12mt.xml +++ b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml @@ -49,7 +49,7 @@ interleaved. Height of the buffer is aligned to 32....
665bf368fdc1e7afc9616eda128fe83d6053d5bc
Analyze and fix the following issue in the Linux kernel code: [media] V4L doc fixes
Problem Details: The xmlto validation produced a number of errors that are now fixed. Sadly, the DocBook/Makefile still adds --skip-validation to xmlto, so these errors are missed during a normal compile. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/v4l/dev-subdev.xml b/Documentation/DocBook/v4l/dev-subdev.xml index e9eb8af0f303..21caff6d159b 100644 --- a/Documentation/DocBook/v4l/dev-subdev.xml +++ b/Documentation/DocBook/v4l/dev-subdev.xml @@ -23,9 +23,9 @@ driver and the V4L2 device driver support this, sub-devices ...
941f896071c5c9120c8473c77246beaf36155247
Analyze and fix the following issue in the Linux kernel code: [media] v4l2: vb2-dma-sg: fix potential security hole
Problem Details: Memory allocated by alloc_page() function might contain some potentially important data from other system processes. The patch adds a flag to zero the allocated page before giving it to videobuf2 (and then to userspace). Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyung...
```diff diff --git a/drivers/media/video/videobuf2-dma-sg.c b/drivers/media/video/videobuf2-dma-sg.c index d5311ff3fab0..b2d9485aac75 100644 --- a/drivers/media/video/videobuf2-dma-sg.c +++ b/drivers/media/video/videobuf2-dma-sg.c @@ -62,7 +62,7 @@ static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size) g...
31901a078af29c33c736dcbf815656920e904632
Analyze and fix the following issue in the Linux kernel code: [media] v4l2: vb2: one more fix for REQBUFS()
Problem Details: Return immediately if the target number of buffers is the same as the current one and memory access type doesn't change. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index c5f99c7d3979..2baf7dbdc01d 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -488,6 +488,13 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) ret...
a9bb36aa0d6547aa0ab3d5cfde08e8651bd460bc
Analyze and fix the following issue in the Linux kernel code: [media] v4l2: vb2-dma-sg: fix memory leak
Problem Details: This patch fixes two minor memory leaks in videobuf2-dma-sg module. They might happen only in case some other operations (like memory allocation) failed. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowsk...
```diff diff --git a/drivers/media/video/videobuf2-dma-sg.c b/drivers/media/video/videobuf2-dma-sg.c index 20b5c5dcc0ef..d5311ff3fab0 100644 --- a/drivers/media/video/videobuf2-dma-sg.c +++ b/drivers/media/video/videobuf2-dma-sg.c @@ -88,6 +88,7 @@ static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size) fai...
29e3fbd8edb31549fa8302c185bd0b915a43d8b8
Analyze and fix the following issue in the Linux kernel code: [media] v4l2: vb2: fix queue reallocation and REQBUFS(0) case
Problem Details: This patch fixes 2 minor bugs in videobuf2 core: 1. Queue should be reallocated if one change the memory access method without changing the number of buffers. 2. In case of REQBUFS(0), the request should not be passed to the driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off...
```diff diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index cc7ab0a17b68..c5f99c7d3979 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -488,7 +488,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) retu...
91707b8b27a785c42949ba55b65f084027962afa
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: Fix G_FMT ioctl handler
Problem Details: Use pix_mp member of struct v4l2_format to return a format description rather than pix. Also fill in the plane_fmt array. This is a missing bit of conversion to the multiplanar API. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Sign...
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index b29937eba602..6c919b38a3d8 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video/s5p-fimc/fimc-core.c @@ -804,15 +804,33 @@ int fimc_vidioc_g_fmt_mplane(struct file *file, void *priv,...
1e00469599b5841f5b02c436b9958073a0ad576c
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: Use dynamic debug
Problem Details: Use pr_debug instead of printk so it is possible to control debug traces at runtime. E.g. to enable debug trace in file fimc-core.c use command: echo -n 'file fimc-core.c +p' > /sys/kernel/debug/dynamic_debug/control or echo -n 'file fimc-core.c -p' > /sys/kernel/debug/dynamic_debug/control to disable....
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h index 41b135249d1f..3beb1e5320ce 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.h +++ b/drivers/media/video/s5p-fimc/fimc-core.h @@ -29,12 +29,8 @@ #define err(fmt, args...) \ printk(KERN_ERR "%s:%d: " fmt "...
4ecbf5d1d2bb7d1e3882de79e512c1a0a2816581
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: Prevent hanging on device close and fix the locking
Problem Details: Rework the locking in m2m driver to assure proper operation on SMP systems. When job_abort or stop_streaming was called to immediately shutdown a memory-to-memory transaction video buffers scheduled for processing were never returned to vb2 and v4l2_m2m_job_finish was not called which led to hanging. ...
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 423931c0cfe5..8312ce465f16 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -252,14 +252,9 @@ static int stop_streaming(struct vb2_queue *q) ...
8ec737ffccd7fab629e28427b4d0581ce62ffedd
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: fix ISR and buffer handling for fimc-capture
Problem Details: In some cases fimc H/W did not stop although there were no output buffers available. So the capture deactivation interrupt routine is modified and the state of ST_CAPT_RUN is cleared only in the LAST-IRQ call. After LAST-IRQ is generated, H/W pointer will be skipped by 1 frame. (reference by user manu...
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 5159cc8a0e1c..6b6f72e4066c 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -153,40 +153,6 @@ static int fimc_isp_subdev_init(struct fimc_dev ...
8af81ddb12cf34e2f6eab7e130f1e55e1911ab8f
Analyze and fix the following issue in the Linux kernel code: [media] Fix CI code for NetUP Dual DVB-T/C CI RF card
Problem Details: CI reset takes several seconds on some CAM, so there is no need to lock mutex all that time. Also we need not to preserve CI's reset bits in CIBUSCTRL register, they are handled automatically by FPGA. Set it to 0 explicitly in order to not reset wrong CAM. Signed-off-by: Abylay Ospan <aospan@netup.ru>...
```diff diff --git a/drivers/media/video/cx23885/altera-ci.c b/drivers/media/video/cx23885/altera-ci.c index 4269e053830c..678539b2acfa 100644 --- a/drivers/media/video/cx23885/altera-ci.c +++ b/drivers/media/video/cx23885/altera-ci.c @@ -283,7 +283,7 @@ int altera_ci_op_cam(struct dvb_ca_en50221 *en50221, int slot, ...
1039752353f1308bcd594a79196f60a22d45975d
Analyze and fix the following issue in the Linux kernel code: [media] cpia2: Fix some gcc 4.6 warnings when debug is disabled
Problem Details: cpia2_core.c:529:14: warning: variable 'dir' set but not used [-Wunused-but-set-variable] cpia2_core.c:526:5: warning: variable 'block_index' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cpia2/cpia2_core.c b/drivers/media/video/cpia2/cpia2_core.c index aaffca8e13fd..ee91e295c90a 100644 --- a/drivers/media/video/cpia2/cpia2_core.c +++ b/drivers/media/video/cpia2/cpia2_core.c @@ -519,22 +519,16 @@ int cpia2_do_command(struct camera_data *cam, * cpia2_send_comma...
972d724caf8b6c461b585c800d6460a12c098a5e
Analyze and fix the following issue in the Linux kernel code: [media] several drivers: Fix a few gcc 4.6 warnings
Problem Details: au0828-dvb.c:99:6: warning: variable 'ptr' set but not used [-Wunused-but-set-variable] au0828-video.c:1180:25: warning: variable 'maxheight' set but not used [-Wunused-but-set-variable] au0828-video.c:1180:15: warning: variable 'maxwidth' set but not used [-Wunused-but-set-variable] bttv-input.c:196:1...
```diff diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index f1edf1d4afe8..518216743c9c 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c @@ -96,7 +96,6 @@ static struct tda18271_config hauppauge_woodbury_tunerconfig = { /...
d6972cc8a35514a518ef9c9f608327851cd2e856
Analyze and fix the following issue in the Linux kernel code: [media] cx88-alsa: fix compiler warning
Problem Details: drivers/media/video/cx88/cx88-alsa.c: In function 'cx88_audio_initdev': drivers/media/video/cx88/cx88-alsa.c:881:20: warning: 'core' may be used uninitialized in this function The compiler doesn't understand that snd_cx88_create fills in the core pointer. So just initialize it to NULL. Signed-off-by:...
```diff diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index a2d688ebed90..423c1af8a782 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -878,7 +878,7 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci, { struct snd_...
cfa746b39c2db17f2fde301e347324ac89fc5ea9
Analyze and fix the following issue in the Linux kernel code: [media] fmdrv_common.c: fix compiler warning
Problem Details: drivers/media/radio/wl128x/fmdrv_common.c: In function 'recv_tasklet': drivers/media/radio/wl128x/fmdrv_common.c:274:4: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int' The result of sizeof() should be printed with %zu. Signed-off-by: Hans Verkuil <hverkuil@xs4all....
```diff diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 12f4c656e8e8..64454d39c0ca 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c @@ -271,8 +271,8 @@ static void recv_tasklet(unsigned long arg) /* Process ...
3920d6b34d7f6d4e81773b6bbd93d53c167b048f
Analyze and fix the following issue in the Linux kernel code: [media] altera-ci.c: fix compiler warnings
Problem Details: drivers/media/video/cx23885/altera-ci.c: In function 'altera_hw_filt_init': drivers/media/video/cx23885/altera-ci.c:671:2: warning: cast from pointer to integer of different size drivers/media/video/cx23885/altera-ci.c: In function 'altera_ci_init': drivers/media/video/cx23885/altera-ci.c:739:2: warnin...
```diff diff --git a/drivers/media/video/cx23885/altera-ci.c b/drivers/media/video/cx23885/altera-ci.c index ad6cc68d4b0c..4269e053830c 100644 --- a/drivers/media/video/cx23885/altera-ci.c +++ b/drivers/media/video/cx23885/altera-ci.c @@ -668,8 +668,8 @@ int altera_hw_filt_init(struct altera_ci_config *config, int hw_f...
fb661a78699ad34c385a014fe0d17226234f8496
Analyze and fix the following issue in the Linux kernel code: [media] stv0367.c: fix compiler warning
Problem Details: drivers/media/dvb/frontends/stv0367.c: In function 'stv0367ter_lock_algo': drivers/media/dvb/frontends/stv0367.c:1315:2: warning: cast from pointer to integer of different size Use %p to print addresses instead of 0x%x. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Ch...
```diff diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index eecdf23642eb..f910d0db8156 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c @@ -1312,7 +1312,7 @@ stv0367_ter_signal_type stv0367ter_lock_algo(struct stv0367_state *stat...
aa40d194975e23ba7a55936c7b5dae4e964461b5
Analyze and fix the following issue in the Linux kernel code: [media] tuner-xc2028.c: fix compile warning
Problem Details: drivers/media/common/tuners/tuner-xc2028.c: In function 'generic_set_freq': drivers/media/common/tuners/tuner-xc2028.c:936:15: warning: comparison between 'enum tuner_mode' and 'enum v4l2_tuner_type' Argument type was enum tuner_mode, but should have been enum v4l2_tuner_type. Signed-off-by: Hans Ver...
```diff diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index efcbc3ed0aea..16fba6b59616 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c @@ -907,7 +907,7 @@ ret: #define DIV 15625 static int generic_set_fre...
cfe2cde6d33f15994ad34466ac4a08f5bb348948
Analyze and fix the following issue in the Linux kernel code: [media] omap2: Fix camera resources for multiomap
Problem Details: Make sure the kernel can be compiled with both OMAP2 and OMAP3 camera support linked in, and give public symbols proper omap2/omap3 prefixes. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked...
```diff diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 6fd92eb97048..145c8f0f6597 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -38,7 +38,7 @@ #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) -static struct resource cam_reso...
cf4b9211b5680cd9ca004232e517fb7ec5bf5316
Analyze and fix the following issue in the Linux kernel code: [media] media: Media device node support
Problem Details: The media_devnode structure provides support for registering and unregistering character devices using a dynamic major number. Reference counting is handled internally, making device drivers easier to write without having to solve the open/disconnect race condition issue over and over again. The code ...
```diff diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 81b3ba83cc65..2466f2b2ecfa 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -13,6 +13,19 @@ if MEDIA_SUPPORT comment "Multimedia core support" +# +# Media controller +# + +config MEDIA_CONTROLLER + bool "Media Controller API ...
dfc906daeec03b3f2d306ae260d398d97ba232c5
Analyze and fix the following issue in the Linux kernel code: video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
Problem Details: The macros for getting the values for horizontal sync width and offset do not respect the EDID specification. Both these values are 10 bit values according to [1], not 6 bit values. The lower 8 bits are stored in byte 8 and byte 9 of the DTD respectively, while two additional bits for each value are st...
```diff diff --git a/drivers/video/edid.h b/drivers/video/edid.h index bd89fb3be8c2..d03a232d90b2 100644 --- a/drivers/video/edid.h +++ b/drivers/video/edid.h @@ -101,8 +101,8 @@ #define V_SYNC_WIDTH COMBINE_HI_4LO( V_SYNC_WIDTH_HI, V_SYNC_WIDTH_LO ) #define V_SYNC_OFFSET COMBINE_HI_4LO( V_SYNC_OFFSET_HI, ...
d6244bc0ed0c52a795e6f4dcab3886daf3e74fac
Analyze and fix the following issue in the Linux kernel code: fbcon: Bugfix soft cursor detection in Tile Blitting
Problem Details: Use mask 0x10 for "soft cursor" detection on in function tile_cursor. (Tile Blitting Operation in framebuffer console). The old mask 0x01 for vc_cursor_type detects CUR_NONE, CUR_LOWER_THIRD and every second mode value as "software cursor". This hides the cursor for these modes (cursor.mode = 0). But,...
```diff diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c index 0056a41e5c35..15e8e1a89c45 100644 --- a/drivers/video/console/tileblit.c +++ b/drivers/video/console/tileblit.c @@ -83,7 +83,7 @@ static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode, int softback_li...
6359691d7efc639bf0f996aa9a694b2653fc6ae6
Analyze and fix the following issue in the Linux kernel code: video: add missing framebuffer_release in error path
Problem Details: This patch fixes a memory leak in the error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index e2c85b0db632..f18895006627 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -565,6 +565,7 @@ out_dealloc_cmap: out_unmap_regs: cg14_unmap_regs(op, info, par); + framebuffer_release(info); out_err: return err; diff --git a/dr...
1e9bb8808ac11094d711d20d580e7b45a4992d0c
Analyze and fix the following issue in the Linux kernel code: block: fix non-atomic access to genhd inflight structures
Problem Details: After the stack plugging introduction, these are called lockless. Ensure that the counters are updated atomically. Signed-off-by: Shaohua Li<shaohua.li@intel.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 88820704a191..0cf68b478878 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -477,7 +477,8 @@ static void start_io_acct(struct dm_io *io) cpu = part_stat_lock(); part_round_stats(cpu, &dm_disk(md)->part0); part_stat_unlock(); - dm_disk(md)->part0.in...
83e61f71d72da7240378fe7ecba5e936a0f159db
Analyze and fix the following issue in the Linux kernel code: drivers:video:aty:radeon_base Fix typo occationally to occasionally
Problem Details: The below patch fixes a typo occationally to occasionally. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 66c9af1b3d96..41a5d48e657b 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -889,7 +889,7 @@ static void radeon_set_pll(struct drm_crtc *crtc,...
803a4e14a7dceaf01dbc0e02c0fdea2eba4c81b3
Analyze and fix the following issue in the Linux kernel code: uvesafb,vesafb: create WC or WB PAT-entries
Problem Details: with an PAT-enabled kernel, when using uvesafb or vesafb, these drivers will create uncached-minus PAT entries for the framebuffer memory because they use ioremap() (not the *_cache or *_wc variants). When the framebuffer memory intersects with the video RAM used by Xorg, the complete video RAM will be...
```diff diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 5180a215d781..7f8472cc993b 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -1552,8 +1552,7 @@ static void __devinit uvesafb_init_mtrr(struct fb_info *info) int rc; /* Find the largest power-of-two */ - while (...
7b0e278519eba8050f2b37d7c408958745f30ecd
Analyze and fix the following issue in the Linux kernel code: video: ffb: fix ffb_probe error path
Problem Details: Current implementation calls of_iounmap for par->fbc twice in error path. In the case of goto out_unmap_dac, we should call of_iounmap for par->dac. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 910c5e6f6702..14102a3f70f5 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c @@ -1010,7 +1010,7 @@ out_dealloc_cmap: fb_dealloc_cmap(&info->cmap); out_unmap_dac: - of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc)); + of_ioun...
49bb0943329929e73c9a22c97d53c6c8967eb243
Analyze and fix the following issue in the Linux kernel code: radeonfb: Let hwmon driver probe the "monid" I2C bus
Problem Details: Some Radeon cards have an I2C-based thermal sensor chip connected to the "monid" I2C bus. Set the I2C probing class of this bus properly so that hwmon drivers can detect devices on it and bind to them. This closes kernel.org bug #26172. We exclude PPC for the time being, as Benjamin doesn't want us t...
```diff diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c index 78d1f4cd1fe0..ab1d0fd76316 100644 --- a/drivers/video/aty/radeon_i2c.c +++ b/drivers/video/aty/radeon_i2c.c @@ -100,6 +100,9 @@ void radeon_create_i2c_busses(struct radeonfb_info *rinfo) { rinfo->i2c[0].rinfo = rinfo; rinfo-...
3827d10ed4278323b75bf25d09c146c050519254
Analyze and fix the following issue in the Linux kernel code: s3fb: fix 15/16bpp modes with over 115MHz pixclocks on 86C365 Trio3D
Problem Details: Enable pixel multiplexing in 15/16bpp modes when pixclock is over 115MHz on Trio3D (86C365) cards to fix artifacts on the left side of screen. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Ondrej Zajicek <santiago@crfreenet.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index be12145681f6..7b8fdc6d9d55 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c @@ -675,6 +675,15 @@ static int s3fb_set_par(struct fb_info *info) svga_wcrt_mask(par->state.vgabase, 0x67, 0x20, 0xF0); else svga_wcrt_mask(par->s...
736561a01f11114146b1b7f82d486fa9c95828ef
Analyze and fix the following issue in the Linux kernel code: IPVS: Use global mutex in ip_vs_app.c
Problem Details: As part of the work to make IPVS network namespace aware __ip_vs_app_mutex was replaced by a per-namespace lock, ipvs->app_mutex. ipvs->app_key is also supplied for debugging purposes. Unfortunately this implementation results in ipvs->app_key residing in non-static storage which at the very least cau...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 272f59336b73..30b49ed72f0d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -801,8 +801,6 @@ struct netns_ipvs { struct list_head rs_table[IP_VS_RTAB_SIZE]; /* ip_vs_app */ struct list_head app_list; - struct mutex app_mutex; - str...
f40f94fc6c3b5a5542d5ed976e9ff69a3b463802
Analyze and fix the following issue in the Linux kernel code: ipvs: fix a typo in __ip_vs_control_init()
Problem Details: Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Simon Horman <horms@verge.net.au> Cc: Julian Anastasov <ja@ssi.bg> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index b799cea31f95..33733c8872e7 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -3605,7 +3605,7 @@ int __net_init __ip_vs_control_init(struct net *net) /* procfs stats */ ipvs->tot_stats.cpust...
b64a44146540a4761bb1cf8047fffd9dbf0c3090
Analyze and fix the following issue in the Linux kernel code: PCIe, AER, use pre-generated prefix in error information printing
Problem Details: When printing PCIe AER error information, each line is prefixed with PCIe device and driver information. In original implementation, the prefix is generated when each line is printed. In fact, all lines share the same prefix. So this patch pre-generated the prefix, and use that one when each line is...
```diff diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 9d3e4c8d0184..7a237f67129e 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -57,86 +57,44 @@ (e & AER_DATA_LINK_LAYER_ERROR_MASK(t)) ? AER_DATA_LINK_LAYER_ERROR...
4596fe07679ff0fae904515691ea747467614871
Analyze and fix the following issue in the Linux kernel code: ext4: don't kfree uninitialized s_group_info members
Problem Details: We can call kfree on uninitialized members of the s_group_info array on an the error path. We can avoid this by kzalloc'ing the array. This doesn't entirely solve the oops on mount if we fail down this path; failed_mount4: frees the sbi, for one, which gets referenced later in the failed mount paths ...
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 2f6f0dd08fca..cdc84953f1d4 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2386,7 +2386,7 @@ static int ext4_mb_init_backend(struct super_block *sb) /* An 8TB filesystem with 64-bit pointers requires a 4096 byte * kmalloc. A 128kb malloc s...
675071a2ef3f4a6d25ee002a7437d50431168344
Analyze and fix the following issue in the Linux kernel code: veth: Fix the byte counters
Problem Details: Commit 44540960 "veth: move loopback logic to common location" introduced a bug in the packet counters. I don't understand why that happened as it is not explained in the comments and the mut check in dev_forward_skb retains the assumption that skb->len is the total length of the packet. I just measu...
```diff diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 105d7f0630cc..2de9b90c5f8f 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -171,7 +171,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) if (skb->ip_summed == CHECKSUM_NONE) skb->ip_summed = rcv_priv->ip_sum...
9d2a8fa96a44ba242de3a6f56acaef7a40a97b97
Analyze and fix the following issue in the Linux kernel code: net ipv6: Fix duplicate /proc/sys/net/ipv6/neigh directory entries.
Problem Details: When I was fixing issues with unregisgtering tables under /proc/sys/net/ipv6/neigh by adding a mount point it appears I missed a critical ordering issue, in the ipv6 initialization. I had not realized that ipv6_sysctl_register is called at the very end of the ipv6 initialization and in particular afte...
```diff diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 7cb65ef79f9c..6dcf5e7d661b 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -17,6 +17,16 @@ static struct ctl_table empty[1]; +static ctl_table ipv6_static_skeleton[] = { + { + .procname = "neigh", + .ma...
d5cd92448fded12c91f7574e49747c5f7d975a8d
Analyze and fix the following issue in the Linux kernel code: macvlan: Fix use after free of struct macvlan_port.
Problem Details: When the macvlan driver was extended to call unregisgter_netdevice_queue in 23289a37e2b127dfc4de1313fba15bb4c9f0cd5b, a use after free of struct macvlan_port was introduced. The code in dellink relied on unregister_netdevice actually unregistering the net device so it would be safe to free macvlan_por...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 5b37d3c191e4..78e34e9e4f00 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -39,8 +39,11 @@ struct macvlan_port { struct list_head vlans; struct rcu_head rcu; bool passthru; + int count; }; +static void macvlan_port...
ac0a121d7906b049dfee3649f886c969fbb3c1b7
Analyze and fix the following issue in the Linux kernel code: net: fix incorrect spelling in drop monitor protocol
Problem Details: It was pointed out to me recently that my spelling could be better :) Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 36e603c78ce9..706502ff64aa 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -350,7 +350,7 @@ static int __init init_net_drop_monitor(void) struct per_cpu_dm_data *data; int cpu, rc; - printk(KERN_INFO "Initalizing ne...
4f2d56c45fec7c15169599cab05e9f6df18769d0
Analyze and fix the following issue in the Linux kernel code: can: c_can: Do basic c_can configuration _before_ enabling the interrupts
Problem Details: I ran into some trouble while testing the SocketCAN driver for the BOSCH C_CAN controller. The interface is not correctly initialized, if I put some CAN traffic on the line, _while_ the interface is being started (which means: the interface doesn't come up correcty, if there's some RX traffic while doi...
```diff diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 14050786218a..110eda01843c 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -633,9 +633,6 @@ static void c_can_start(struct net_device *dev) { struct c_can_priv *priv = netdev_priv(dev); - /* e...
b20e7bbfc7a15a4182730f0936433145992b4b06
Analyze and fix the following issue in the Linux kernel code: net/appletalk: fix atalk_release use after free
Problem Details: The BKL removal in appletalk introduced a use-after-free problem, where atalk_destroy_socket frees a sock, but we still release the socket lock on it. An easy fix is to take an extra reference on the sock and sock_put it when returning from atalk_release. Signed-off-by: Arnd Bergmann <arnd@arndb.de> ...
```diff diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 3d4f4b043406..206e771e82d1 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -1051,6 +1051,7 @@ static int atalk_release(struct socket *sock) { struct sock *sk = sock->sk; + sock_hold(sk); lock_sock(sk); if (sk) { sock_orphan(s...
674f2115995b7b588cbf3540c9f9b2448a8c7ea8
Analyze and fix the following issue in the Linux kernel code: ipx: fix ipx_release()
Problem Details: Commit b0d0d915d1d1a0 (remove the BKL) added a regression, because sock_put() can free memory while we are going to use it later. Fix is to delay sock_put() _after_ release_sock(). Reported-by: Ingo Molnar <mingo@elte.hu> Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Eric Dumazet <eric.dumaze...
```diff diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 2731b51923d1..9680226640ef 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c @@ -148,7 +148,6 @@ static void ipx_destroy_socket(struct sock *sk) ipx_remove_socket(sk); skb_queue_purge(&sk->sk_receive_queue); sk_refcnt_debug_dec(sk); - sock_put(sk);...
8aa525a9340da4227797a06221ca08399006635f
Analyze and fix the following issue in the Linux kernel code: l2tp: fix possible oops on l2tp_eth module unload
Problem Details: A struct used in the l2tp_eth driver for registering network namespace ops was incorrectly marked as __net_initdata, leading to oops when module unloaded. BUG: unable to handle kernel paging request at ffffffffa00ec098 IP: [<ffffffff8123dbd8>] ops_exit_list+0x7/0x4b PGD 142d067 PUD 1431063 PMD 195da80...
```diff diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c index 8d9ce0accc98..a8193f52c13c 100644 --- a/net/l2tp/l2tp_eth.c +++ b/net/l2tp/l2tp_eth.c @@ -283,7 +283,7 @@ static __net_init int l2tp_eth_init_net(struct net *net) return 0; } -static __net_initdata struct pernet_operations l2tp_eth_net_ops = { +s...
b8413f98f997bb3ed7327e6d7117e7e91ce010c3
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a hang/infinite loop in nfs_wb_page()
Problem Details: When one of the two waits in nfs_commit_inode() is interrupted, it returns a non-negative value, which causes nfs_wb_page() to think that the operation was successful causing it to busy-loop rather than exiting. It also causes nfs_file_fsync() to incorrectly report the file as being successfully commit...
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 4d686ee53244..55a8c3671233 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1261,13 +1261,17 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) static int nfs_commit_set_lock...
a454f0ccefbfdbfc0e1aa8a5f8010af5e48b8845
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix initialize repl field of struct xfrm_state
Problem Details: Commit 'xfrm: Move IPsec replay detection functions to a separate file' (9fdc4883d92d20842c5acea77a4a21bb1574b495) introduce repl field to struct xfrm_state, and only initialize it under SA's netlink create path, the other path, such as pf_key, ipcomp/ipcomp6 etc, the repl field remaining uninitializ...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 42a8c32a10e2..cffa5dc66449 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1430,6 +1430,7 @@ extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq); exte...
9f00edaef8a8741a2d5333676fe9aa23a2a3d2be
Analyze and fix the following issue in the Linux kernel code: [media] v4l: videobuf2: Typo fix
Problem Details: vb2_get_plane_payload() gets the bytesused field for a plane, it doesn't set it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 0d71fc5efc46..597efe61a345 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -351,7 +351,7 @@ static inline void vb2_set_plane_payload(struct vb2_buffer *vb, } /** - * vb2_get_plane_payload()...
738e8ff90fae01dccc9e7f92e0cfa4819567dbb8
Analyze and fix the following issue in the Linux kernel code: [media] ds3000: wrong hardware tune function implemented
Problem Details: It is taken from another tree, where it is modified. Patch to fix that Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 7f3d118287c4..90bf573308b0 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c @@ -1220,9 +1220,20 @@ static int ds3000_set_frontend(struct dvb_frontend *fe, } static int d...
b00aff6a36aeafc68cf9044751041ba432ab4495
Analyze and fix the following issue in the Linux kernel code: [media] dib9000: fix return type in dib9000_mbx_send_attr()
Problem Details: dib9000_mbx_send_attr() returns an int. It doesn't work to save negative error codes in an unsigned char, so I've made "ret" an int type. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c index 43fb6e45424a..91518761a2da 100644 --- a/drivers/media/dvb/frontends/dib9000.c +++ b/drivers/media/dvb/frontends/dib9000.c @@ -486,10 +486,11 @@ static int dib9000_mbx_host_init(struct dib9000_state *state, u8 risc_i...
ed54c0e33c6ac72c681f00a41b47840f6570262c
Analyze and fix the following issue in the Linux kernel code: [media] dib8000: fix small memory leak on error
Problem Details: kfree(state) if fe allocation fails. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 3e20aa8db23b..c1c3e26906e2 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c @@ -2514,7 +2514,7 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2...
1b149bbe9156d2eb2afd5a072bd61ad0d4bfaca7
Analyze and fix the following issue in the Linux kernel code: [media] media/radio/wl1273: fix build errors
Problem Details: RADIO_WL1273 needs to make sure that the mfd core is built to avoid build errors: ERROR: "mfd_add_devices" [drivers/mfd/wl1273-core.ko] undefined! ERROR: "mfd_remove_devices" [drivers/mfd/wl1273-core.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Matti Aaltonen <matti.j.aalt...
```diff diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index f75cdad2df59..299994c3aa74 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -441,6 +441,7 @@ config RADIO_TIMBERDALE config RADIO_WL1273 tristate "Texas Instruments WL1273 I2C FM Radio" depends on I2C ...
0522921c0f89f274a99d5084ca0a6fd370749cc8
Analyze and fix the following issue in the Linux kernel code: [media] via-camera: Add suspend/resume support
Problem Details: Add suspend/resume support to the via-camera driver, so that the video continues streaming over a suspend-resume cycle. Originally implemented by Jon Corbet. [mchehab@redhat.com: fix a small CodingStyle issue] Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Sig...
```diff diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 2f973cd56408..3f0146fcf752 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c @@ -1246,6 +1246,62 @@ static const struct v4l2_ioctl_ops viacam_ioctl_ops = { /* * Power management. */ +#i...
07988007f8dd2827ba1eb39e6e3c5bbb29cfc30b
Analyze and fix the following issue in the Linux kernel code: [media] stv090x: handle allocation failures
Problem Details: kmalloc() can fail so check whether state->internal is NULL. append_internal() can return NULL on allocation failures so check that. Also if we hit the error condition later in the function then there is a memory leak and we need to call remove_dev() to fix it. Also Oliver Endriss pointed out an addit...
```diff diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index d3362d0407eb..41d0f0a6655d 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c @@ -4783,7 +4783,13 @@ struct dvb_frontend *stv090x_attach(const struct stv090x_config *confi...
0d44b1235c60bf3134f5730ebb4a115f857a2da4
Analyze and fix the following issue in the Linux kernel code: [media] ivtv: Fix sparse warning regarding a user pointer in ivtv_write_vbi_from_user()
Problem Details: Fix the first, botched attempt at preventing direct use of a user pointer in ivtv_write_vbi(). Reported-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index 2dfa957b0fd5..b6eb51ce7735 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/drivers/media/video/ivtv/ivtv-vbi.c @@ -174,7 +174,7 @@ ivtv_write_vbi_from_user(struct ivtv *itv, ret = -EFAULT; break; } - ...
18a73f36a2109563beee00f8be3f19f6c1fe2ff6
Analyze and fix the following issue in the Linux kernel code: [media] ds3000: clean up in tune procedure
Problem Details: Variable 'retune' does not make sense. Loop is not needed for only one try. Remove unnecessary dprintk's. Remove a lot of debug messages and delays. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 3373890c092e..882be672f5d2 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c @@ -536,25 +536,6 @@ static int ds3000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt...
5a530cbecaa5a21d185e0549ea9a866483661f6f
Analyze and fix the following issue in the Linux kernel code: [media] dw2102: fix TeVii s660 remote control
Problem Details: Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index 0ab377e3d6f2..893149170faa 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -495,10 +495,10 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], for ...
d3210b5f9618fc3d231caf39ffd32fda490e3ea5
Analyze and fix the following issue in the Linux kernel code: [media] dw2102: Prof 1100 initialization fix
Problem Details: RC keys structure for Prof 1100 already defined, so remove extra initialization. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index ea9a01c24fc7..445819965e66 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -1464,11 +1464,6 @@ static int dw2102_load_firmware(struct usb_device *dev, } /* init registers ...
4e59df8f25950520cd6a8b16a39d48b5fa5aeeda
Analyze and fix the following issue in the Linux kernel code: [media] dw2102: Prof 7500 remote fix
Problem Details: Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index 4ae4fb02164d..ea9a01c24fc7 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -1118,12 +1118,17 @@ static int ds3000_frontend_attach(struct dvb_usb_adapter *d) static int prof_7...
35fa5d4c48fbb02d637c3659f00331aa33f0f029
Analyze and fix the following issue in the Linux kernel code: [media] pvrusb2: Fix a few missing default control values, for cropping
Problem Details: Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index f83e5cf3967f..5e6437dd91df 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -1114,6 +1114,7 @@ static const struct pvr2_ctl_info control_defs[] = { ...
8aff8ba95155dff265de5ea6f5d5d92caa7bc728
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: add radio support to the driver
Problem Details: Changes: Add function tm6000_set_reg_mask for change some bits in regs. Very usefull, simplify some code with this function. Add control mute Add control volume Add control audio input MUX Add support radio Radio works well. TV works too Known bugs: The programm gnomeradio can't set freq ...
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 184cc505ed86..acb03172a887 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -76,14 +76,11 @@ MODULE_PARM_DESC(debug, "enable debug messages"); static int _tm6000_start_a...
6ca000479fdb80b9059b69c67c82f8dc0d5f5d47
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: Add support for Terratec Grabster AV 150/250 MX
Problem Details: This patch adds support for Terratec Grabster AV 150/250 MX. For now it is only possible to use composite input as switching inputs does not work. [mchehab@redhat.com: Fix merge conflicts and simplify board entries] Signed-off-by: Holger Nelson <hnelson@hnelson.de> Signed-off-by: Mauro Carvalho Chehab...
```diff diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index bd99ca7b9f28..290037eecd61 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -52,6 +52,7 @@ #define TM6010_BOARD_TWINHAN_TU501 13 #define TM6010_BOARD_BEHOLD_WANDER...
d1303567f7738c07c0e5fd22420a9a8e2f55a0c4
Analyze and fix the following issue in the Linux kernel code: [media] omap24xxcam: Fix compilation
Problem Details: Add linux/sched.h because of missing declaration of TASK_NORMAL. This patch fixes the following error: drivers/media/video/omap24xxcam.c: In function 'omap24xxcam_vbq_complete': drivers/media/video/omap24xxcam.c:415: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/media/video/oma...
```diff diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 017552762902..f6626e87dbc5 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c @@ -36,6 +36,7 @@ #include <linux/clk.h> #include <linux/io.h> #include <linux/slab.h> +#include <linux/sc...
61ca1500c5ee04f2be34a4f58bb9baed0214b7a9
Analyze and fix the following issue in the Linux kernel code: [media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
Problem Details: This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing if (var == 0) with if (!var) after an allocation and all other offending 0s with NULL. KernelVersion: linus' tree-1f0324c Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Mauro Carvalh...
```diff diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index bd86d970f4c2..8a98ab68239e 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c @@ -743,7 +743,7 @@ int saa7164_api_configure_dif(struct saa7164_port *port, ...
7ee9e64a3d7379fd443090880158374181f754cf
Analyze and fix the following issue in the Linux kernel code: [media] cx18: fix kernel oops when setting MPEG control before capturing
Problem Details: The cxhdl->priv field was not set initially, only after capturing started. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index b988ec62af58..321c1b79794c 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -734,6 +734,7 @@ static int __devinit cx18_init_struct1(struct cx18 *cx) cx->cxhdl.c...
f72cfd859b0e436d9f680790cb665ad1390187ae
Analyze and fix the following issue in the Linux kernel code: [media] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer
Problem Details: This patch fixes the warning "Using plain integer as NULL pointer", generated by sparse, by replacing the offending 0s with NULL. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Reviewed-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c index fc9526a5b746..f8f0e59cd583 100644 --- a/drivers/media/video/cx231xx/cx231xx-417.c +++ b/drivers/media/video/cx231xx/cx231xx-417.c @@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx *dev) ...
787d0f9d5ca3e98f23af94037094a9a3fafec665
Analyze and fix the following issue in the Linux kernel code: [media] V4l: sh_mobile_ceu_camera: fix cropping offset calculation
Problem Details: Use the correct scales to calculate cropping offsets. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 325f50d0adee..61f37012b4f8 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1348,7 +1348,7 @@ static int sh_mobile_ceu_set_crop(struct soc_camera...
a48be1d626ceb05b58a980a962214431af8041e8
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats
Problem Details: If the camera was set to output formats like RGB565 YUYV or SBGGR10, the resulting image was scrambled due to erroneous interpretations of horizontal parameter's units. This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings that, first are not used within mainline code and second, ...
```diff diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index 1cfff4132a0b..c8c6c03a6a62 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c @@ -324,14 +324,10 @@ static enum pixel_fmt fourcc_to_ipu_pix(__u32 fourcc) { /* Add more formats as need aris...
44facdc8c43a8b5172d6cbe995845c9889561aa0
Analyze and fix the following issue in the Linux kernel code: [media] V4L: mx3_camera: correct 'sizeimage' value reporting
Problem Details: The 'pix->width' field may be updated in mx3_camera_set_fmt() to fulfill the IPU stride line alignment requirements. If this update takes place, the 'fmt.pix.sizeimage' field in the struct v4l2_format stucture returned by VIDIOC_S_FMT is wrong. We need to update the 'pix->sizeimage' field in the mx3_ca...
```diff diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index b9cb4a436959..1cfff4132a0b 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c @@ -918,6 +918,12 @@ static int mx3_camera_set_fmt(struct soc_camera_device *icd, pix->colorspace = mf.colorsp...
5bccd60852fc0a5ccc1980c10266896df99b8bda
Analyze and fix the following issue in the Linux kernel code: [media] V4L: omap1_camera: fix use after free
Problem Details: Even though clk_put() is a no-op on most architectures it is not for some ARM implementations. To not fail on those, release the clock timer before freeing the surrounding structure. This bug was spotted by the semantic patch tool coccinelle using the script found at scripts/coccinelle/free/kfree.cocc...
```diff diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c index 0a2fb2bfdbfb..9ed1513122c1 100644 --- a/drivers/media/video/omap1_camera.c +++ b/drivers/media/video/omap1_camera.c @@ -1664,10 +1664,10 @@ static int __exit omap1_cam_remove(struct platform_device *pdev) res = pcdev->r...
e68044e2351ee937997c1e014fbbbe1c97b935cf
Analyze and fix the following issue in the Linux kernel code: [media] firedtv: remove obsolete ieee1394 backend code
Problem Details: drivers/ieee1394/ has been removed in Linux 2.6.37. The corresponding backend code in firedtv is no longer built in now and can be deleted. Firedtv continues to work with drivers/firewire/. Also, fix a Kconfig menu comment: Removal of CONFIG_IEEE1394 made the "Supported FireWire (IEEE 1394) Adapters...
```diff diff --git a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig index 161ccfd471cb..ee214c3b63d7 100644 --- a/drivers/media/dvb/Kconfig +++ b/drivers/media/dvb/Kconfig @@ -65,7 +65,7 @@ comment "Supported SDMC DM1105 Adapters" source "drivers/media/dvb/dm1105/Kconfig" comment "Supported FireWire (IEEE 13...
b39e0cb9018bf95348078ad74b3e0171e985389a
Analyze and fix the following issue in the Linux kernel code: [media] gspca_sn9c20x: Add LED_REVERSE flag for 0c45:62bb
Problem Details: This fixes the led not working on this camera Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index ccc89c113bad..52f44a5c1b2f 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c @@ -2507,7 +2507,7 @@ static const struct usb_device_id device_table[] = { {USB_DEVICE(0x0c45, 0x62...
8bc50f354047f4afb31fc85f0efb6bfe28ce9e57
Analyze and fix the following issue in the Linux kernel code: [media] gspca_sn9c20x: Fix colored borders with ov7660 sensor
Problem Details: Tested with a camera with usb-id: 0c45:62bb Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index fcf29897b713..40e316ac3951 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c @@ -884,6 +884,9 @@ static struct i2c_reg_u8 ov7660_init[] = { {0x0e, 0x80}, {0x0d, 0x08}, {0x0f, 0...
804632201f2d749b7cb35fce42fc28552ad595c1
Analyze and fix the following issue in the Linux kernel code: [media] gspca - sonixj: Fix start sequence of sensor mt9v111
Problem Details: Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 2bfb8df9168b..01ee39be2c75 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -856,18 +856,8 @@ static const u8 mt9v111_sensor_init[][8] = { {0xb1, 0x5c, 0x01, 0x00, 0x01, 0x00, ...
87a0c94ce616b231f3c0bd09d7dbd39d43b0557a
Analyze and fix the following issue in the Linux kernel code: [media] v4l2-ctrls: Fix control enumeration for multiple subdevs with ctrl
Problem Details: v4l2-ctl and qv4l2 enumerate controls using V4L2_CTRL_FLAG_NEXT_CTRL, falling back to the old method if the flag isn't supported. The v4l2_subdev_queryctrl function will currently handle that flag, but for the controls of the subdev only. This isn't right, it should refuse this flag, otherwise v4l2-ct...
```diff diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index ef66d2af0c57..2412f08527aa 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c @@ -1364,6 +1364,8 @@ EXPORT_SYMBOL(v4l2_queryctrl); int v4l2_subdev_queryctrl(struct v4l2_subdev *sd, struct ...
78e51566f0c56daa58f7bbe2591336b7d478c148
Analyze and fix the following issue in the Linux kernel code: [media] em28xx: Fix return value for s_ctrl
Problem Details: On some cases, driver returns 1. This should be OK, but qv4l2 is too strict about return values. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index f34d524ccb09..1ddd3ee22812 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -1452,7 +1452,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,...
0eec66c0dfc1b066e6addbc6af755c779f65fd87
Analyze and fix the following issue in the Linux kernel code: [media] tuner-core: Rearrange some functions to better document
Problem Details: Group a few functions together and add/fix comments for each block of the driver. This is just a cleanup patch meant to improve driver readability. No functional changes in this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 2c7fe18cedeb..a91a29978f9c 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -251,7 +251,7 @@ static struct analog_demod_ops tuner_analog_ops = { }; /* - * Functions to select between...
2d351df443b0b324a440b5fd053074562d36a7f5
Analyze and fix the following issue in the Linux kernel code: [media] Remove the remaining usages for T_STANDBY
Problem Details: tda9887 used to use the T_STANDBY type internally, while tea5761 used it to put the device to sleep. Fix the code for it to work properly with the tuner core changes and remove this flag from tuner.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c index bf14bd79e2fc..cdb645d57438 100644 --- a/drivers/media/common/tuners/tda9887.c +++ b/drivers/media/common/tuners/tda9887.c @@ -36,6 +36,8 @@ struct tda9887_priv { unsigned int mode; unsigned int audmo...
0ae79d993cd5ce425bedebcbd2f8c4fa310acfe6
Analyze and fix the following issue in the Linux kernel code: [media] tuner-core: Fix a few comments on it
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 2a0bea145a78..dcf03face265 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -128,7 +128,7 @@ struct tuner { * tuner attach/detach logic */ -/** This macro allows us to probe dynami...