Age | Commit message (Collapse) | Author | Files | Lines |
|
Convert array rx_ring[] to variable rx_ring as index is always 0. This
increases readability.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/c53ff4251eba0adae6d8279a918c8ab4914b4780.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
MAX_RX_QUEUE is set to 1. All loops with MAX_RX_QUEUE run only one cycle.
Remove loops.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/8bc9d3c15fba082a928ea2c0916a6aef5f76f456.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove HTIOTActIsDisableEDCATurbo() as it always returns false which
leads to one evaluation that is always false. Remove dead code.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/904ca224c6a0a1968012e131c0197a71e5b67f81.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove HTIOTActIsDisableMCSTwoSpatialStream() as it always returns false
which leads to one evaluation that is always false. Remove dead code.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/a446837ff1107c81f52d3cf9e727d6ef4e2678af.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove HTIOTActIsDisableMCS15() as it always returns false which leads to
one evaluation that is always false. Remove dead code.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/004b43b098f14f82e9614578ea9f04ca95b48b4c.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove HTIOTActIsDisableMCS14() as it always returns zero which leads to
one evaluation that is always false. Remove dead code.
Signed-off-by: Philipp Hortmann <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/7ff3c7f8daf9bccb004129fdc1128ca0b0cb4e70.1698295861.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Suggested-by: Kieran Bingham <[email protected]>
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The macro is not used anymore, so drop it.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
No functional changes intended in this commit.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
No functional changes intended in this commit.
Signed-off-by: Umang Jain <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Michael Straube <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unused variables to shorten code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/04ce3eaaaf3897a22dcb95ce2f449658199770d8.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove union qos_tclas as it is just set to 0 and never used.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/7e4d32fe7a1219a9131ce49308f68790e07fb83e.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove last three parameters of MakeTSEntry() as those are always Null
or 0.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/ebcd7eaeba89bdc4f19053681b98fd1b8cce5aaf.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unused struct acm to shorten code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/5cc31651cbf63e11c4172b4e42274dd862a7c310.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace union qos_tsinfo with embedded struct as it has only one element.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/3bedc504ad678332e4ab2a3d99f2a94ab5aed03a.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace union tspec_body including embedded struct with embedded union as
it has only one element. This will increase readability of the code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/be3e7cc62c2cdce652c24d3d3dbf7651b6ca71bc.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unused variables to shorten code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/ffeb86f15454ec17d7fc2ce66151393b6757d0a7.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove variable ucUP as its value is written but never evaluated.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/724cf398d27f74cb7e0f290e1a8e55ed67dffcc3.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unused variables ucReserved, ucSchedule, ucTSInfoAckPolicy, ucPSB,
ucAggregation, ucAccessPolicy, ucTrafficType and charData.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/4edfbe350e05649d1f6028777dcadb15af25238c.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace custom macros BIT10 to BIT31 with standard kernel macros BIT(10) to
BIT(31) to shorten code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/294ff1d0b92a474a9ae0d48a54a9f99f14008053.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace custom macros BIT0 to BIT9 with standard kernel macros BIT(0) to
BIT(9) to shorten code.
Signed-off-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/07e7de26d364d0781e41892d5738e1b6b93faf53.1698042685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Adhere to linux coding style. Reported by checkpatch.pl:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
Signed-off-by: Nandha Kumar Singaram <[email protected]>
Link: https://lore.kernel.org/r/39be7bb04ce1362b00aa31a638ebe2e88dd81fec.1697976302.git.nandhakumar.singaram@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Adhere to linux coding style. Reported by checkpatch.pl:
CHECK: Lines should not end with a '('
Signed-off-by: Nandha Kumar Singaram <[email protected]>
Link: https://lore.kernel.org/r/5f63b332c83f5f0e95f59e673b0292c27fecb411.1697976302.git.nandhakumar.singaram@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Adhere to linux coding style. Reported by checkpatch.pl:
CHECK: Alignment should match open parenthesis
Signed-off-by: Nandha Kumar Singaram <[email protected]>
Link: https://lore.kernel.org/r/d2630a16ff9eca40b03dcade63c197fdd5e5b78f.1697976302.git.nandhakumar.singaram@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase.
Fix checkpatch.pl error:
CHECK: Avoid CamelCase: <byEIFS>
Signed-off-by: Gilbert Adikankwu <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/4428aa96453516b6706b1a834c46e3f6e70b5828.1697927812.git.gilbertadikankwu@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase
Fix checkpatch.pl error:
CHECK: Avoid CamelCase: <byDIFS>
Signed-off-by: Gilbert Adikankwu <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/f10775da0decdbbec33d38236cdf89bcd8ab591e.1697927812.git.gilbertadikankwu@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase
Fix checkpatch.pl error:
CHECK: Avoid CamelCase: <bySIFS>
Signed-off-by: Gilbert Adikankwu <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/f75f308f187fa9a9e14bf25db006131e2dcda43b.1697927812.git.gilbertadikankwu@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase.
Fix checkpatch.pl error:
CHECK: Avoid CamelCase: <bySlot>
Signed-off-by: Gilbert Adikankwu <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/57a1a08fba23d8da8ed1411d84f31f074f510444.1697927812.git.gilbertadikankwu@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove byte Type encoding "by" from variable name and replace camelcase
with snakecase
Fix checkpatch.pl error:
CHECK: Avoid CamelCase: <byCWMaxMin>
Signed-off-by: Gilbert Adikankwu <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/ed8ff47e7ee3a03d8c8c3cc43b4773bb1eb01f16.1697927812.git.gilbertadikankwu@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Clean up comparisons to NULL to improve readability.
Reported by checkpatch.
if (x == NULL) -> if (!x)
if (x != NULL) -> if (x)
Signed-off-by: Michael Straube <[email protected]>
Tested-by: Philipp Hortmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Soumya Negi <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/221344ede933b1d9e6c31310b0f4dbb8be809c86.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Soumya Negi <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/049bbedf458e8ac40f3dfff9c9b25dce89f5b642.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Soumya Negi <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/028725ebbc522f73c39f5b1ec4cc2bdbdf588971.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace function names in message strings with __func__ to fix
all checkpatch warnings like:
WARNING: Prefer using '"%s...", __func__' to using 'vme_lm_get',
this function's name, in a string
Signed-off-by: Soumya Negi <[email protected]>
Acked-by: Andi Shyti <[email protected]>
Link: https://lore.kernel.org/r/db4ad6b878c4bb08fd5d15cf4a9287d7bb8c30df.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Issue found by checkpatch.pl
Signed-off-by: Soumya Negi <[email protected]>
Acked-by: Andi Shyti <[email protected]>
Link: https://lore.kernel.org/r/a36a0b839f9c21efe1f2df6f9272ae882fd04fb8.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Renamed from Pascal/CamelCase to Snake case the variable HTUpdateDefaultSetting,
HTUpateDefaultSetting -> ht_update_default_setting
Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver rtl8192e compiles.
Signed-off-by: Gary Rookard <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Suggested-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Dorcas AnonoLitunya <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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")
Signed-off-by: Calvince Otieno <[email protected]>
Link: https://lore.kernel.org/r/ZTDap2d5X7eXXPo2@lab-ubuntu
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix WARNING: Missing a blank line after declarations
Issue found by checkpatch.pl
Signed-off-by: Soumya Negi <[email protected]>
Acked-by: Andi Shyti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Calvince Otieno <[email protected]>
Link: https://lore.kernel.org/r/ZTDS2H48JBUTiwZi@lab-ubuntu
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Drop MODULE_ALIAS in favour of MODULE_DEVICE_TABLE as the module
alias should be picked from there.
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Drop MODULE_ALIAS in favour of MODULE_DEVICE_TABLE as the module
alias should be dropped from there.
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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.
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
As per device_register() documentation, this kfree() on error path will
crash. The call to put_device() is all that is needed here to free the
memory.
Fixes: 027e5703de6b ("staging: vc04_services: vchiq_arm: Add new bus type and device type")
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Stefan Wahren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|