summaryrefslogtreecommitdiff
path: root/drivers/staging/vc04_services
AgeCommit message (Collapse)Author
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>
2021-06-04staging: vchiq_core: store message id in local variableStefan Wahren
Some queue_message() calls are still rather complex to read. So store the message ids in a local variable in those cases. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-15-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: reduce indentation in parse_openStefan Wahren
The function parse_open() already has bail out sections like fail_open. So use a goto for the other error cases like payload size is too small and listening service cannot be found. This avoids two indentation levels. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-14-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: introduce process_free_data_messageStefan Wahren
This moves the special handling for data messages from process_free_queue() into a new function. After this process_free_queue() has less extreme indentation and should be easier to read. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-13-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_arm: tidy up service function namingStefan Wahren
During a recent review Dan Carpenter reported that the function naming of (un)lock_service is misleading. They are like wrapper around kref_get / kref_put and don't have anything to do with locking. So use a name which represent more the actual behavior. Btw add the vchiq prefix to avoid possible name conflicts. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-12-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: simplify WARN_ON conditionsStefan Wahren
During a recent review Dan Carpenter noticed a double negation in a WARN_ON. But a quick search revealed more unnecessary complex WARN_ON conditions. This change should simplify them. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: introduce message specific make macrosStefan Wahren
VCHIQ_MAKE_MSG isn't optimal because a lot of message types doesn't need a parameter. So better define a macro for every message type which is used. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: use define for message type shiftStefan Wahren
Make it clear and use a define for shifting the message type. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: avoid precedence issuesStefan Wahren
Add () around macro argument to avoid precedence issues Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: put spaces around operatorsStefan Wahren
This fixes the checkpatch issues regarding missing spaces around operators. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: get the rid of vchiq_static_assertStefan Wahren
Use static_assert from the kernel instead of opencode it. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: get the rid of IS_POW2Stefan Wahren
The macro IS_POW2 is only used to ensure some size are powers of 2. Better use BUILD_BUG_ON_NOT_POWER_OF_2 for this. Since this must be done in a function, merge all these checks in a new function. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>