summaryrefslogtreecommitdiff
path: root/drivers/media/common/siano/smsdvb-debugfs.c
AgeCommit message (Collapse)AuthorFilesLines
2020-03-20media: siano: Use scnprintf() for avoiding potential buffer overflowTakashi Iwai1-104/+110
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2018-08-08siano: get rid of an unused return code for debugfs registerMauro Carvalho Chehab1-5/+5
The siano's debugfs register logic is optional: it should be ok if it fails. So, no need to check if debufs register succeeded. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-02-12vfs: do bulk POLL* -> EPOLL* replacementLinus Torvalds1-1/+1
This is the mindless scripted replacement of kernel use of POLL* variables as described by Al, done by this script: for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'` for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done done with de-mangling cleanups yet to come. NOTE! On almost all architectures, the EPOLL* constants have the same values as the POLL* constants do. But they keyword here is "almost". For various bad reasons they aren't the same, and epoll() doesn't actually work quite correctly in some cases due to this on Sparc et al. The next patch from Al will sort out the final differences, and we should be all done. Scripted-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-02-06Merge tag 'media/v4.16-2' of ↵Linus Torvalds1-22/+7
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - videobuf2 was moved to a media/common dir, as it is now used by the DVB subsystem too - Digital TV core memory mapped support interface - new sensor driver: ov7740 - several improvements at ddbridge driver - new V4L2 driver: IPU3 CIO2 CSI-2 receiver unit, found on some Intel SoCs - new tuner driver: tda18250 - finally got rid of all LIRC staging drivers - as we don't have old lirc drivers anymore, restruct the lirc device code - add support for UVC metadata - add a new staging driver for NVIDIA Tegra Video Decoder Engine - DVB kAPI headers moved to include/media - synchronize the kAPI and uAPI for the DVB subsystem, removing the gap for non-legacy APIs - reduce the kAPI gap for V4L2 - lots of other driver enhancements, cleanups, etc. * tag 'media/v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (407 commits) media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32 media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32 media: v4l2-compat-ioctl32.c: avoid sizeof(type) media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32 media: v4l2-compat-ioctl32.c: fix the indentation media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF media: v4l2-ioctl.c: don't copy back the result for -ENOTTY media: v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt media: vivid: fix module load error when enabling fb and no_error_inj=1 media: dvb_demux: improve debug messages media: dvb_demux: Better handle discontinuity errors media: cxusb, dib0700: ignore XC2028_I2C_FLUSH media: ts2020: avoid integer overflows on 32 bit machines media: i2c: ov7740: use gpio/consumer.h instead of gpio.h media: entity: Add a nop variant of media_entity_cleanup ...
2017-12-28media: move dvb kAPI headers to include/mediaMauro Carvalho Chehab1-4/+4
Except for DVB, all media kAPI headers are at include/media. Move the headers to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-11media: siano: add SPDX markupsMauro Carvalho Chehab1-18/+3
As we're now using SPDX identifiers, add the proper SPDX, better identifying the licenses whith apply to the source code. As we're now using the short license, it doesn't make sense to keep the original license text. Also, fix MODULE_LICENSE to properly identify GPL v2 at the Siano's common driver. Some codes there are licensed on GPL v2 or latter, while others are GPL v2 only. So, in order to reflect the common license that applies to everything, the module itself should be GPLv2 only. While here, use the Kernel's coding style for the comments with copyright info. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-28media: annotate ->poll() instancesAl Viro1-5/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-02-26[media] siano: replace sms_err by pr_errMauro Carvalho Chehab1-1/+1
Originally, sms_err() would be also displaying the line where the error occurs, but the messages are clear enough. Also, the function is always printed. So, no need for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-26[media] siano: use pr_* print functionsMauro Carvalho Chehab1-3/+1
Instead of defining its own set of printk functions, let's use the common Kernel debug logic provided by pr_foo functions. As a first step, let's just define the existing macros as the Kernel ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-02-07[media, edac] Change my email addressMauro Carvalho Chehab1-1/+1
There are several left overs with my old email address. Remove their occurrences and add myself at CREDITS, to allow people to be able to reach me on my new addresses. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-03-21[media] siano: make some functions staticMauro Carvalho Chehab1-3/+3
drivers/media/common/siano/smsdvb-debugfs.c:51:6: warning: no previous prototype for 'smsdvb_print_dvb_stats' [-Wmissing-prototypes] drivers/media/common/siano/smsdvb-debugfs.c:154:6: warning: no previous prototype for 'smsdvb_print_isdb_stats' [-Wmissing-prototypes] drivers/media/common/siano/smsdvb-debugfs.c:244:6: warning: no previous prototype for 'smsdvb_print_isdb_stats_ex' [-Wmissing-prototypes] drivers/media/common/siano/smscoreapi.c:832:5: warning: no previous prototype for 'smscore_configure_board' [-Wmissing-prototypes] drivers/media/common/siano/smscoreapi.c:1301:5: warning: no previous prototype for 'smscore_init_device' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: Fix the remaining checkpatch.pl compliantsMauro Carvalho Chehab1-5/+2
Fix all other remaining checkpatch.pl compliants on the Siano driver, except for the 80-cols (soft) limit. Those are harder to fix, and probably not worth to do right now. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: remove the remaining CamelCase compliantsMauro Carvalho Chehab1-34/+34
Remove the remaining CamelCase checkpatch.pl compliants. There are still a few left, but those are due to USB and DVB APIs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: convert structure names to lowercaseMauro Carvalho Chehab1-3/+3
There are several structures defined in uppercase. Convert them to lowercase, and simplify their names, when possible. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: get rid of CammelCase from smscoreapi.hMauro Carvalho Chehab1-115/+115
It is almost impossible to see a compliant with checkpatch.pl on those Siano drivers, as there are simply too much violations on it. So, now that a big change was done, the better is to cleanup the checkpatch compliants. Let's first replace all CammelCase symbols found at smscoreapi.h using camel_case namespace. That removed 144 checkpatch.pl compliants on this file. Of course, the other files need to be fixed accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: add support for .poll on debugfsMauro Carvalho Chehab1-18/+59
Implement poll() method for debugfs and be sure that the debug_data won't be freed on ir or on read(). With this change, poll() will return POLLIN if either data was filled or if data was read. That allows read() to return 0 to indicate EOF in the latter case. As poll() is now provided, fix support for non-block mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: add two missing fields to ISDB-T stats debugfsMauro Carvalho Chehab1-0/+10
Those fields help to identify the version of the ISDB stats. Useful while debuging the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: split debugfs code into a separate fileMauro Carvalho Chehab1-0/+503
To avoid mixing two different things at the same place, move the debugfs code into a separate file. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>