aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fwserial (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-06-12staging: rtl8712: Replace printk() with netdev_dbg()Fabio M. De Francesco1-1/+1
Replaced printk() with netdev_dbg() because the latter is preferred in network devices drivers. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210609135659.4054-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8723bs: os_dep: Remove conditions with no effectsFabio M. De Francesco1-10/+2
Removed conditions with no effects. Detected by Coccinelle. Deleted a variable that is no longer used because of the above-mentioned removals. Reviewed-by: Fabio Aiuto <fabioaiuto83@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210609132346.15403-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: gdm724x: emove redundant initialization of variable hci_lenColin Ian King1-1/+0
The variable hci_len is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210609120617.185975-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: delete some dead codeDan Carpenter1-4/+1
Calling rtw_free_xmitframe() with a NULL "pxmitframe" parameter is a no-op. It appears that originally this code was part of a loop but it was already dead code by the time that the driver was merged into the kernel. Fixes: 7bc88639ad36 ("staging: r8188eu: Add files for new driver - part 17") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5jFF9ldj0W9P1f@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in rtl8188eu_xmitframe_complete()Dan Carpenter1-5/+3
This loop calls rtw_free_xmitframe(pxmitpriv, pxmitframe) which removes "pxmitframe" (our list iterator) from the list. So to prevent a forever loop we need to use a safe list iterator. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i8W7BNla2DlrW@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in xmit_delivery_enabled_frames()Dan Carpenter1-6/+3
This loop calls list_del_init(&pxmitframe->list) and "pxmitframe" is the list iterator so it leads to a forever loop. We need to use a _safe() iterator to fix this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i5aVMQ3CZ5wuQ@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in wakeup_sta_to_xmit()Dan Carpenter1-10/+4
These two loops call list_del_init() on the list iterator so they need to use the _safe() iterator to prevent a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i1ZAAAB4vSWef@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue()Dan Carpenter1-5/+3
On some code paths the xmitframe_enqueue_for_sleeping_sta() function can call list_del_init(&pxmitframe->list) which would lead to a forever loop because "pxmitframe" is the list iterator. Use the _safe version of the iterator to prevent this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5ixzKaYKkpHhky@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in tx_beacon_hdl()Dan Carpenter1-7/+4
This loop calls list_del_init() on the list iterator so it has to use the _safe() iterator or it leads to an endless loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5iunD5ilf+mKPR@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in stop_ap_mode()Dan Carpenter1-6/+2
This loop calls list_del_init() on the list iterator so it can result in a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5ip4yz9NEB9RZO@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8723bs: use list_for_each_safe in loops deleting iterated itemsFabio Aiuto7-28/+28
Fix some beautified loops over linked lists. Use list_for_each_safe on loops which could delete objects in the list. Fixes: b3cd518c5abd ("staging: rtl8723bs: Use list iterators and helpers") Suggested-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Fabio Aiuto <fabioaiuto83@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/20210607134618.11237-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: Use eth_broadcast_addr() to assign broadcast addressLiu Shixin1-5/+3
Simplify the code by using eth_broadcast_addr() to assign broadcast address and removing the unnecessary variable bc_addr. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20210609085650.1269008-2-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: Use is_{zero/broadcast}_ether_addr() instead of memcmp()Liu Shixin4-13/+14
Simplify the code by using is_{zero/broadcast}_ether_addr() instead of directly using memcmp() to determine if the ethernet address is all zeros or broadcast address. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20210609085650.1269008-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: fpgaboot: change FPGA indirect article to anTom Rix1-1/+1
Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20210608212350.3029742-13-trix@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8723bs: hal: Delete tests with no effectsFabio M. De Francesco1-10/+2
Deleted tests with no effects. Detected by Coccinelle. It seems that these tests have been inadvertently left while removing BTC_PRINT logs in commit 8e30fb99d729. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210608112118.1213-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove unused function parameterMartin Kaiser1-2/+2
The loadparam function does not need a struct net_device. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use standard kthread handlingMartin Kaiser3-18/+14
The driver defines its own completion to wait until the command thread is stopped. Use kthread_stop instead and check kthread_should_stop in the thread's main loop. (For now, we keep the driver's "emergency exit" via bDriverStopped/bSurpriseRemoved.) To check if the command thread is running, the driver stores the thread's task_struct and a boolean status variable. Remove this status and check the task_struct directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use existing define for ethernet header lenMartin Kaiser1-2/+2
Replace the driver's internal define with ETH_HLEN. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from usb_ops_linux.cMartin Kaiser1-122/+8
As said elsewhere, these prints are disabled by default. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: simplify rtw_get_wireless_statsMartin Kaiser1-11/+4
Remove unnecessary temporary variables. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: make rtw_free_recvframe return voidMartin Kaiser2-7/+4
None of the callers checks the return value of rtw_free_recvframe. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: refactor rtw_lps_ctrl_wk_cmdMartin Kaiser1-27/+16
Allocate memory only if we're asked to enqueue the command for later processing. Handle memory allocation failures in one place. There's no need to "goto exit" if we're not doing any cleanup there. kzalloc already set all of pdrvextra_cmd_parm to 0. We don't have to set pdrvextra_cmd_parm->pbuf = NULL manually. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from rtw_cmd.cMartin Kaiser1-73/+4
The rtl8188eu driver implements driver-specific debug prints which use their own definitions for debug levels. By default, these prints are disabled. You'd have to modify the code or set a module parameter to enable them. The rtl8723bs staging driver has already removed those prints. We should do the same. Let's start with removing RT_TRACE and DBG_88E prints from rtw_cmd.c. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove unused RT_PRINT_DATA macroMartin Kaiser1-18/+0
The RT_PRINT_DATA macro is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: make use of 'pcie_port_write'Sergio Paracuellos1-8/+4
Function 'mt7621_pcie_enable_port' is calculating an offset to write some port related registers. Instead of doing that just make use of already existent 'pcie_write_port' function and use virtualy mapped base address with registers. This increase readability and allow us to remove also two defitions not used else where. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-7-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: parse some dt properties from root port child nodesSergio Paracuellos1-11/+38
Properties 'clocks', 'resets' and 'phys' have been moved from parent node to the root port children. Hence we have to adapt the way device tree is parsed in driver code to properly align things and make all the stuff work. Note that we moved from using 'devm_reset_control_get_exclusive() to 'of_reset_control_get_exclusive()' so we need to properly call the 'reset_control_put()' function manually in error and remove paths. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-6-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-dts: move some properties into root port child nodesSergio Paracuellos1-9/+12
After a review of the bindings 'clocks', 'resets' and 'phys' must be moved into root port child nodes. Hence, move all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: use {readl|writel}_relaxed instead of readl/writelSergio Paracuellos1-7/+7
The driver does not perform DMA, so it's safe to use the relaxed version for both readl and writel operations. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: remove 'RALINK_PCI_BAR0SETUP_ADDR' definitionSergio Paracuellos1-2/+1
Instead of define RALINK_PCI_BAR0SETUP_ADDR just use standard pci defnition for this which is 'PCI_BASE_ADDRESS_0'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: make cleaner 'mt7621_pcie_enable_ports'Sergio Paracuellos1-16/+8
Function 'mt7621_pcie_enable_ports' call 'mt7621_pcie_enable_port' for each available pcie port. Instead of having two for loops there just move needed initialization. There is one setting that can be removed which is the set for 'PCI_COMMAND_MASTER' bit. Pci drivers are in charge of set that bit if is really needed and should be not a mission of the controller to do that. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8712: Remove unnecessary alias of printk()Fabio M. De Francesco2-24/+1
This module defines four alias for printk(). Removed them all, because they are not used anywhere else in the driver. Converted the only exception to the explicit use of printk(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210606034038.9657-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-07i2c: core: Add stub for i2c_verify_client() if !CONFIG_I2CJonathan Cameron1-1/+7
If I2C is not compiled, there is no way we should see a call to i2c_verify_client() on a device that is an i2c client. As such, provide a stub to return NULL to resolve an associated build failure. The build is failing with this link error ld: fxls8962af-core.o: in function `fxls8962af_fifo_transfer': fxls8962af-core.c: undefined reference to `i2c_verify_client' Reported-by: Tom Rix <trix@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Reviewed-by: Sean Nyekjaer <sean@geanix.com> Acked-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20210603165835.3594557-1-jic23@kernel.org
2021-06-04staging: vchiq_core: introduce handle_pollStefan Wahren1-40/+52
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 Wahren1-1/+1
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 Wahren1-16/+12
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 Wahren1-76/+70
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 Wahren1-60/+64
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 Wahren3-41/+41
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 Wahren1-6/+6
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 Wahren1-35/+29
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 Wahren1-2/+4
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 Wahren1-7/+7
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 Wahren1-6/+6
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 Wahren3-12/+7
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 Wahren2-11/+13
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>
2021-06-04staging: vchiq_core: move internals to C sourceStefan Wahren2-61/+61
There is no need to export those definitions, so keep them in the source file. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_arm: introduce free_bulk_waiterStefan Wahren1-21/+16
Avoid the copy & paste of freeing the bulk waiter and move it into a separate function. Found by CPD. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: vchiq_core: fix logic in poll_services_of_groupStefan Wahren1-15/+13
Commit "staging: vchiq_core: avoid indention in poll_services_of_group" tries to reduce the indention, but the parts regarding the third if statement breaks the logic. So restore them and prevent vchiq_test from hanging during the ping test. Fixes: 2f440843a7d4 ("staging: vchiq_core: avoid indention in poll_services_of_group") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04staging: mt7621-dts: review pcie overlay in 'gbpc1' dts fileSergio Paracuellos1-6/+0
pcie node is being overlayed in 'gbpc1.dts' file requesting three gpio reset pins for each pcie port. Gnubee only needs general gpio 19 to properly reset and make all of them work. This pin is already requested in the general 'mt7621.dtsi' file as well as is the pinctrl pins. So we only need to enable the node in the overlay and all the other stuff can be safely deleted. Also, pin 8 is being requested for gpio-leds node and there was an error on boot before this changes because of pin was already assigned (EBUSY): leds-gpio: probe of gpio-leds failed with error -16 With this changes this error has disappear and the board is properly booting without any other regression. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210604063031.13599-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-04iio: adis: Cleanout unused headersJonathan Cameron11-47/+0
0-day recently added the include-what-you-use header checker and it gave a warning on an adis patch. As such I decided to run it on all the adis drivers and see if it made sensible suggestions. Note this doesn't represent a complete list of what it suggested changing as I filtered out a few on the basis they are standard headers used to effectively include a bunch of other headers. Could split this into a patch per driver if people prefer. Note to anyone else trying this tool is that it is somewhat of a loose cannon so you will be wanting to carefully check any suggestions before proposing patches! I thought about also reorganising the headers whilst here, but that would make this patch harder to read, or lead to another rather noisy patch across most of the files. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210603193616.3708447-1-jic23@kernel.org