summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
AgeCommit message (Collapse)AuthorFilesLines
2017-02-28lib/vsprintf.c: remove %Z supportAlexey Dobriyan3-3/+3
Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-28scripts/spelling.txt: add "configuartion" pattern and fix typo instancesMasahiro Yamada4-13/+13
Fix typos and add the following to the scripts/spelling.txt: configuartion||configuration While we are here, fix the "ouput" as well in the touched hunk in drivers/media/dvb-frontends/drx39xyj/drx_driver.h. Link: http://lkml.kernel.org/r/1481573103-11329-23-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-08[media] zd1301: fix building interface driver without demodulatorArnd Bergmann1-0/+18
If the USB driver is enabled but the demodulator is not, we get a link error: ERROR: "zd1301_demod_get_dvb_frontend" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! ERROR: "zd1301_demod_get_i2c_adapter" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined! Such a configuration obviously makes no sense, but we should not fail the build. This tries to mimic what we have for other drivers by turning the build failure into a runtime failure. Alternatively we could use an unconditional 'select' or 'depends on' to enforce a sane configuration. Fixes: 47d65372b3b6 ("[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver") Fixes: 992b39872b80 ("[media] zd1301: ZyDAS ZD1301 DVB USB interface driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03[media] media: dvb-frontends: constify vb2_ops structureBhumika Goyal1-1/+1
Declare vb2_ops structure as const as it is only stored in the ops field of a vb2_queue structure. This field is of type const, so vb2_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p={...}; @ok1@ identifier r1.i; position p; struct sta2x11_vip vip; struct vb2_queue q; @@ ( vip.vb_vidq.ops=&i@p | q.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct vb2_ops i; File size details of media/dvb-frontends/rtl2832_sdr.o file remains the same before and after applying the patch. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03[media] lgdt3306a: support i2c mux for use by em28xxKevin Cheng3-1/+113
Adds an i2c mux to the lgdt3306a demodulator. This was done to support the Hauppauge WinTV-dualHD 01595 USB TV tuner (em28xx), which utilizes two si2157 tuners behind gate control. Signed-off-by: Kevin Cheng <kcheng@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03[media] dib7000p: avoid division by zeroMartin Wache1-3/+12
dib7000p_read_word() may return zero on i2c errors, resulting in dib7000p_get_internal_freq() returning zero. So don't divide by the result of dib7000p_get_internal_freq() without checking it for zero in dib7000p_set_dds(). On one of my machines the device ID 2304:0229 Pinnacle Systems, Inc. PCTV Dual DVB-T 2001e about once a day/every two days gets into a state, where most (all?) I2C reads return with an error. Tuning during this state will result in a divide by zero without this patch. This patch doesn't fix the root cause for the device getting into a bad state, but it allows me to unload/reload the drivers, bringing it back into a usable state. Signed-off-by: Martin Wache <M.Wache@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03[media] MAINTAINERS: remove hd29l2Antti Palosaari5-1232/+0
Remove unused demod driver. Device that used it never went public. If someone later decide to add support for a device using this chipset, it should be easy enough to retrieve it from git history. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driverAntti Palosaari4-0/+614
ZyDAS ZD1301 is chip having USB interface and DVB-T demodulator integrated. This driver is for demodulator part. Driver is very reduced, just basic demodulator functionality, no statistics at all. It registers as a platform driver to driver core. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] af9033: estimate cnr from formulaAntti Palosaari2-123/+42
Use formulas for cnr estimates and get rid of old lut-based estimate. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] af9033: return regmap for integrated IT913x tuner driverAntti Palosaari2-0/+7
IT9130 series contains integrated tuner driver, which uses that demodulator address space. Return regmap in order to allow it913x driver communication. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] af9033: style related and minor changesAntti Palosaari3-172/+184
Fix coding style and other small issues. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] af9033: use 64-bit div macro where possibleAntti Palosaari2-72/+32
Replace Booth's binary division algo with 64-bit multiply and division. Fix related IF calculations. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] af9033: convert to regmap apiAntti Palosaari3-277/+145
Use regmap to cover I2C register operations. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] si2168: implement ucb statisticsAntti Palosaari1-0/+24
Implement DVBv5 UCB. Only uncorrected blocks are currently counted. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] si2168: implement ber statisticsAntti Palosaari2-2/+45
Implement DVBv5 BER. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31[media] cxd2820r: fix gpio null pointer dereferenceAntti Palosaari1-1/+1
Setting GPIOs during probe causes null pointer deference when GPIOLIB was not selected by Kconfig. Initialize driver private field before calling set gpios. It is regressing bug since 4.9. Fixes: 07fdf7d9f19f ("[media] cxd2820r: add I2C driver bindings") Reported-by: Chris Rankin <rankincj@gmail.com> Tested-by: Chris Rankin <rankincj@gmail.com> Tested-by: Håkan Lennestål <hakan.lennestal@gmail.com> Cc: <stable@vger.kernel.org> # v4.9+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] dvb-frontends: fix spelling mistake on cx24123_pll_calcutateColin Ian King1-1/+1
trivial fix to spelling mistake of function name in err message, should be cx24123_pll_calculate instead of cx24123_pll_calcutate. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-27[media] media: Drop FSF's postal address from the source code filesSakari Ailus91-391/+38
Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2016-12-27[media] mn88473: add DVB-T2 PLP supportAntti Palosaari1-1/+9
Adds PLP ID filtering for DVB-T2. It is untested as I don't have any signal having PLP ID other than 0. There is only 2 extra registers, 0x32 and 0x36 on bank2, that are programmed for DVB-T2 but not for DVB-T and all the rest are programmed similarly - so it is likely PLP. Pridvorov reported successfully testing it in Russia with m-PLP streams, on both Vladivostok and Moskow. Tested-by: "Придворов Андрей (Pridvorov Andrey)" <ua0lnj@bk.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-12-01[media] mn88472: fix chip id check on probeAntti Palosaari1-12/+12
A register used to identify chip during probe was overwritten during firmware download and due to that later probe's for warm chip were failing. Detect chip from the another register, which is located on different register bank 2. Fixes: 94d0eaa41987 ("[media] mn88472: move out of staging to media") Cc: <stable@vger.kernel.org> # v4.8+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-12-01[media] mn88473: fix chip id check on probeAntti Palosaari1-12/+12
A register used to identify chip during probe was overwritten during firmware download and due to that later probe's for warm chip were failing. Detect chip from the another register, which is located on different register bank 2. Fixes: 7908fad99a6c ("[media] mn88473: finalize driver") Cc: <stable@vger.kernel.org> # v4.8+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-23[media] dvb: remove unused systime() functionArnd Bergmann2-12/+0
The systime function uses struct timespec, which we want to stop using in the kernel because it overflows in 2038. Fortunately, this use in dibx000_common is in a function that is never called, so we can just remove it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-23[media] stv090x: use lookup tables for carrier/noise ratioJoerg Riechardt1-6/+10
The stv090x driver uses the lookup table for signal strength already, with this patch we use the lookup tables for carrier/noise ratio as well. This has the advantage, that values for DVB-S and DVB-S2 are now corresponding, while before they were way off. The values are now proportional to real carrier/noise ratio, while before they were corresponding to register values. So now applications are able to give the user real carrier/noise ratio. Because the output has to be within 0x0000...0xFFFF the three negative values for DVB-S2 are omitted. This is no significant loss, because reception is lost at 7.5 dB already (TT S2-1600, Cine S2), so the negative values are not really important, and also for DVB-S they don´t exist. Signed-off-by: Joerg Riechardt <j.riechardt@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-22[media] mn88473: refactor and fix statisticsAntti Palosaari2-400/+161
Remove DVB-T2 BER as it does not work at all and I didn't find how to fix. Fix DVB-T and DVB-C BER. It seems to return new some realistic looking values. Use (1 << 24) base for CNR calculations to keep it in line with dvb logarithm functions. Move all statistic logic to mn88473_read_status() function. Use regmap_bulk_read() for reading multiple registers as a one go. Many more and less minor changes. Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-22[media] mn88473: add DVBv5 statistics supportMartin Blumenstingl2-41/+445
Implement DVBv5 statistics support for DVB-T, DVB-T2 and DVB-C. All information was taken from the LinuxTV wiki, where Benjamin Larsson has documented all registers: https://www.linuxtv.org/wiki/index.php/Panasonic_MN88472 Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-19Revert "[media] dvb_frontend: merge duplicate dvb_tuner_ops.release ↵Mauro Carvalho Chehab15-16/+122
implementations" While this patch sounded a good idea, unfortunately, it causes bad dependencies, as drivers that would otherwise work without the DVB core will now break: ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tea5767.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tea5761.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tda827x.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/tda18218.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/qt1010.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt2266.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt20xx.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mt2060.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/mc44s803.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0013.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0012.ko] undefined! ERROR: "dvb_tuner_simple_release" [drivers/media/tuners/fc0011.ko] undefined! So, we have to revert it. Note: as the argument for the release ops changed from "int" to "void", we needed to change it at the revert patch, to avoid compilation issues like: drivers/media/tuners/tea5767.c:437:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .release = tea5767_release, ^~~~~~~~~~~~~~~ This reverts commit 22a613e89825ea7a3984a968463cc6d425bd8856. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] Kconfig: fix breakages when DVB_CORE is not selectedMauro Carvalho Chehab1-4/+5
On some weird randconfigs, it is possible to select DVB drivers, without having the DVB_CORE: CONFIG_DVB_AU8522=m CONFIG_DVB_AU8522_V4L=m CONFIG_DVB_TUNER_DIB0090=m This was never supposed to work, but changeset 22a613e89825 ("[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations") caused it to be exposed: drivers/built-in.o: In function `fc0011_attach': (.text+0x1598fb): undefined reference to `dvb_tuner_simple_release' drivers/built-in.o:(.rodata+0x55e58): undefined reference to `dvb_tuner_simple_release' drivers/built-in.o:(.rodata+0x57398): undefined reference to `dvb_tuner_simple_release' Fixes: 22a613e89825 ("[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] stb0899: move code to "detach" callbackMax Kellermann1-2/+9
Ensure that STB0899_POSTPROC_GPIO_POWER is set synchronously. Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dvb_frontend: tuner_ops.release returns voidMax Kellermann6-12/+6
It is not clear what this return value means. All implemenations return 0, and the one caller ignores the value. Let's remove this useless return value completely. Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementationsMax Kellermann15-140/+16
Most release callback functions are identical: free the "tuner_priv" and clear it. Let's eliminate some bloat by providing this simple implementation in the dvb_frontend library. Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dvb: make DVB frontend *_ops instances "const"Max Kellermann72-134/+134
These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! [mchehab@s-opensource.com: fix merge conflicts] Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dibx000_common: use pr_foo() instead of printk()Mauro Carvalho Chehab1-17/+19
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib9000: use pr_foo() instead of printk()Mauro Carvalho Chehab1-82/+89
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a\n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib8000: use pr_foo() instead of printk()Mauro Carvalho Chehab1-127/+134
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a\n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib7000p: use pr_foo() instead of printk()Mauro Carvalho Chehab1-60/+67
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib7000m: use pr_foo() instead of printk()Mauro Carvalho Chehab1-33/+40
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib3000mc: use pr_foo() instead of printk()Mauro Carvalho Chehab1-1/+7
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib3000mb: use pr_foo() instead of printk()Mauro Carvalho Chehab2-82/+71
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups'"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. The frontend settings also rely on continuation lines. Change it to avoid the need of adding pr_cont() calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib0090: use pr_foo() instead of printk()Mauro Carvalho Chehab1-80/+82
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] dib0070: use pr_foo() instead of printk()Mauro Carvalho Chehab1-25/+25
The dprintk() macro relies on continuation lines. This is not a good practice and will break after commit 563873318d32 ("Merge branch 'printk-cleanups"). So, instead of directly calling printk(), use pr_foo() macros, adding a \n leading char on each macro call. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18gp8psk-fe: add missing MODULE_foo() macrosMauro Carvalho Chehab1-7/+10
This file was converted to a separate module at commit 7a0786c19d65 ("gp8psk: Fix DVB frontend attach"), because the DVB attach routines require it to work. However, I forgot to copy the MODULE_foo() macros from the original module, causing this warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/media/dvb-frontends/gp8psk-fe.o Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 7a0786c19d65 ("gp8psk: Fix DVB frontend attach") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-11-18[media] stv090x: get rid of continuation linesMauro Carvalho Chehab1-8/+2
This driver has printk continuation lines for debugging purposes. Since commit 563873318d32 ("Merge branch 'printk-cleanups'")', this won't work as expected anymore. So, use %*ph and get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18[media] stb0899_drv: get rid of continuation linesMauro Carvalho Chehab1-17/+4
This driver has printk continuation lines for debugging purposes. Since commit 563873318d32 ("Merge branch 'printk-cleanups'")', this won't work as expected anymore. So, use %*ph and get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16Merge tag 'v4.9-rc5' into patchworkMauro Carvalho Chehab4-0/+485
Linux 4.9-rc5 * tag 'v4.9-rc5': (1102 commits) Linux 4.9-rc5 gp8psk: Fix DVB frontend attach gp8psk: fix gp8psk_usb_in_op() logic dvb-usb: move data_mutex to struct dvb_usb_device iio: maxim_thermocouple: detect invalid storage size in read() aoe: fix crash in page count manipulation lightnvm: invalid offset calculation for lba_shift Kbuild: enable -Wmaybe-uninitialized warnings by default pcmcia: fix return value of soc_pcmcia_regulator_set infiniband: shut up a maybe-uninitialized warning crypto: aesni: shut up -Wmaybe-uninitialized warning rc: print correct variable for z8f0811 dib0700: fix nec repeat handling s390: pci: don't print uninitialized data for debugging nios2: fix timer initcall return value x86: apm: avoid uninitialized data NFSv4.1: work around -Wmaybe-uninitialized warning Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" lib/stackdepot: export save/fetch stack for drivers mm: kmemleak: scan .data.ro_after_init ...
2016-11-16[media] dvb-tc90522: Rename a jump label in tc90522_probe()Markus Elfring1-3/+2
Adjust a jump label according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] dvb-tc90522: Use kmalloc_array() in tc90522_master_xfer()Markus Elfring1-1/+1
A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-13gp8psk: Fix DVB frontend attachMauro Carvalho Chehab4-0/+485
The DVB binding schema at the DVB core assumes that the frontend is a separate driver. Faling to do that causes OOPS when the module is removed, as it tries to do a symbol_put_addr on an internal symbol, causing craches like: WARNING: CPU: 1 PID: 28102 at kernel/module.c:1108 module_put+0x57/0x70 Modules linked in: dvb_usb_gp8psk(-) dvb_usb dvb_core nvidia_drm(PO) nvidia_modeset(PO) snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd soundcore nvidia(PO) [last unloaded: rc_core] CPU: 1 PID: 28102 Comm: rmmod Tainted: P WC O 4.8.4-build.1 #1 Hardware name: MSI MS-7309/MS-7309, BIOS V1.12 02/23/2009 Call Trace: dump_stack+0x44/0x64 __warn+0xfa/0x120 module_put+0x57/0x70 module_put+0x57/0x70 warn_slowpath_null+0x23/0x30 module_put+0x57/0x70 gp8psk_fe_set_frontend+0x460/0x460 [dvb_usb_gp8psk] symbol_put_addr+0x27/0x50 dvb_usb_adapter_frontend_exit+0x3a/0x70 [dvb_usb] From Derek's tests: "Attach bug is fixed, tuning works, module unloads without crashing. Everything seems ok!" Reported-by: Derek <user.vdr@gmail.com> Tested-by: Derek <user.vdr@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-24[media] mb86a20s: always initialize a return valueNicolas Iooss1-0/+1
In mb86a20s_read_status_and_stats(), when mb86a20s_read_status() fails, the function returns the value in variable rc without initializing it first. Fix this by propagating the error code from variable status_nr. This bug has been found using clang and -Wsometimes-uninitialized warning flag. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24[media] cx24120: do not allow an invalid delivery system typesColin Ian King1-2/+1
cx24120_set_frontend currently allows invalid delivery system types other than SYS_DVBS2 and SYS_DVBS. Fix this by returning -EINVAL for invalid values. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jemma Denson <jdenson@gmail.com>
2016-10-21[media] dvb-frontends: don't break long linesMauro Carvalho Chehab29-96/+76
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code. As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines. So, join those continuation lines. The patch was generated via the script below, and manually adjusted if needed. </script> use Text::Tabs; while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; } </script> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>