The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.) Remove them all at this point in time to
make sure the build works properly.
The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.) Remove them all at this point in time to
make sure the build works properly.
The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.) Remove them all at this point in time to
make sure the build works properly.
The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.) Remove them all at this point in time to
make sure the build works properly.
The patch series that removed typedefs from the octeon driver was not
actually built properly, and broke the build (it's hard to test-build
this driver for some reason.) Remove them all at this point in time to
make sure the build works properly.
Uwe Kleine-König [Thu, 26 Oct 2023 21:44:08 +0000 (23:44 +0200)]
staging: fbtft: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
The function fbtft_driver_remove_pdev() (that exists several times as it's
part of a macro expansion) returns zero unconditionally, so it can be
trivially converted to return void without semantic changes.
Heiner Kallweit [Thu, 26 Oct 2023 20:49:21 +0000 (22:49 +0200)]
staging: olpc_dcon: Remove I2C_CLASS_DDC support
olpc_dcon is the only remaining i2c client device driver declaring
I2C_CLASS_DDC support after the legacy eeprom driver has been removed.
olpc_dcon is only used on olpc devices, connected to an i2c adapter
driven by scx200_acb. This adapter driver declares support for
I2C_CLASS_HWMON and I2C_CLASS_SPD. Therefore we can safely drop
I2C_CLASS_DDC support in olpc_dcon.
That's the last step before I2C_CLASS_DDC can be removed in general.
This patch is solely based on documentation, and I don't have an olpc
device for testing. Therefore some testing would be appreciated before
patch is applied.
Umang Jain [Wed, 25 Oct 2023 06:07:17 +0000 (02:07 -0400)]
staging: vc04_services: Use %p4cc format modifier to print FourCC codes
Drop VCHIQ_FOURCC_AS_4CHARS macro in favour of %p4cc format
modifier to print FourCC codes in the logs.
vchiq_use_internal() and vchiq_release_internal() uses entity
character-array to store a transient string that contains
a FourCC code. Increase the length of entity array(to 64 bytes)
since %p4cc requires more bytes to hold the output characters.
Umang Jain [Tue, 24 Oct 2023 11:44:28 +0000 (07:44 -0400)]
staging: vc04_services: Drop log level mechanisms
Drop the log level remnants since the logs are now ported to use
dynamic logging. Drop macros, externs and global variables which
were used in the log level mechanisms along with debugfs log entries.
Umang Jain [Tue, 24 Oct 2023 11:44:26 +0000 (07:44 -0400)]
staging: vc04: Convert vchiq_log_trace() to use dynamic debug
Move vchiq_log_trace() custom logging wrapper based on printk
to use dynamic debug. The log category is dictated by enum
vchiq_log_category which will become the part of the trace
string format that will be logged to dynamic debug (for grep).
All the vchiq_log_trace() calls are adjusted to use the
modified wrapper.
Umang Jain [Tue, 24 Oct 2023 11:44:25 +0000 (07:44 -0400)]
staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug
Convert(and rename) vchiq_log_info() custom logging wrapping based on
printk to use dynamic debug. The wrapper is now renamed to
vchiq_log_debug() since most of the usage is around printing debug
information. The log category is dictated by enum vchiq_log_category
which will become the part of the debug string format that will be
logged to dynamic debug (for grep).
All the vchiq_log_info() calls are adjusted to use the
modified wrapper vchiq_log_debug().
The existing custom logging for vchiq_log_info() also tries
to log trace messages using SRVTRACE_LEVEL. This is simply
moved to use the vchiq_log_debug() directly.
Umang Jain [Tue, 24 Oct 2023 11:44:24 +0000 (07:44 -0400)]
staging: vc04: Convert vchiq_log_warning() to use dynamic debug
Move vchiq_log_warning() custom logging wrapper based on printk to use
dynamic debug. The log category is dictated by vchiq_log_category
which will become the part of the warning string format that will be
logged to dynamic debug (for grep).
All the vchiq_log_warning() calls are adjusted to use the
modified wrapper.
While at that, remove the extraneous "----" from few of the
warning string text.
Umang Jain [Tue, 24 Oct 2023 11:44:23 +0000 (07:44 -0400)]
staging: vc04: Convert vchiq_log_error() to use dynamic debug
Move vchiq_log_error() custom logging wrapper based on printk,
to use dynamic debug. To categorise, enum vchiq_log_category
has been introduced, which will become the part of the error
string format that will be logged to dynamic debug (for grep).
All the vchiq_log_error() calls are adjusted to use the
dynamic debug wrapper. vchiq_loud_error_*() has been removed
as a part of this patch and replaced with dev_err (so that
they directly end up in kernel log, even if dynamic debug
isn't enabled), which serves the purpose.
Umang Jain [Tue, 24 Oct 2023 11:44:22 +0000 (07:44 -0400)]
staging: vc04_services: Pass struct device to vchiq_init_slots()
Pass struct device pointer to vchiq_init_slots(). In subsequent
commits, vchiq_log_* macros will be ported to use dynamic debug
(dev_dbg()), hence they need access to a struct device pointer.
Umang Jain [Tue, 24 Oct 2023 11:44:21 +0000 (07:44 -0400)]
staging: vc04_services: Pass struct device to vchiq_log_dump_mem()
Pass struct device pointer to vchiq_log_dump_mem(). In subsequent
commits, vchiq_log_* macros will be ported to use dynamic debug
(dev_dbg()), hence they need access to a struct device pointer.
Michael Straube [Mon, 23 Oct 2023 09:00:01 +0000 (11:00 +0200)]
staging: vme_user: prefer strscpy over strcpy
Using strcpy has potential for buffer overflows. It should be replaced
with strscpy where possible. In this case the return value of strcpy is
not used, so we can safely replace it with strscpy.
Soumya Negi [Fri, 20 Oct 2023 01:55:23 +0000 (18:55 -0700)]
staging: vme_user: Use dev_err() in vme_check_window()
vme_check_window() uses printk() for logging error message. This
leads to the following checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Use dev_err() instead. Pass VME bridge device to vme_check_window() so
that the error message can be logged with the bridge device context.
Soumya Negi [Fri, 20 Oct 2023 01:55:22 +0000 (18:55 -0700)]
staging: vme_user: Remove NULL-checks
Don't check for empty bridge device & resource in vme_alloc_consistent()
& vme_free_consistent() since they can not be NULL. Both the VME bridge
device and the VME resource that are used in these functions are set at
probe time.
Soumya Negi [Fri, 20 Oct 2023 01:55:21 +0000 (18:55 -0700)]
staging: vme_user: Remove printk() in find_bridge()
Don't log error message in find_bridge(). The printk() triggers a
checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
It can't be replaced by dev_err() & using pr_err() is not helpful as it
doesn't give much context to the user. It is better to remove it.
Soumya Negi [Fri, 20 Oct 2023 01:55:19 +0000 (18:55 -0700)]
staging: vme_user: Replace printk() with dev_*()
vme.c uses printk() to log messages. To improve and standardize message
formatting, use logging mechanisms dev_err()/dev_warn() instead. Retain
the printk log levels of the messages during replacement.
Dorcas AnonoLitunya [Thu, 19 Oct 2023 10:13:37 +0000 (13:13 +0300)]
staging: sm750fb: Remove unused return variable in program_mode_registers()
Drops variable ret as it is unused in the code. This therefore modifies
the return type of program_mode_registers() to void from int since the
return value is being ignored in all function calls. This improves code
readability and maintainability.
Calvince Otieno [Thu, 19 Oct 2023 07:28:39 +0000 (10:28 +0300)]
staging: bcm2835-audio: remove function snd_bcm2835_new_ctl()
The function snd_bcm2835_new_ctl() is declared but not defined.
Its definition was removed 1 year ago in the
commit 143b67f19ba1 ("staging: bcm2835-audio: remove compat ALSA card")
Calvince Otieno [Thu, 19 Oct 2023 06:55:20 +0000 (09:55 +0300)]
staging: vme_user: replace strcpy with strscpy
Checkpatch suggests using strscpy() instead of strcpy().
The advantages of strscpy() are that it always adds a NUL terminator
and prevents read/write overflows if the source string is not properly
terminated.
strcpy() lacks built-in bounds checking for the destination buffer,
making it susceptible to buffer overflows. These overflows can lead
to various unpredictable behaviors.
In this specific context, both strscpy and strcpy performs the same
operation without any functional difference.
The reason for this equivalence is that the driver_name string "vme_fake"
is shorter than the size of the fake_bridge->name array which is defined
as 16 characters (struct vme_bridge {char name[VMENAMSIZ];...}). Thus,
there is no risk of buffer overflow in either case. VMENAMSIZ variable
holds a constant value of 16 (#define VMENAMSIZ 16)
The null-terminated "vme_fake" string
(static const char driver_name[] = "vme_fake";) can be safely copied into
fake_bridge->name using either strscpy or strcpy.
While using strscpy() does not address any bugs, it is considered a better
practice and aligns with checkpatch recommendations.
Umang Jain [Thu, 19 Oct 2023 09:01:26 +0000 (14:31 +0530)]
staging: vc04_services: Support module autoloading using MODULE_DEVICE_TABLE
VC04 has now a independent bus vchiq_bus to register its devices.
However, the module auto-loading for bcm2835-audio and bcm2835-camera
currently happens through MODULE_ALIAS() macro specified explicitly.
The correct way to auto-load a module, is when the alias is picked
out from MODULE_DEVICE_TABLE(). In order to get there, we need to
introduce vchiq_device_id and add relevant entries in file2alias.c
infrastructure so that aliases can be generated. This patch targets
adding vchiq_device_id and do_vchiq_entry, in order to
generate those alias using the /script/mod/file2alias.c.
Going forward the MODULE_ALIAS() from bcm2835-camera and bcm2835-audio
will be dropped, in favour of MODULE_DEVICE_TABLE being used there.
The alias format for vchiq_bus devices will be "vchiq:<dev_name>".
Adjust the vchiq_bus_uevent() to reflect that.
Benjamin Poirier [Fri, 20 Oct 2023 12:44:57 +0000 (08:44 -0400)]
staging: qlge: Retire the driver
No significant improvements have been done to this driver since commit a7c3ddf29a78 ("staging: qlge: clean up debugging code in the QL_ALL_DUMP
ifdef land") in January 2021. The driver should not stay in staging
forever. Since it has been abandoned by the vendor and no one has stepped
up to maintain it, delete it.
If some users manifest themselves, the driver will be restored to
drivers/net/ as suggested in the linked message.
Benjamin Poirier [Fri, 20 Oct 2023 12:44:56 +0000 (08:44 -0400)]
staging: qlge: Update TODO
Update TODO file to reflect the changes that have been done:
* multiple functions were renamed to have the "qlge_" prefix in commit f8c047be5401 ("staging: qlge: use qlge_* prefix to avoid namespace
clashes with other qlogic drivers")
* a redundant memset() was removed in commit 953b94009377 ("staging: qlge:
Initialize devlink health dump framework")
* the loop boundary in ql(ge)_alloc_rx_buffers() was updated in commit e4c911a73c89 ("staging: qlge: Remove rx_ring.type")
* pci_enable_msi() was replaced in commit 4eab532dca76 ("staging:
qlge/qlge_main.c: Replace depracated MSI API.")
* pci_dma_* were replaced in commit e955a071b9b3 ("staging: qlge: replace
deprecated apis pci_dma_*")
* the while loops were rewritten in commit 41e1bf811ace ("Staging: qlge:
Rewrite two while loops as simple for loops")
* indentation was fixed in commit 0eb79fd1e911 ("staging: qlge: cleanup
indent in qlge_main.c")
Calvince Otieno [Tue, 17 Oct 2023 10:12:56 +0000 (13:12 +0300)]
staging: wlan-ng: remove function prism2sta_ev_txexc
The function prism2sta_ev_txexc() is called by the function
hfa384x_usbin_txcompl() to print the transmit exception event - a debug
information using netdev_dbg().
The debugging utility function can be called directly by
hfa384x_usbin_txcompl().
Calvince Otieno [Tue, 17 Oct 2023 09:18:02 +0000 (12:18 +0300)]
staging: wlan-ng: use netdev_dbg over pr_debug
This patch replaces the usage of pr_debug() with netdev_dbg().
The change is made to enhance context-aware debugging,
improve code clarity, and maintain compatibility with established
network debugging practices. There were no functional code changes.
Dorcas AnonoLitunya [Mon, 16 Oct 2023 20:14:11 +0000 (23:14 +0300)]
Staging: sm750fb: Rename programModeRegisters
Rename function programModeRegisters to program_mode_registers. This
follows snakecase naming convention and ensures a consistent naming style
throughout the file. Issue found by checkpatch.
Mutes the following checkpatch error:
CHECK: Avoid CamelCase: <programModeRegisters>
Dorcas AnonoLitunya [Mon, 16 Oct 2023 20:14:10 +0000 (23:14 +0300)]
Staging: sm750fb: Rename dispControl
Rename variable dispControl to disp_control. This follows
snakecase naming convention and ensures a consistent naming style
throughout the file. Issue found by checkpatch.
Mutes the following checkpatch error:
CHECK: Avoid CamelCase: <dispControl>
Dorcas AnonoLitunya [Mon, 16 Oct 2023 20:14:09 +0000 (23:14 +0300)]
Staging: sm750fb: Rename pModeParam
Rename variable pModeParam to mode_param. This follows snakecase naming
convention and ensures a consistent naming style throughout the file.
Issue found by checkpatch.
Mutes the following checkpatch error:
CHECK: Avoid CamelCase: <pModeParam>
Rename function displayControlAdjust_SM750E to
display_control_adjust_SM750E. This follows snakecase naming convention
and ensures a consistent naming style throughout the file. Issue found by
checkpatch.
Mutes the following error:
CHECK:Avoid CamelCase: <displayControlAdjust_SM750E>
Greg Kroah-Hartman [Tue, 17 Oct 2023 08:13:10 +0000 (10:13 +0200)]
staging: rtl8192u: remove entry from Makefile
In commit 697455ce4110 ("staging: rtl8192u: Remove broken driver"), the
driver was removed, along with the Kconfig entry, but the Makefile line
in drivers/staging/Makefile was not updated, so things like 'make clean'
fail to work properly as they will decend into all subdirectories to try
to clean things up.
Resolve this by removing the entry in the main staging Makefile.
Calvince Otieno [Mon, 16 Oct 2023 09:20:37 +0000 (12:20 +0300)]
staging: wlan-ng: replace pr_debug() with netdev_dbg()
This patch replaces the usage of pr_debug() with netdev_dbg().
The change is made to enhance context-aware debugging,
improve code clarity, and maintain compatibility with established
network debugging practices. There were no functional code changes.
Calvince Otieno [Mon, 16 Oct 2023 06:39:33 +0000 (09:39 +0300)]
staging: wlan-ng: replace strncpy() with strscpy()
Checkpatch suggests the use of strscpy() instead of strncpy().
The advantages are that it always adds a NUL terminator and it prevents
a read overflow if the src string is not properly terminated. One
potential disadvantage is that it doesn't zero pad the string like
strncpy() does.
In this code, strscpy() and strncpy() are equivalent and it does not
affect runtime behavior. The string is zeroed on the line before
using memset(). The resulting string was always NUL terminated and
PRISM2_USB_FWFILE is string literal "prism2_ru.fw" so it's NUL
terminated.
However, even though using strscpy() does not fix any bugs, it's
still nicer and makes checkpatch happy.
Calvince Otieno [Mon, 16 Oct 2023 05:27:23 +0000 (08:27 +0300)]
staging: wlan-ng: remove unnecessary helper function
The function prism2sta_inf_handover() is called by the parent
function prism2sta_ev_info() to print a literal debug information
string using pr_debug(). The debugging utility function can be called
directly within prism2sta_ev_info().
Furthermore, to make the debugging more module-specific, the netdev_dbg()
function is preferred over the generic pr_debug() utility function.
Calvince Otieno [Sun, 15 Oct 2023 20:02:19 +0000 (23:02 +0300)]
staging: wlan-ng: remove unused function prototypes
These functions are declared but not defined or used anywhere. Their
definitions were removed 15 years ago.
prism2mgmt_set_grpaddr() was removed in the
commit 1e7201836c57 ("Staging: wlan-ng: Delete a pile of unused mibs.
And fix WEXT SET_TXPOWER.")
It's signature was changed in the commit 5a2214e2e02f ("staging:
wlang-ng: avoid new typedef: hfa384x_t")
prism2mgmt_get_grpaddr() and prism2mgmt_get_grpaddr_index() were
removed in the commit cbec30c4c00c ("Staging: wlan-ng: Delete a large pile of
now-unused code.")