#
8cd08e36 |
|
07-Oct-2023 |
Jinjie Ruan <ruanjinjie@huawei.com> |
media: siano: Drop unnecessary error check for debugfs_create_dir/file() Both debugfs_create_dir() and debugfs_create_file() return ERR_PTR and never return NULL. As Hans suggested, this patch removes the error checking for both debugfs_create_dir() and debugfs_create_file() in smsdvb_debugfs_create(). This is because the DebugFS kernel API is developed in a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes. The debugfs APIs have a IS_ERR() judge in start_creating() which can handle it gracefully. So these checks are unnecessary. And as Hans pointed out, it's much better to first allocate debug_data before calling debugfs_create_dir, which need not to clean anything up in that case. Fixes: 503efe5cfc9f ("[media] siano: split debugfs code into a separate file") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Suggested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
#
2f7d0c94 |
|
07-Dec-2022 |
ye xingchen <ye.xingchen@zte.com.cn> |
media: siano: Convert to use sysfs_emit_at() API Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
#
af72bc8c |
|
11-Mar-2020 |
Takashi Iwai <tiwai@suse.de> |
media: siano: Use scnprintf() for avoiding potential buffer overflow 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>
|
#
8179de98 |
|
08-Aug-2018 |
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
siano: get rid of an unused return code for debugfs register 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>
|
#
a9a08845 |
|
11-Feb-2018 |
Linus Torvalds <torvalds@linux-foundation.org> |
vfs: do bulk POLL* -> EPOLL* replacement 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>
|
#
fada1935 |
|
28-Dec-2017 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
media: move dvb kAPI headers to include/media 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>
|
#
1e6f57b2 |
|
01-Dec-2017 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
media: siano: add SPDX markups 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>
|
#
c23e0cb8 |
|
03-Jul-2017 |
Al Viro <viro@zeniv.linux.org.uk> |
media: annotate ->poll() instances Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
#
5ed0a2c7 |
|
22-Feb-2015 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: replace sms_err by pr_err 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>
|
#
5e022d1a |
|
22-Feb-2015 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: use pr_* print functions 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>
|
#
37e59f87 |
|
07-Feb-2014 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media, edac] Change my email address 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>
|
#
2bf0f93e |
|
21-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: make some functions static 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>
|
#
05ad412a |
|
21-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: Fix the remaining checkpatch.pl compliants 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>
|
#
28a59df4 |
|
21-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: remove the remaining CamelCase compliants 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>
|
#
cf0e9cfc |
|
21-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: convert structure names to lowercase 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>
|
#
dfef84fc |
|
21-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: get rid of CammelCase from smscoreapi.h 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>
|
#
6a28bd94 |
|
17-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: add support for .poll on debugfs 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>
|
#
4cce1f4e |
|
16-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: add two missing fields to ISDB-T stats debugfs 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>
|
#
503efe5c |
|
10-Mar-2013 |
Mauro Carvalho Chehab <mchehab@kernel.org> |
[media] siano: split debugfs code into a separate file 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>
|