- 10 Sep, 2018 40 commits
-
-
John Whitmore authored
The MACRO GET_COMMAND_PACKET_FRAG_THRESHOLD causes a number of checkpatch issues so has been refactored to use braces around the parameter 'v' to avoid precedence issues, and to add spaces around operators. These changes are coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
The defined constant RTL8190_CPU_START_OFFSET is not used in the code so has been removed. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Fix the spacing issues, remove space after cast operation, and replace spaces at start of line with tab. These changes are purely coding style changes to resolve checkpatch issues. There should be no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Refactor the MACRO RT_TRACE to add parentheses around the parameter 'component', this clears the checkpatch warning with respect to precedence issues. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Rename the MACRO Rx_Smooth_Factor to RX_SMOOTH_FACTOR, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Rename the MACRO RTL819xU_MODULE_NAME to RTL819XU_MODULE_NAME, this clears the checkpatch issue with CamelCase naming. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Add SPDX-License-Identifier tag to the start of header file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Remove unused function declarations. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Remove the function read_cam(), as it is unused in code. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John Whitmore authored
Remove the function write_cam() as it is unused. Simple style change which should not impact runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tom Todd authored
Fixed a code styling issue. Signed-off-by: Tom Todd <thomas.m.a.todd@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishad Kamdar authored
Replace all usages of ERR_MSG with with dev_<level> without __func__ or __LINE__ or current->comm and current->pid. Remove the do {} while(0) loop for the single statement macro. Delete commented ERR_MSG() usage. Drop ERR_MSG from dbg.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishad Kamdar authored
This patch removes N_MSG() and all its users since it is a no-op. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thomas Zimmermann authored
The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tim Collier authored
Remove two blocks of code that checkpatch identified as redundant because they were enclosed in "#if...#endif". In the case of prism2fw.c the associated "TODO" comment was retained. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unnecessary parentheses to follow kernel coding style and clean checkpatch issues. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Replace tabs with spaces where appropriate. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove code that is only valid for channels > 14. This addresses the below TODO item. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
This comment adds no useful information to the code, so remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Simplify function comment to a single line. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jia-Ju Bai authored
usb_write_port_complete() in usb_ops_linux.c is a completion handler function for the USB driver. So it should not sleep, but it is can sleep according to the function call paths (from bottom to top) in Linux-4.16: [FUNC] kzalloc(GFP_KERNEL) drivers/staging/rtl8188eu/core/rtw_cmd.c, 1081: kzalloc in rtw_chk_hi_queue_cmd drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604: rtw_chk_hi_queue_cmd in usb_write_port_complete [FUNC] kzalloc(GFP_KERNEL) drivers/staging/rtl8188eu/core/rtw_cmd.c, 1075: kzalloc in rtw_chk_hi_queue_cmd drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604: rtw_chk_hi_queue_cmd in usb_write_port_complete To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC. These bugs are found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Currently we have structrues comp (which is empty) and comp_info being used to register and deregister the component. This mismatch in naming occurred from a previous commit that renamed aim_info to comp. Fix this to use consistent component naming in line with most/net, most/sound etc. This fixes the message two issues, one with a null empty name when loading the module: [ 1485.269515] most_core: registered new core component (null) and an Oops when removing the module: [ 1485.277971] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 1485.278648] PGD 0 P4D 0 [ 1485.279253] Oops: 0002 [#2] SMP PTI [ 1485.279847] CPU: 1 PID: 32629 Comm: modprobe Tainted: P D WC OE 4.18.0-8-generic #9 [ 1485.280442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 1485.281040] RIP: 0010:most_deregister_component+0x3c/0x70 [most_core] .. etc Fixes: 1b10a031 ("staging: most: video: remove aim designators") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Don't populate the array 'broadcast' on the stack but instead make it static. Makes the object code smaller by 53 bytes: Before: text data bss dec hex filename 10511 1521 448 12480 30c0 drivers/staging/most/net/net.o After: text data bss dec hex filename 10394 1585 448 12427 308b drivers/staging/most/net/net.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
Instead of creating a dummy child device to manage the card object, just use devm stuff directly for releasing with snd_card_free(). This results in a lot of code reduction. Since the dummy child devices are gone, the device object to be passed to the memory allocator needs to be adjusted as well. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
Just a minor code refactoring and adding some const prefix. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
All three functions to create PCM objects are fairly resemble, and can be unified to a single common helper. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
The recent ALSA PCM core supports the SNDRV_PCM_INFO_SYNC_APPLPTR flag indicating that the driver needs the ack call at each appl_ptr update. This is requirement for the indirect PCM implementations like bcm2835-audio driver, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
The memory access to the pages allocated with SNDRV_DMA_TYPE_CONTINUOUS are basically non-coherent, and it becomes a problem when a process accesses via mmap. For the more consistent access, use the device coherent memory, just by replacing the call pattern in the allocator helpers. The only point we need to be careful for is the device object passed there; since bcm2835-audio driver creates fake devices and each card is created on top of that, we need to pass its parent device as the real device object. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
For more consistency, move the module parameter description right after its variable definition. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
Yet a few header files are included unnecessarily. Drop them. Also remove trivial comments. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
For making the whole code more consistent, replace the home-made debug print macros with the standard dev_err() & co. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
Instead of allocating a separate snd_device object, let snd_card_new() allocate the private resource. This simplifies the code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
This is the most significant part in the patch series. The bcm2835-audio driver used to queue the commands to vc04 core via workqueue, but basically the whole accesses to vc04 core are done in the sleepable context, including the callback calls. In such a case, rewriting the code using non-atomic PCM ops will simplify the logic a lot. This patch does it: all workqueue are gone and each former-work implementation is now directly called from PCM ops like trigger and write transfer. Along with it, the DMA position updater, bcm2835_playback_fifo(), was also rewritten to use a simpler logic. Now it handles the XRUN and draining properly by calling snd_pcm_stop() conditionally. The current position is kept in atomic_t value so that it can be read concurrently from the pointer callback. Also, the bcm2835_audio_instance object is allocated at the beginning of bcm2835_audio_open(). This makes the resource management clearer. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
This is a cleanup and code refactoring in bcm2835-vchiq.c. The major code changes are to provide local helpers for easier use of lock / unlock, and message passing with/without response wait. This allows us to reduce lots of open codes. Also, the max packet is set at opening the stream, not at each time when the write gets called. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
The bcm2835_audio_instance object contains the array of VCHI_SERVICE_HANDLE_T, while the code assumes and uses only the first element explicitly. Let's reduce to a single vchi handle for simplifying the code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
It seems that the resolution of vc04 callback is in 10 msec; i.e. the minimal period size is also 10 msec. This patch adds the corresponding hw constraint. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
The chip->audio_mutex is used basically for protecting the opened stream assignment, and the prepare callback is irrelevant with it. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
These debug messages worsen the code readability a lot while they give little debuggability (which we already have via tracing, in anyway). Let's clean them up. This allows us to reduce the snd_bcm2835_pcm_lib_ioctl() function to be a direct call of the snd_pcm_lib_ioctl callback (like most other drivers do), too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
When the parameter setup fails, the driver should propagate the error code instead of silently ignoring it. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-