summaryrefslogtreecommitdiff
path: root/drivers/staging/vc04_services
AgeCommit message (Collapse)Author
2022-01-25staging: vc04_services: Fix RCU dereference checkPadmanabha Srinivasaiah
In service_callback path RCU dereferenced pointer struct vchiq_service need to be accessed inside rcu read-critical section. Also userdata/user_service part of vchiq_service is accessed around different synchronization mechanism, getting an extra reference to a pointer keeps sematics simpler and avoids prolonged graceperiod. Accessing vchiq_service with rcu_read_[lock/unlock] fixes below issue. [ 32.201659] ============================= [ 32.201664] WARNING: suspicious RCU usage [ 32.201670] 5.15.11-rt24-v8+ #3 Not tainted [ 32.201680] ----------------------------- [ 32.201685] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:529 suspicious rcu_dereference_check() usage! [ 32.201695] [ 32.201695] other info that might help us debug this: [ 32.201695] [ 32.201700] [ 32.201700] rcu_scheduler_active = 2, debug_locks = 1 [ 32.201708] no locks held by vchiq-slot/0/98. [ 32.201715] [ 32.201715] stack backtrace: [ 32.201723] CPU: 1 PID: 98 Comm: vchiq-slot/0 Not tainted 5.15.11-rt24-v8+ #3 [ 32.201733] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [ 32.201739] Call trace: [ 32.201742] dump_backtrace+0x0/0x1b8 [ 32.201772] show_stack+0x20/0x30 [ 32.201784] dump_stack_lvl+0x8c/0xb8 [ 32.201799] dump_stack+0x18/0x34 [ 32.201808] lockdep_rcu_suspicious+0xe4/0xf8 [ 32.201817] service_callback+0x124/0x400 [ 32.201830] slot_handler_func+0xf60/0x1e20 [ 32.201839] kthread+0x19c/0x1a8 [ 32.201849] ret_from_fork+0x10/0x20 Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Padmanabha Srinivasaiah <treasure4paddy@gmail.com> Link: https://lore.kernel.org/r/20211231195406.5479-1-treasure4paddy@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-06staging: vc04_services: rename BM2835 to BCM2835 in headers commentsGaston Gonzalez
In the kernel, when referring to the chip BCM2835, it is more suitable to use BCM2835 to BM2835. To avoid confusion, and to make things more consistent, rename the headers titles accordingly. Suggested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/19acea9e9da0d3ebb1a7e6bce511a3c09e8c80c3.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-06staging: vc04_services: rename string literal containing bm2835_* to bcm2835*_Gaston Gonzalez
In the kernel, all names related to the chip BCM2835 are always named bcm2835_*. To avoid confusion, and to make things more consistent, rename the string term bm2835_* to bcm2835_*. While at it, some realignments were made to improve readability. Suggested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/91caae07fce0e4511f283388304e935526ba29ed.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-06staging: vc04_services: rename variables containing bm2835_* to bcm2835_*Gaston Gonzalez
In the kernel, all names related to the chip BCM2835 are always named bcm2835_*. To avoid confusion, and to make things more consistent, rename all variables using bm2835_* to bcm2835_*. While at it, some realignments were made to improve readability. Suggested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/a0af5deacebc2da9b21772c7677e1a9627edbed6.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-06staging: vc04_services: rename functions containing bm2835_* to bcm2835_*Gaston Gonzalez
In the kernel, all names related to the chip BCM2835 are always named bcm2835_*. To avoid confusion, and to make things more consistent, rename functions using bm2835_* to bcm2835_*. While at it, some realignments were made to improve readability. Suggested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/d3b6f67421c75829105f793cfb9ec1414b926bf6.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-06staging: vc04_services: rename structures bm2835_mmal_dev and ↵Gaston Gonzalez
bm2835_mmal_v4l2_ctrl In the kernel, all names related to the chip BCM2835 are always named bcm2835_*. To avoid confusion, and to make things more consistent, rename the structures bm2835_mmal_dev and bm2835_mmal_v4l2_ctrl accordingly. While at it, one realignment was made to improve readability. Suggested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/a893f24fc5ee6c276ea982f141b42ec0a00d7194.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-30staging: vc04_services: update TODO fileGaston Gonzalez
There are no struct typedef remaining inside vc04_services/. Hence, remove the task from the TODO file. While at it, fix the items sequential numbering. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/3f560a75063a0bb744bb34c410e49f792d2c3d21.1640776340.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-30staging: vc04_services: bcm2835-camera: avoid the use of typedef for ↵Gaston Gonzalez
function pointers Replace typedef bm2835_mmal_v4l2_ctrl_cb with equivalent declaration to better align with the linux kernel coding style. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/0418e6e19e1580fff4abfc4bb2f4269dc206df44.1640776340.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-30staging: vc04_services: bcm2835-audio: avoid the use of typedef for function ↵Gaston Gonzalez
pointers Replace typedefs bcm2835_audio_newpcm_func and bcm2835_audio_newctl_func with equivalent declarations to better align with the linux kernel coding style. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/b53a77682994bbc3ccb9b89d617dec23d0785059.1640776340.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-28staging: vc04_services: Remove repeated word in vchiq log warningGautam Menghani
In a log warning in vhciq code, the word 'count' is repeated twice. Remove repeated word 'count' from vhciq log warning. This change has been suggested by checkpatch.pl Signed-off-by: Gautam Menghani <gautammenghani14@gmail.com> Link: https://lore.kernel.org/r/20211228101615.5073-1-gautammenghani14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-25staging: vchiq_core: remove superfluous static_assert statementGaston Gonzalez
After removing the BITSET_T typedef in commit d8a364820e01 ("staging: vchiq_core: get rid of typedef") the static_assert statement becomes superfluous as now we are checking if the size of the u32 type is 4 bytes. Hence, just remove the static_assert statement. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211122130926.342128-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-30staging: vchiq_core: get rid of typedefGaston Gonzalez
The typedef BITSET_T is acting as a synonym of u32. However, using the type u32 directly makes the code more readable. Furthermore, typedef should only be used in some cases, [1]. Hence, get rid of it. [1] Documentation/process/coding-style.rst Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211029200012.45986-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core: fix quoted strings split across linesGaston Gonzalez
Quoted strings should not be split across lines. As put it in [1]: "never break user-visible strings such as printk messages because that breaks the ability to grep for them." While at it, fix the alignment of the arguments in the sentence. Note: this introduce a checkpatch CHECK: line length of 123 exceeds 100 columns, as the line now is: vchiq_loud_error("%d: service %d (%c%c%c%c) version mismatch - local (%d, min %d) vs. remote (%d, min %d)", But now the string is grep-able and the whole function call more clear. Reported by checkpatch.pl [1] Documentation/process/coding-style.rst Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024213839.370830-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core: cleanup lines that end with '(' or '['Gaston Gonzalez
Fix lines that end with '(' or '['. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-8-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core: drop extern prefix in function declarationsGaston Gonzalez
Remove unnecessary extern prefix in function declarations. While at it, remove a now outdated comment and realign the function declarations in order to improve readability. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-7-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq: drop trailing semicolon in macro definitionGaston Gonzalez
As reported by checkpatch.pl, macro definitions should not use a trailing semicolon. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-6-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core.h: use preferred kernel typesGaston Gonzalez
Change types from uint32_t and uint64_t to the preferred ones u32 and u64. Reported by checkpatch.pl, with the exception of the one in function vchiq_log_dump_mem(). Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-5-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core.h: fix CamelCase in function declarationGaston Gonzalez
Renaming function declaration to avoid CamelCase use. As this was already fixed in the function definition in commit 801b1aa002d3 ("staging: vc04_services: fix CamelCase"), the current change make the names of the variables in the function definition and declartion match. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-4-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core: cleanup code alignment issuesGaston Gonzalez
Fix code alignment issues reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-3-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-25staging: vchiq_core: cleanup blank linesGaston Gonzalez
Remove unnecessary blank lines. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20211024212524.370078-2-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-18Merge 5.15-rc6 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05staging: vc04_services: shut up out-of-range warningArnd Bergmann
The comparison against SIZE_MAX produces a harmless warning on 64-bit architectures: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:185:16: error: result of comparison of constant 419244183493398898 with expression of type 'unsigned int' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (num_pages > (SIZE_MAX - sizeof(struct pagelist) - ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shut up that warning by adding a cast to a longer type. Fixes: ca641bae6da9 ("staging: vc04_services: prevent integer overflow in create_pagelist()") Cc: stable <stable@vger.kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210927113702.3866843-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05staging: vchiq_arm: move platform structs to vchiq_arm.cStefan Wahren
After merging vchiq_2835_arm.c into vchiq_arm.c some platform structs doesn't need to exported anymore. So move them into the C file. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1633264369-998-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05staging: vchiq_arm: drop unnecessary declarationsStefan Wahren
vchiq_arm.h contains some unnecessary declarations, so drop them. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1633264369-998-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05staging: vchiq_arm: re-order vchiq_arm_init_stateStefan Wahren
This moves vchiq_arm_init_state() above its caller, so we can drop the now unnecessary forward declaration and make the function static. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1633264369-998-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: use __func__ to get function name in debug messageGaston Gonzalez
Avoid hardcoded function name using "%s", __func__. This prevents potential naming conflict if the function is eventually renamed. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-8-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: remove extra blank lineGaston Gonzalez
Remove unnecessary blank line. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-7-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: fix quoted strings split across linesGaston Gonzalez
Quoted strings should not be split across lines. As put it in Documentation/process/coding-style.rst: "never break user-visible strings such as printk messages because that breaks the ability to grep for them." Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-6-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: cleanup blank linesGaston Gonzalez
Remove unnecessary blank lines after open braces and before close braces. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-5-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: clarify multiplication expressionsGaston Gonzalez
Add spaces around '*' in multiplication expressions to enhance readability. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-4-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: remove unnecessary space in castGaston Gonzalez
As reported by checkpatch.pl, no space is necessary after a cast. Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-3-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: vchiq_arm: cleanup code alignment issuesGaston Gonzalez
Fix code alignment issues. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210919215914.539805-2-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: vchiq: cleanup code alignment issuesGaston Gonzalez
Fix code alignment issues. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210915202916.413914-3-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: vchiq: add braces to if blockGaston Gonzalez
The rule of not using braces in single statement does not apply if only one branch of the conditional statement is a single statement. Add braces to fix this. While at it, remove extra blank space after a comment inside the if block. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210915202916.413914-2-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: vchiq: remove braces from if blockGaston Gonzalez
Remove unnecessary braces from if block. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210915202916.413914-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: vchiq_dev: cleanup code alignment issuesGaston Gonzalez
Fix code alignment issues. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210912133751.269885-2-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: vchiq_dev: remove braces from if blockGaston Gonzalez
Remove unnecessary braces from if block. Reported by checkpatch.pl Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20210912133751.269885-1-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: vchiq: Replace function typedefs with equivalent declarationOjaswin Mujoo
Replace function typedefs with the equivalent declarations to better align with the linux kenel coding style The following typedefs were changed: * VCHIQ_CONNECTED_CALLBACK_T * vchiq_userdata_term Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/a8e4e0457b5fcc88c7f297f9d669dfb7e7d91ed5.1631366317.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: vchiq: convert to use a miscdeviceGreg Kroah-Hartman
Using a struct class, a cdev, and another device just for a single minor device is total overkill. Just use a dynamic misc device instead, saving lots of logic and memory. Cc: Nicolas Saenz Julienne <nsaenz@kernel.org> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Ojaswin Mujoo <ojaswin98@gmail.com> Cc: Phil Elwell <phil@raspberrypi.com> Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210907115045.2206083-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-10staging: vchiq: Add details to Kconfig help textsOjaswin Mujoo
Add some details to the Kconfig definitions of $CONFIG_VCHIQ_CDEV and $CONFIG_BCM2835_VCHIQ to help make the motive behind the configs a bit more clear. Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/ab88d3222088aca29a319147b50a9d1e9f0f8b81.1627925241.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-10staging: vchiq: Set $CONFIG_BCM2835_VCHIQ to imply $CONFIG_VCHIQ_CDEVOjaswin Mujoo
Before $CONFIG_VCHIQ_CDEV was defined, the vchiq cdev used to be created unconditionally when CONFIG_BCM2835_VCHIQ=y. When an earlier commit introduced the new config, its default behavior was set to disabled, which might surprise some unsuspecting users. Hence, modify CONFIG_BCM2835_VCHIQ to imply CONFIG_VCHIQ_CDEV Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/da53207b24bc37f166b05c6835087becdc6b5b4d.1627925241.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-29staging/vc04_services: Remove all strcpy() uses in favor of strscpy()Len Baker
strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors. The safe replacement is strscpy(). Signed-off-by: Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210718131217.3806-1-len.baker@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vchiq: Combine vchiq platform code into single fileOjaswin Mujoo
Combine the vchiq platform initialization code into a single file by merging vchiq_2835_arm.c into vchiq_arm.c Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/647cad50aa3306d1a49bacff76eaa3130fb363f4.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vchiq: Make creation of vchiq cdev optionalOjaswin Mujoo
Before this commit, vchiq cdev (/dev/vchiq) was always created during platform initialization. Introduce a new Kconfig option CONFIG_VCHIQ_CDEV which determines if the cdev will be created or not. Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/846c424dd4aae14d1cc28c8f30877a06e2b7dd10.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vchiq: Move vchiq char driver to its own fileOjaswin Mujoo
Split the initialization code of vchiq char driver and device files from that of vchiq platform. The char driver code now resides in vchiq_dev.c and the platform code resides in the original vchiq_arm.c file. This commit focuses on separating the code into different files while maintaining the same functionality. It does not completely decouple them as the cdev init code is still called from the platform's vchiq_probe() function. Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/ed53690e217f631b746aad0585fccaa6fb1453c1.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vchiq: Move certain declarations to vchiq_arm.hOjaswin Mujoo
Move certain declarations from vchiq_arm.c to vchiq_arm.h to allow code sharing. This will be useful when we eventually separate the vchiq char driver code from platform code, into its own file. Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/8abcbd9fb3227e2a78ccc4a1186c8c0801061a68.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vchiq: Refactor vchiq cdev codeOjaswin Mujoo
Move the vchiq cdev initialization code to its own function for better code organization. Call the initialization function during probe, thus shifting the whole cdev creation logic (which was earlier split in vchiq_probe() and vchiq_driver_init()) to vchiq_probe(). Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com> Link: https://lore.kernel.org/r/c0e538eb0644292a52267d39edd85ab2af9f9a4e.1626882325.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: bcm2835-audio: Enclose complex macro value in parenthesesDiego Roux
This patch fixes the checkpatch.pl error: ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Diego Roux <me@diegoroux04.dynv6.net> Link: https://lore.kernel.org/r/20210716024909.39411-1-me@diegoroux04.dynv6.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: introduce handle_pollStefan Wahren
The function slot_handler_func() has very deep indentations. Moving the poll handling into separate function could improve the readability. Use the return value to keep the poll_needed handling at the same place. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-17-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_connected: move EXPORT_SYMBOL below the right functionStefan Wahren
It's more intuitive to have the EXPORT_SYMBOL() call below the matching definition. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-16-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>