1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
Commit graph

1264999 commits

Author SHA1 Message Date
Tree Davies
571acd1719 Staging: rtl8192e: Rename variable AdvCoding
Rename variable AdvCoding to adv_coding
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-7-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Tree Davies
b5c085767b Staging: rtl8192e: Rename variable ChlWidth
Rename variable ChlWidth to chl_width
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Tree Davies
fb3ac10f25 Staging: rtl8192e: Rename variable LSigTxopProtect
Rename variable LSigTxopProtect to lsig_txop_protect
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Tree Davies
b45d48dcb1 Staging: rtl8192e: Rename variable OptMode
Rename variable OptMode to opt_mode
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Tree Davies
f72a077852 Staging: rtl8192e: Rename variable CurrentAMPDUFactor
Rename variable CurrentAMPDUFactor to current_ampdu_factor
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Tree Davies
01742a4052 Staging: rtl8192e: Rename variable CurSTAExtChnlOffset
Rename variable CurSTAExtChnlOffset to cur_sta_ext_chnl_offset
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240428230106.6548-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:41:00 +02:00
Andy Shevchenko
aae7272403 fbtft: seps525: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20240423173623.2748621-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-04 18:39:24 +02:00
Umang Jain
75ff53c44f staging: vc04_services: Drop completed TODO item
The memory barrier comments are added in
commit f6c99d8624 ("staging: vchiq_arm: Add missing memory barrier comments")

Drop the respective item from the TODO list.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-12-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:33 +02:00
Umang Jain
42a2f6664e staging: vc04_services: Move global g_state to vchiq_state
The patch intended to drop the g_state pointer.
g_state is supposed to be a central place to track the state
via vchiq_state. This is now moved to be contained in the
struct vchiq_drv_mgmt. As a result vchiq_get_state() is also removed.

In order to have access to vchiq_drv_mgmt, vchiq_initialise()
and vchiq_mmal_init() are modified to receive a struct device pointer
as one of their function parameter

The vchiq_state pointer is now passed directly to
vchiq_dump_platform_instances() to get access to the state instead
getting it via vchiq_get_state().

For the char device, struct miscdevice is retrieved by struct file's
private data in vchiq_open and struct vchiq_drv_mgmt is retrieved
thereafter.

Removal of global variable members is now addressed hence, drop
the corresponding item from the TODO list.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-11-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:33 +02:00
Umang Jain
7f56c601ca staging: vc04_services: vchiq_mmal: Rename service_callback()
Rename the service_callback static function to mmal_service_callback()
since the function signature conflicts with:

extern int
service_callback(struct vchiq_instance *vchiq_instance, enum vchiq_reason reason,
                 struct vchiq_header *header, unsigned int handle, void *bulk_userdata);

in vc04_services/interface/vchiq_arm/vchiq_arm.h

In a subsequent patch, we will include vchiq_arm.h header to
mmal-vchiq.c, which will then complain of this conflict. Hence,
this patch is meant to handle the conflict beforehand.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-10-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:33 +02:00
Umang Jain
12cc5f92c1 staging: vc04_services: Move spinlocks to vchiq_state
The msg_queue_spinlock, quota_spinlock and bulk_waiter_spinlock
are allocated globally. Instead move them to struct vchiq_state
and initialise them in vchiq_init_state().

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-9-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:33 +02:00
Umang Jain
6d0ef3214d staging: vc04_services: Move global memory mapped pointer
g_regs stores the remapped memory pointer for the vchiq platform.
It can be moved to struct vchiq_drv_mgmt instead of being global.

Adjust the affected functions accordingly. Pass vchiq_state pointer
wherever necessary to access struct vchiq_drv_mgmt.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-8-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:33 +02:00
Umang Jain
39fbff9dfc staging: vc04_services: Move global variables tracking allocated pages
The variables tracking allocated pages fragments in vchiq_arm.c
can be easily moved to struct vchiq_drv_mgmt instead of being global.
This helps us to drop the non-essential global variables in the vchiq
interface.

No functional changes intended in this patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-7-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Umang Jain
f875976ecf staging: vc04_services: Drop vchiq_connected.[ch] files
The vchiq_connected.[ch] just implements two function:

- vchiq_add_connected_callback()
- vchiq_call_connected_callbacks()

for the deferred vchiq callbacks. Those can easily live in
vchiq_arm.[ch], hence move them. This allows making the
vchiq_call_connected_callbacks() function static.

The move doesn't copy over MAX_CALLBACKS because it is the same as
VCHIQ_DRV_MAX_CALLBACKS. Hence, it now being used in
vchiq_add_connected_callback().

No functional changes intended in this patch.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-6-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Umang Jain
e1c0af4f3c staging: vc04_services: Move variables for tracking connections
Connections to the vchiq driver are tracked using global variables.
Drop those and introduce them as members of struct vchiq_drv_mgmt.
Hence, struct vchiq_drv_mgmt will be used to track the connections.

Also, store a vchiq_drv_mgmt pointer to struct vchiq_device to
have easy access to struct vchiq_drv_mgmt across vchiq devices.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240412075743.60712-5-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Umang Jain
8c9753f639 staging: vc04_services: vchiq_arm: Drop g_cache_line_size
The cache-line-size is cached in struct vchiq_platform_info.
There is no need to cache this again via g_cache_line_size
and use it. Instead use the value from vchiq_platform_info directly.

While at it, move the comment about L2 cache line size in the kerneldoc
block of struct vchiq_platform_info.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-4-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Umang Jain
1c9e16b731 staging: vc04_services: vchiq_arm: Split driver static and runtime data
vchiq_drvdata combines two types of book-keeping data. There is
platform-specific static data (for e.g. cache lines size) and then
data needed for book-keeping at runtime.

Split the data into two structures: struct vchiq_platform_info and
struct vchiq_drv_mgmt. The vchiq_drv_mgmt is allocated at runtime
during probe and will be extended in subsequent patches to remove
all global variables allocated.

No functional changes intended in this patch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Umang Jain
e82b22539a staging: vc04_services: Drop g_once_init global variable
g_once_init is not used in a meaningful way anywhere. Drop it
along with connected_init() which sets it.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240412075743.60712-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:53:32 +02:00
Sumadhura Kalyan
e0279bb86b staging: vc04_services: Re-align function parameters
Checkpatch complains that:

CHECK: Lines should not end with a '('
+typedef void (*vchiq_mmal_buffer_cb)(

Re-align the function parameters to make checkpatch happy.

Signed-off-by: Sumadhura Kalyan <opensourcecond@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240415171138.5849-1-opensourcecond@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:52:58 +02:00
Stefan Wahren
acf2192167 staging: vchiq: Reformat Kconfig help texts
The lines in the VCHIQ Kconfig help texts are too long, which makes
it hard to read the menuconfig. So reformat them to restore the
readability.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240414192257.6011-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-18 16:52:46 +02:00
Marc Dietrich
e4d5e3a9ae staging: nvec: update TODO
Remove isr delay from the bill.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-6-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-11 13:59:31 +02:00
Marc Dietrich
395e9164bf staging: nvec: make touchpad init synchronous
Currently, we are constantly sending commands to the EC without waiting for them to be
executed. For the touchpad initialization this only worked because we were waiting 200 µs
between each submitted command byte, so the EC had enough time to execute. In the furture
we like to avoid this delay, so we need to wait for each command to be executed first.
Do this by switching from asynchronous to synchronous command transmission.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-4-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-11 13:59:19 +02:00
Marc Dietrich
41288dfaf1 staging: nvec: make keyboard init synchronous
Currently, we are constantly sending commands to the EC without waiting for them to be
executed. This can lead to confusion, especially if we initialize several different devices
one after the other.
To avoid this, we are switching from asynchronous to synchronous command transmission.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-3-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-11 13:59:19 +02:00
Marc Dietrich
244b6e92bd staging: nvec: add ability to ignore EC responses in sync writes
In case we just want to submit a message to the EC but are not
interested in its response, we can free the response buffer early.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Link: https://lore.kernel.org/r/20240406123123.37148-2-marvin24@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-11 13:59:19 +02:00
Arnd Bergmann
18f44de63f staging: greybus: change strncpy() to strscpy_pad()
gcc-10 warns about a strncpy() that does not enforce zero-termination:

In file included from include/linux/string.h:369,
                 from drivers/staging/greybus/fw-management.c:9:
In function 'strncpy',
    inlined from 'fw_mgmt_backend_fw_update_operation' at drivers/staging/greybus/fw-management.c:306:2:
include/linux/fortify-string.h:108:30: error: '__builtin_strncpy' specified bound 10 equals destination size [-Werror=stringop-truncation]
  108 | #define __underlying_strncpy __builtin_strncpy
      |                              ^
include/linux/fortify-string.h:187:9: note: in expansion of macro '__underlying_strncpy'
  187 |  return __underlying_strncpy(p, q, size);
      |         ^~~~~~~~~~~~~~~~~~~~

For some reason, I cannot reproduce this with gcc-9 or gcc-11, and I only
get a warning for one of the four related strncpy()s, so I'm not
sure what's going on.

Change all four to strscpy_pad(), which is the safest replacement here,
as it avoids ending up with uninitialized stack data in the tag name.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://github.com/KSPP/linux/issues/90 [1]
Link: https://lore.kernel.org/r/20240408194821.3183462-3-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:53:50 +02:00
Arnd Bergmann
c3a8f7dfc7 staging: rtl8723bs: convert strncpy to strscpy
gcc-9 complains about a possibly unterminated string in the strncpy() destination:

In function 'rtw_cfg80211_add_monitor_if',
    inlined from 'cfg80211_rtw_add_virtual_intf' at drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2209:9:
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2146:2: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
 2146 |  strncpy(mon_ndev->name, name, IFNAMSIZ);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This one is a false-positive because of the explicit termination in the following
line, and recent versions of clang and gcc no longer warn about this.

Interestingly, the other strncpy() in this file is missing a termination but
does not produce a warning, possibly because of the type confusion and the
cast between u8 and char.

Change both strncpy() instances to strscpy(), which avoids the warning as well
as the possibly missing termination. No additional padding is needed here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://github.com/KSPP/linux/issues/90
Reviewed-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240408194821.3183462-2-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:53:50 +02:00
Arnd Bergmann
1b61680cfe staging: rts5208: replace weird strncpy() with memcpy()
When -Wstringop-truncation is enabled, gcc finds a function that
always does a short copy:

In function 'inquiry',
    inlined from 'rtsx_scsi_handler' at drivers/staging/rts5208/rtsx_scsi.c:3210:12:
drivers/staging/rts5208/rtsx_scsi.c:526:17: error: 'strncpy' output truncated copying between 1 and 28 bytes from a string of length 28 [-Werror=stringop-truncation]
  526 |                 strncpy(buf + 8, inquiry_string, sendbytes - 8);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The code originally had a memcpy() that would overread the source string,
and commit 88a5b39b69 ("staging/rts5208: Fix read overflow in memcpy")
fixed this but introduced the warning about truncation in the process.

As Dan points out, the final space in the inquiry_string always gets
cut off, so remove it here for clarity, leaving exactly the 28 non-NUL
characters that can get copied into the output. In the 'pro_formatter_flag'
this is followed by another 20 bytes from the 'formatter_inquiry_str'
array, but there the output never contains a NUL-termination, and the
length is known, so memcpy() is the more logical choice.

Cc: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/lkml/695be581-548f-4e5e-a211-5f3b95568e77@moroto.mountain/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240408194821.3183462-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:53:50 +02:00
Jackson Chui
bef4c8939d staging: greybus: Replace gcam macros with direct dev log calls
Reported by checkpatch:

CHECK: Macro argument 'gcam' may be better as '(gcam)' to avoid
precedence issues

Inline standard calls to 'dev_*' kernel logging functions, in favor
of 'gcam_*' macros, to clear up gcam-related logging.

Signed-off-by: Jackson Chui <jacksonchui.qwerty@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ZhRzWNiak1qOdJLL@jc-ubuntu-dev-korn-1
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:32 +02:00
Meir Elisha
e945c43df6 Staging: rtl8723bs: Delete dead code from update_current_network()
Remove dead code from rtw_mlme.c in order to improve code readability.

Signed-off-by: Meir Elisha <meir6264@gmail.com>
Link: https://lore.kernel.org/r/20240407123836.115055-1-meir6264@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:23 +02:00
Shahar Avidar
e68e319fc9 staging: pi433: Reorder pi433_exit cleanup calls.
debugfs_remove was called out of order.
Ensure pi433 init & exit have reverse function calls order.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-8-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:14 +02:00
Shahar Avidar
78d17ecffc staging: pi433: Add debugfs_remove in case of driver register fails.
debugfs resources were never cleaned in case of failure to register driver.

Reported-by Dan Carpenter <dan.carpenter@linaro.org>

Fixes: 4ef027d5a3 ("staging: pi433: add debugfs interface")
Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-7-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:14 +02:00
Shahar Avidar
bd9ea55b22 staging: pi433: Remove duplicated code using the "goto" error recovery scheme.
pi433_init had "unregister_chrdev" called twice.
Remove it using goto statements.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-6-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:13 +02:00
Shahar Avidar
494566f7a5 staging: pi433: Rename "pi433_dev" of type "dev_t" to "pi433_devt"
Distinguish struct device type instances from dev_t instances
to enhance readability.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-5-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:13 +02:00
Shahar Avidar
cdcf3051f0 staging: pi433: Replace pi433_receive param void type to struct pi433_device.
pi433_receive is only called once.
It immediately assigns the data param to a struct pi433_device.
Rename param name to pi433.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-4-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:13 +02:00
Shahar Avidar
6f85a70352 staging: pi433: Rename struct pi433_device instances to pi433.
Just as other devices use specific names for instantiation,
struct_pi433 should also have a distinct name.
Moreover, some other structs use the "dev" or "device" in their naming
conventions for members, which can be confusing.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-3-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:13 +02:00
Shahar Avidar
80f91c8237 staging: pi433: Rename struct pi433_device buffer field to tx_buffer.
Driver holds buffers in different structs, as does the HW.
Using explicit names for buffers increases readability.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240405074000.3481217-2-ikobh7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:13 +02:00
Philipp Hortmann
ed394dbf53 MAINTAINERS: vt665?: Replace Forest with Philipp as maintainer
Remove Forest Bond <forest@alittletooquiet.net> as maintainer as this
email address is not reachable anymore. Add me as I want to take care
of the driver and I do have vt6655 and vt6656 hardware to test.

Link: https://lore.kernel.org/linux-staging/d599cd7b-a5d6-4f2d-8744-10254b75f7e5@moroto.mountain/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240404202450.GA23408@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:52:07 +02:00
Prasad Pandit
98b6073d7a staging: bcm2835-audio: add terminating new line to Kconfig
Add terminating new line to the Kconfig file. It helps while
displaying file with cat(1) command.

Signed-off-by: Prasad Pandit <pjp@fedoraproject.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Acked-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240330040411.3273337-1-ppandit@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:51:53 +02:00
Arnd Bergmann
6a0b8c0da8 greybus: arche-ctrl: move device table to its right location
The arche-ctrl has two platform drivers and three of_device_id tables,
but one table is only used for the the module loader, while the other
two seem to be associated with their drivers.

This leads to a W=1 warning when the driver is built-in:

drivers/staging/greybus/arche-platform.c:623:34: error: 'arche_combined_id' defined but not used [-Werror=unused-const-variable=]
  623 | static const struct of_device_id arche_combined_id[] = {

Drop the extra table and register both tables that are actually
used as the ones for the module loader instead.

Fixes: 7b62b61c75 ("greybus: arche-ctrl: Don't expose driver internals to arche-platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-18-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:51:31 +02:00
Dorine Tipo
33a470713a staging: nvec: Fix documentation typo in nvec.c
This commit corrects the spelling of "initialisation" which was
misspelled as "intialisation" in the irqreturn_t nvec_interrupt()
documentation.
The issue was found using checkpatch.

Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
Link: https://lore.kernel.org/r/20240331170548.81409-1-dorine.a.tipo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:51:16 +02:00
Colin Ian King
fdb43d131f staging: vt6655: remove redundant assignment to variable byData
Variable byData is being assigned a value that is never read, it is
being re-assigned later on. The assignment is redundant and can be
removed.

Cleans up clang scan build warning:
drivers/staging/vt6655/srom.c:67:2: warning: Value stored to 'byData'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240328111557.761380-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:51:06 +02:00
Umang Jain
ebee9ca2f5 Revert "staging: vc04_services: vchiq_core: Stop kthreads on shutdown"
This reverts commit d9c60badcc.

It has been reported that stopping kthreads corrupts the VC04 firmware
and creates issues at boot time [1].

A fix-up version of this patch
bac670144384 ("staging: vc04_services: Stop kthreads on .remove") [2]
was also attempted but it also doesn't properly fix the TODO
(i.e. clean module unload) and similar errors were observed when
stopping these khthreads on RaspberryPi 3.

Hence, revert the entire patch for now since it is not very clear why
stopping the kthreads breaks the firmware.

[1]: https://lore.kernel.org/linux-staging/CAPY8ntBaz_RGr2sboQqbuUv+xZNfRct6-sckDLYPTig_HWyXEw@mail.gmail.com/t/#me90b9a9bc91599f18cd65ceb7eedd40e5fee0cdd

[2]: https://lore.kernel.org/linux-staging/171161507013.3072637.12125782507523919379@ping.linuxembedded.co.uk/T/#m1d3de7d2fa73b2447274858353bbd4a0c3a8ba14

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20240403052100.2794-1-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:45:17 +02:00
Krzysztof Kozlowski
883295e948 staging: ks7010: replace open-coded module_sdio_driver()
Use module_sdio_driver() instead of open-coding it.  No functional
difference.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240329171057.63941-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:45:14 +02:00
Michael Straube
30b6e72b15 staging: rtl8192e: remove unnecessary wrapper
_rtl92e_dm_ctrl_initgain_byrssi() is just a wrapper around
_rtl92e_dm_ctrl_initgain_byrssi_driver(). Using a wrapper here adds
no value, remove it. Keep the name _rtl92e_dm_ctrl_initgain_byrssi().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240329111458.14961-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:45:12 +02:00
Krzysztof Kozlowski
9d343b597f staging: pi433: drop driver owner assignment
Core in spi_register_driver() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240327174724.519607-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:45:09 +02:00
Uri Arev
9643ce5e28 staging: axis-fifo: Fix indentation
Warning reported by checkpatch.pl script:

CHECK: Alignment should match open parenthesis

Signed-off-by: Uri Arev <me@wantyapps.xyz>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://lore.kernel.org/r/20240305211416.755911-1-me@wantyapps.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-09 17:44:54 +02:00
Greg Kroah-Hartman
a103e5ad21 Merge 6.9-rc2 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-01 17:05:28 +02:00
Linus Torvalds
39cd87c4eb Linux 6.9-rc2 2024-03-31 14:32:39 -07:00
Linus Torvalds
7e40c2100c Kbuild fixes for v6.9
- Deduplicate Kconfig entries for CONFIG_CXL_PMU
 
  - Fix unselectable choice entry in MIPS Kconfig, and forbid this
    structure
 
  - Remove unused include/asm-generic/export.h
 
  - Fix a NULL pointer dereference bug in modpost
 
  - Enable -Woverride-init warning consistently with W=1
 
  - Drop KCSAN flags from *.mod.c files
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmYJVK0VHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGf/sP/3GOk//cQGwPyWCgtCEUo6T4yyD7
 1m2TTR0JQk/lcohSFtYk0I20rhKRqU6yAMAERmyehI66D2QY7lhiYVc16ram5y04
 x0nWxd9IqerIlGJtaWePOvNqKdCw2EP9fS9NKz58rEDMGlsSf0Rd3NEdSsWoH8td
 dECtt8yCawENAMStb/rAfsnL6kn2JIhVMyqwo0RdQfiaVT5Zk6Qgpko0Oq0ncRP2
 qdNgHbvnJdKMy81FHSBAi0QEZOYvhFNX+E+6lFfWEsX6xT+wvXddCNQzJf/YV3Cw
 Klw1tGveV7UGzlZ4fsnFrv4V6g1KO2AD3342efdDo++ypBEBpImVODc+Rp0jE9Nk
 OgdOQRe2k9a5keH0LWY0ehvDbQlSbfNxk0wNtAfo5Kk5e41nHmHJBWCwGG+cXrjJ
 mPJjSrTpuNVSaGV0kt3EskHbDBeBmIIg+5QPbldmW2qcC88kWoavkyLD3WPFsg/a
 CAuR/HqH7MDfxzvsqTCjonlVcyDKX6aW66LrQ1NCtmphI4F8mdKp746CzGlziuIm
 gjYJL/UWVlx0VebMo8dwDpaHvez4/4s6xAJcyqtA+TS5HbrQWKQuwFkiv4iWQxNd
 MvyVdzgKhcMdoXhfFpUZ0LlFvHGefJ+Z6N1FQLoQJkTirt5aqRbEAjP0VXwQB4eH
 zYygkhvvtiH9/STu
 =tx+2
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Deduplicate Kconfig entries for CONFIG_CXL_PMU

 - Fix unselectable choice entry in MIPS Kconfig, and forbid this
   structure

 - Remove unused include/asm-generic/export.h

 - Fix a NULL pointer dereference bug in modpost

 - Enable -Woverride-init warning consistently with W=1

 - Drop KCSAN flags from *.mod.c files

* tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: Fix typo HEIGTH to HEIGHT
  Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
  kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
  kbuild: make -Woverride-init warnings more consistent
  modpost: do not make find_tosym() return NULL
  export.h: remove include/asm-generic/export.h
  kconfig: do not reparent the menu inside a choice block
  MIPS: move unselectable FIT_IMAGE_FDT_EPM5 out of the "System type" choice
  cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig
2024-03-31 11:23:51 -07:00
Linus Torvalds
18737353cc - Fix more issues in the AMD FMPM driver
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmYJSoQACgkQEsHwGGHe
 VUqGSxAAoEgLUz3A3rxPhUQ4P6ZCNYRIOV+/877EaADCE0FhBnxUVbtxxYMbfnjD
 vZ1AsMH9KpZzIGkUJk9501p7yD5Vdgrqwl8A3+zcs52BpXj+1y5dnb74AVN9dLaQ
 f0zfvcJorSL4MjHZ04EdgU6ZSYN3O60LzA8zYVDEki1uVru3CIrJzlKB5fjuFd8h
 Of17FuL1Tx/CyrLwxfv1O2drYGtjGw+OkIDiw/NZs4lr9+eA5xSxlS/aoipmN6aZ
 F0TajJMjk5ME33mRYasBfprlB8CI7OkuZi0DvMALH1FjsW8mRon+qQ0QDuaoWoKN
 rdubBoufHokbJ+oAt8inytNAXaTIj0AMDESP4gG4olaPXR41nTlE6ur1bzGbrfRC
 g6FABAMIK/sgeMIZPT9Tu08G7j/QgaKFB9U8V5YNir9eruA6rAsfGVB4M7FHy+tX
 zlx0nIZAYyqTLG9PlawnnNFh+IzLmwjB4vDwwbN7Jx0G0iU/FVdjgdtyLXezYMtd
 QA1JFbai0irAQUCNoVIhiq8pCEbnvfq+pc6JQ9mnvhwJZrMuN+eXj4XBPPmQHN45
 p9yZiNf09jPtV6B3HeLQc+PmOG5kKz+vfyAq7LuWtyFLvVEztssmsOSjx/cDn+xf
 MeXL8q+8GnsaZD5kKr6oBPDYrOT0ebML9A+Qq6V4OEJhGmo8ErI=
 =EzDx
 -----END PGP SIGNATURE-----

Merge tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Fix more issues in the AMD FMPM driver

* tag 'edac_urgent_for_v6.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  RAS: Avoid build errors when CONFIG_DEBUG_FS=n
  RAS/AMD/FMPM: Safely handle saved records of various sizes
  RAS/AMD/FMPM: Avoid NULL ptr deref in get_saved_records()
2024-03-31 11:15:32 -07:00