linux-2.6-microblaze.git
2 years agostaging: vc04_services: update TODO file
Gaston Gonzalez [Thu, 30 Dec 2021 11:31:29 +0000 (08:31 -0300)]
staging: vc04_services: update TODO file

There are no struct typedef remaining inside vc04_services/. Hence, remove the
task from the TODO file.

While at it, fix the items sequential numbering.

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/3f560a75063a0bb744bb34c410e49f792d2c3d21.1640776340.git.gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vc04_services: bcm2835-camera: avoid the use of typedef for function pointers
Gaston Gonzalez [Thu, 30 Dec 2021 11:31:27 +0000 (08:31 -0300)]
staging: vc04_services: bcm2835-camera: avoid the use of typedef for function pointers

Replace typedef bm2835_mmal_v4l2_ctrl_cb with equivalent declaration to
better align with the linux kernel coding style.

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/0418e6e19e1580fff4abfc4bb2f4269dc206df44.1640776340.git.gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vc04_services: bcm2835-audio: avoid the use of typedef for function pointers
Gaston Gonzalez [Thu, 30 Dec 2021 11:31:25 +0000 (08:31 -0300)]
staging: vc04_services: bcm2835-audio: avoid the use of typedef for function pointers

Replace typedefs bcm2835_audio_newpcm_func and bcm2835_audio_newctl_func
with equivalent declarations to better align with the linux kernel
coding style.

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/b53a77682994bbc3ccb9b89d617dec23d0785059.1640776340.git.gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove header odm_precomp.h
Michael Straube [Wed, 29 Dec 2021 20:51:08 +0000 (21:51 +0100)]
staging: r8188eu: remove header odm_precomp.h

After previous cleanups the header odm_precomp.h only contains
includes and one unused define now. Remove the header and adjust
the includes in affected files.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-33-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unnecessary comments
Michael Straube [Wed, 29 Dec 2021 20:51:07 +0000 (21:51 +0100)]
staging: r8188eu: remove unnecessary comments

Remove some unnecessary comments in odm.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-32-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_EdcaTurboCheck() static
Michael Straube [Wed, 29 Dec 2021 20:51:06 +0000 (21:51 +0100)]
staging: r8188eu: make odm_EdcaTurboCheck() static

Function odm_EdcaTurboCheck() is only used in odm.c. Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-31-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make ODM_EdcaTurboInit() static
Michael Straube [Wed, 29 Dec 2021 20:51:05 +0000 (21:51 +0100)]
staging: r8188eu: make ODM_EdcaTurboInit() static

Function ODM_EdcaTurboInit() is only used in odm.c. Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-30-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_HwAntDiv() static
Michael Straube [Wed, 29 Dec 2021 20:51:04 +0000 (21:51 +0100)]
staging: r8188eu: make odm_HwAntDiv() static

Function odm_HwAntDiv() is only used in odm.c. Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-29-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_InitHybridAntDiv() static
Michael Straube [Wed, 29 Dec 2021 20:51:03 +0000 (21:51 +0100)]
staging: r8188eu: make odm_InitHybridAntDiv() static

Function odm_InitHybridAntDiv() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-28-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_TXPowerTrackingThermalMeterInit() static
Michael Straube [Wed, 29 Dec 2021 20:51:02 +0000 (21:51 +0100)]
staging: r8188eu: make odm_TXPowerTrackingThermalMeterInit() static

Function odm_TXPowerTrackingThermalMeterInit() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-27-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove odm_TXPowerTrackingInit()
Michael Straube [Wed, 29 Dec 2021 20:51:01 +0000 (21:51 +0100)]
staging: r8188eu: remove odm_TXPowerTrackingInit()

odm_TXPowerTrackingInit() is just a wrapper around
odm_TXPowerTrackingThermalMeterInit(). Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-26-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_RSSIMonitorCheck() static
Michael Straube [Wed, 29 Dec 2021 20:51:00 +0000 (21:51 +0100)]
staging: r8188eu: make odm_RSSIMonitorCheck() static

Function odm_RSSIMonitorCheck() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-25-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_CCKPacketDetectionThresh() static
Michael Straube [Wed, 29 Dec 2021 20:50:59 +0000 (21:50 +0100)]
staging: r8188eu: make odm_CCKPacketDetectionThresh() static

Function odm_CCKPacketDetectionThresh() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-24-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_FalseAlarmCounterStatistics() static
Michael Straube [Wed, 29 Dec 2021 20:50:58 +0000 (21:50 +0100)]
staging: r8188eu: make odm_FalseAlarmCounterStatistics() static

Function odm_FalseAlarmCounterStatistics() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-23-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_DynamicBBPowerSavingInit() static
Michael Straube [Wed, 29 Dec 2021 20:50:57 +0000 (21:50 +0100)]
staging: r8188eu: make odm_DynamicBBPowerSavingInit() static

Function odm_DynamicBBPowerSavingInit() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-22-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_RefreshRateAdaptiveMask() static
Michael Straube [Wed, 29 Dec 2021 20:50:56 +0000 (21:50 +0100)]
staging: r8188eu: make odm_RefreshRateAdaptiveMask() static

Function odm_RefreshRateAdaptiveMask() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-21-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_RateAdaptiveMaskInit() static
Michael Straube [Wed, 29 Dec 2021 20:50:55 +0000 (21:50 +0100)]
staging: r8188eu: make odm_RateAdaptiveMaskInit() static

Function odm_RateAdaptiveMaskInit() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-20-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_CommonInfoSelfUpdate() static
Michael Straube [Wed, 29 Dec 2021 20:50:54 +0000 (21:50 +0100)]
staging: r8188eu: make odm_CommonInfoSelfUpdate() static

Function odm_CommonInfoSelfUpdate() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-19-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_CommonInfoSelfInit() static
Michael Straube [Wed, 29 Dec 2021 20:50:53 +0000 (21:50 +0100)]
staging: r8188eu: make odm_CommonInfoSelfInit() static

Function odm_CommonInfoSelfInit() is only used in odm.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-18-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_DIG() static
Michael Straube [Wed, 29 Dec 2021 20:50:52 +0000 (21:50 +0100)]
staging: r8188eu: make odm_DIG() static

Function odm_DIG() is used only in odm.c. Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-17-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_DIGInit() static
Michael Straube [Wed, 29 Dec 2021 20:50:51 +0000 (21:50 +0100)]
staging: r8188eu: make odm_DIGInit() static

Function odm_DIGInit() is used only in odm.c. Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-16-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused prototypes
Michael Straube [Wed, 29 Dec 2021 20:50:50 +0000 (21:50 +0100)]
staging: r8188eu: remove unused prototypes

Remove some unused function prototypes.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-15-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make odm_ConfigRFReg_8188E() static
Michael Straube [Wed, 29 Dec 2021 20:50:49 +0000 (21:50 +0100)]
staging: r8188eu: make odm_ConfigRFReg_8188E() static

Function odm_ConfigRFReg_8188E() is only used in odm_RegConfig8188E.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-14-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove odm_interface
Michael Straube [Wed, 29 Dec 2021 20:50:48 +0000 (21:50 +0100)]
staging: r8188eu: remove odm_interface

After previous cleanups the file odm_interface.c is emtpy now
and the header odm_interface.h just contains an unused typedef.
Remove both files.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-13-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_CompareMemory()
Michael Straube [Wed, 29 Dec 2021 20:50:47 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_CompareMemory()

ODM_CompareMemory() is just a wrapper around memcmp().
Remove ODM_CompareMemory() and call memcmp() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-12-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_delay_ms()
Michael Straube [Wed, 29 Dec 2021 20:50:46 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_delay_ms()

ODM_delay_ms() is just a wrapper around mdelay().
Remove ODM_delay_ms() and call mdelay() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_delay_us()
Michael Straube [Wed, 29 Dec 2021 20:50:45 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_delay_us()

ODM_delay_us() is just a wrapper around udelay().
Remove ODM_delay_us() and call udelay() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_sleep_ms()
Michael Straube [Wed, 29 Dec 2021 20:50:44 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_sleep_ms()

ODM_sleep_ms() is just a wrapper around msleep().
Remove ODM_sleep_ms() and call msleep() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clean up coding style issues
Michael Straube [Wed, 29 Dec 2021 20:50:43 +0000 (21:50 +0100)]
staging: r8188eu: clean up coding style issues

Clean up coding style issues in odm_ConfigRFReg_8188E() reported by
checkpatch.

WARNING: please, no spaces at the start of a line
WARNING: suspect code indent for conditional statements (4, 16)

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_SetBBReg()
Michael Straube [Wed, 29 Dec 2021 20:50:42 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_SetBBReg()

ODM_SetBBReg() is just a wrapper around rtl8188e_PHY_SetBBReg().
Remove ODM_SetBBReg() and call rtl8188e_PHY_SetBBReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_GetBBReg()
Michael Straube [Wed, 29 Dec 2021 20:50:41 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_GetBBReg()

ODM_GetBBReg() is just a wrapper around rtl8188e_PHY_QueryBBReg().
Remove ODM_GetBBReg() and call rtl8188e_PHY_QueryBBReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_SetRFReg()
Michael Straube [Wed, 29 Dec 2021 20:50:40 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_SetRFReg()

ODM_SetRFReg() is just a wrapper around rtl8188e_PHY_SetRFReg().
Remove ODM_SetRFReg() and call rtl8188e_PHY_SetRFReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_GetRFReg()
Michael Straube [Wed, 29 Dec 2021 20:50:39 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_GetRFReg()

ODM_GetRFReg() is just a wrapper around rtl8188e_PHY_QueryRFReg().
Remove ODM_GetRFReg() and call rtl8188e_PHY_QueryRFReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_GetMACReg()
Michael Straube [Wed, 29 Dec 2021 20:50:38 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_GetMACReg()

ODM_GetMACReg() is just a wrapper around rtl8188e_PHY_QueryBBReg().
Remove ODM_GetMACReg() and call rtl8188e_PHY_QueryBBReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_SetMACReg()
Michael Straube [Wed, 29 Dec 2021 20:50:37 +0000 (21:50 +0100)]
staging: r8188eu: remove ODM_SetMACReg()

ODM_SetMACReg() is just a wrapper around rtl8188e_PHY_SetBBReg().
Remove ODM_SetMACReg() and call rtl8188e_PHY_SetBBReg() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211229205108.26373-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: axis-fifo: Use platform_get_irq() to get the interrupt
Lad Prabhakar [Fri, 24 Dec 2021 16:13:34 +0000 (16:13 +0000)]
staging: axis-fifo: Use platform_get_irq() to get the interrupt

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20211224161334.31123-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: greybus: auto_manager: use default_groups in kobj_type
Greg Kroah-Hartman [Tue, 28 Dec 2021 13:55:41 +0000 (14:55 +0100)]
staging: greybus: auto_manager: use default_groups in kobj_type

There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the greybus audio code to use default_groups field which
has been the preferred way since aa30f47cf666 ("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.

Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Link: https://lore.kernel.org/r/20211228135541.380275-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: merge _ReadLEDSetting() into ReadAdapterInfo8188EU()
Michael Straube [Tue, 28 Dec 2021 10:11:20 +0000 (11:11 +0100)]
staging: r8188eu: merge _ReadLEDSetting() into ReadAdapterInfo8188EU()

Function _ReadLEDSetting() sets only a single variable and the only
user is ReadAdapterInfo8188EU(). Remove _ReadLEDSetting() and set the
variable in ReadAdapterInfo8188EU() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: RSSI_test is always false
Michael Straube [Tue, 28 Dec 2021 10:11:19 +0000 (11:11 +0100)]
staging: r8188eu: RSSI_test is always false

The field RSSI_test of struct odm_dm_struct is never set. It stays
at the default value 0. Remove it and remove a related if test that
is always true.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: TrainIdx is set but never used
Michael Straube [Tue, 28 Dec 2021 10:11:18 +0000 (11:11 +0100)]
staging: r8188eu: TrainIdx is set but never used

The field TrainIdx of struct fast_ant_train is set but never used.
Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: FAT_State is set but never used
Michael Straube [Tue, 28 Dec 2021 10:11:17 +0000 (11:11 +0100)]
staging: r8188eu: FAT_State is set but never used

The field FAT_State of struct fast_ant_train is set but never used.
Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: FAT_State is always FAT_NORMAL_STATE
Michael Straube [Tue, 28 Dec 2021 10:11:16 +0000 (11:11 +0100)]
staging: r8188eu: FAT_State is always FAT_NORMAL_STATE

In this driver pDM_FatTable->FAT_State is always FAT_NORMAL_STATE.
So the check 'if (pDM_FatTable->FAT_State == FAT_TRAINING_STATE)'
is always false. Remove dead code that is executed only if that
check is true.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove write-only fields from struct rtl_ps
Michael Straube [Tue, 28 Dec 2021 10:11:15 +0000 (11:11 +0100)]
staging: r8188eu: remove write-only fields from struct rtl_ps

The fields pre_cca_state, cur_cca_state and rssi_val_min of struct
rtl_ps are set but never used. Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_CMNINFO_ABILITY from ODM_CmnInfoInit()
Michael Straube [Tue, 28 Dec 2021 10:11:14 +0000 (11:11 +0100)]
staging: r8188eu: remove ODM_CMNINFO_ABILITY from ODM_CmnInfoInit()

ODM_CmnInfoInit() is never called with ODM_CMNINFO_ABILITY.
Remove that unused case from ODM_CmnInfoInit().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused enum odm_h2c_cmd
Michael Straube [Tue, 28 Dec 2021 10:11:13 +0000 (11:11 +0100)]
staging: r8188eu: remove unused enum odm_h2c_cmd

The enum odm_h2c_cmd is not used in this driver. Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove GET_CVID_ROM_VERSION
Michael Straube [Tue, 28 Dec 2021 10:11:12 +0000 (11:11 +0100)]
staging: r8188eu: remove GET_CVID_ROM_VERSION

The macro GET_CVID_ROM_VERSION is not used. Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: DM_PriCCA is set but never used
Michael Straube [Tue, 28 Dec 2021 10:11:11 +0000 (11:11 +0100)]
staging: r8188eu: DM_PriCCA is set but never used

The field DM_PriCCA of struct odm_dm_struct is set but never used.
Remove it and remove related dead code.

Acked-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211228101120.9120-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused prototype
Martin Kaiser [Sun, 26 Dec 2021 21:25:35 +0000 (22:25 +0100)]
staging: r8188eu: remove unused prototype

Remove the prototype for wifirate2_ratetbl_inx, it is not needed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private "test" ioctl
Martin Kaiser [Sun, 26 Dec 2021 21:25:34 +0000 (22:25 +0100)]
staging: r8188eu: remove the private "test" ioctl

Remove the private "test" ioctl. It copies data from user space,
this data is not used.

We can now remove a number of NULL entries at the end of the private
ioctl list.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private ioctl "tdls"
Martin Kaiser [Sun, 26 Dec 2021 21:25:33 +0000 (22:25 +0100)]
staging: r8188eu: remove the private ioctl "tdls"

Remove the private ioctl "tdls", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private ioctl "tdls_get"
Martin Kaiser [Sun, 26 Dec 2021 21:25:32 +0000 (22:25 +0100)]
staging: r8188eu: remove the private ioctl "tdls_get"

Remove the private ioctl "tdls_get", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private ioctl "wps_assoc_req_ie"
Martin Kaiser [Sun, 26 Dec 2021 21:25:31 +0000 (22:25 +0100)]
staging: r8188eu: remove the private ioctl "wps_assoc_req_ie"

Remove the private ioctl "wps_assoc_req_ie", it is mapped to
an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove private ioctls that return -1
Martin Kaiser [Sun, 26 Dec 2021 21:25:30 +0000 (22:25 +0100)]
staging: r8188eu: remove private ioctls that return -1

Remove the private ioctls that are mapped to rtw_wx_priv_null.
rtw_wx_priv_null itself can also be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private ioctl "wps_prob_req_ie"
Martin Kaiser [Sun, 26 Dec 2021 21:25:29 +0000 (22:25 +0100)]
staging: r8188eu: remove the private ioctl "wps_prob_req_ie"

Remove the private ioctl "wps_prob_req_ie", it is mapped to
an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private drvext_hdl ioctl
Martin Kaiser [Sun, 26 Dec 2021 21:25:28 +0000 (22:25 +0100)]
staging: r8188eu: remove the private drvext_hdl ioctl

Remove the private drvext_hdl ioctl, it is mapped to an empty function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove the private ioctl "get sensitivity"
Martin Kaiser [Sun, 26 Dec 2021 21:25:27 +0000 (22:25 +0100)]
staging: r8188eu: remove the private ioctl "get sensitivity"

Remove the private ioctl "get sensitivity", it is mapped to an empty
function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused rtw_private_args entries
Martin Kaiser [Sun, 26 Dec 2021 21:25:26 +0000 (22:25 +0100)]
staging: r8188eu: remove unused rtw_private_args entries

Remove the entries of the rtw_private_args array that refer to
non-existing private ioctls.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: rfoff_reason is never initialised
Martin Kaiser [Sun, 26 Dec 2021 19:55:56 +0000 (20:55 +0100)]
staging: r8188eu: rfoff_reason is never initialised

rfoff_reason in struct pwrctrl_priv is never set, its value remains 0.

Remove rfoff_reason, related defines and a check in rtw_led_control
that is always false.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-22-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: merge rtw_led_control and SwLedControlMode1
Martin Kaiser [Sun, 26 Dec 2021 19:55:55 +0000 (20:55 +0100)]
staging: r8188eu: merge rtw_led_control and SwLedControlMode1

rtw_led_control is the only caller of SwLedControlMode1.
Pull SwLedControlMode1 into rtw_led_control.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-21-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: merge blink_work and SwLedBlink1
Martin Kaiser [Sun, 26 Dec 2021 19:55:54 +0000 (20:55 +0100)]
staging: r8188eu: merge blink_work and SwLedBlink1

blink_work is the only caller of SwLedBlink1. Merge the two functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-20-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: summarize some BlinkingLedState
Martin Kaiser [Sun, 26 Dec 2021 19:55:53 +0000 (20:55 +0100)]
staging: r8188eu: summarize some BlinkingLedState

Move BlinkingLedState updates out of if clauses where the same update
is done for all possible paths.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-19-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove bStopBlinking
Martin Kaiser [Sun, 26 Dec 2021 19:55:52 +0000 (20:55 +0100)]
staging: r8188eu: remove bStopBlinking

Remove the temporary variable bStopBlinking and check the conditions
directly in the if clauses. There's no need to save the result of
these checks.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-18-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: LED_CTL_START_WPS_BOTTON is not used
Martin Kaiser [Sun, 26 Dec 2021 19:55:51 +0000 (20:55 +0100)]
staging: r8188eu: LED_CTL_START_WPS_BOTTON is not used

None of the callers sets LED_CTL_START_WPS_BOTTON. Remove the define
and related dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-17-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: LED_CTL_POWER_ON is not used
Martin Kaiser [Sun, 26 Dec 2021 19:55:50 +0000 (20:55 +0100)]
staging: r8188eu: LED_CTL_POWER_ON is not used

The LED_CTL_POWER_ON mode is not used by this driver.
Remove the define and related dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove LedControlHandler
Martin Kaiser [Sun, 26 Dec 2021 19:55:49 +0000 (20:55 +0100)]
staging: r8188eu: remove LedControlHandler

Export the function that other layers use for setting the led.

Remove the function pointer and the macro to make the led control function
configurable. This driver supports only a single configuration.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove obsolete comments
Martin Kaiser [Sun, 26 Dec 2021 19:55:48 +0000 (20:55 +0100)]
staging: r8188eu: remove obsolete comments

Remove some comments that don't make sense any more.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use bool for boolean values
Martin Kaiser [Sun, 26 Dec 2021 19:55:47 +0000 (20:55 +0100)]
staging: r8188eu: use bool for boolean values

Change some boolean variables from u8 to bool.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make blink interval defines internal
Martin Kaiser [Sun, 26 Dec 2021 19:55:46 +0000 (20:55 +0100)]
staging: r8188eu: make blink interval defines internal

The defines for led blink intervals are used only by the led layer.
Move them into rtw_led.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: bLedStartToLinkBlinkInProgress is set but not used
Martin Kaiser [Sun, 26 Dec 2021 19:55:45 +0000 (20:55 +0100)]
staging: r8188eu: bLedStartToLinkBlinkInProgress is set but not used

Remove bLedStartToLinkBlinkInProgress from struct LED_871x.
It's set but not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused blink mode defines
Martin Kaiser [Sun, 26 Dec 2021 19:55:44 +0000 (20:55 +0100)]
staging: r8188eu: remove unused blink mode defines

Remove defines for led blink modes which are not used by this driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clean up blinking macros
Martin Kaiser [Sun, 26 Dec 2021 19:55:43 +0000 (20:55 +0100)]
staging: r8188eu: clean up blinking macros

Clean up the macros that check the blinking mode of a LED.

The macro IS_LED_BLINKING is not used and can be removed.

The IS_LED_WPS_BLINKING macro is used only by rtw_led.c. Move the macro
into this file. The macro parameter is always a struct LED_871x *,
there's no need for a cast. Rename the parameter to l and put it in
parentheses, which is good practice for macro parameters.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clean up the blink worker code
Martin Kaiser [Sun, 26 Dec 2021 19:55:42 +0000 (20:55 +0100)]
staging: r8188eu: clean up the blink worker code

Merge the BlinkWorkItemCallback and BlinkHandler functions.
Rename the resulting function to blink_work and make it
internal to the led layer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: make ResetLedStatus static
Martin Kaiser [Sun, 26 Dec 2021 19:55:41 +0000 (20:55 +0100)]
staging: r8188eu: make ResetLedStatus static

The ResetLedStatus function is used only by the led layer.
Make it static.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: merge DeInitLed871x and rtl8188eu_DeInitSwLeds
Martin Kaiser [Sun, 26 Dec 2021 19:55:40 +0000 (20:55 +0100)]
staging: r8188eu: merge DeInitLed871x and rtl8188eu_DeInitSwLeds

Merge DeInitLed871x and rtl8188eu_DeInitSwLeds, both of which are
small and simple.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: merge InitLed871x and rtl8188eu_InitSwLeds
Martin Kaiser [Sun, 26 Dec 2021 19:55:39 +0000 (20:55 +0100)]
staging: r8188eu: merge InitLed871x and rtl8188eu_InitSwLeds

Copy InitLed871x into rtl8188eu_InitSwLeds. There's no need for two
separate functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: move (de)init functions from hal to rtw_led
Martin Kaiser [Sun, 26 Dec 2021 19:55:38 +0000 (20:55 +0100)]
staging: r8188eu: move (de)init functions from hal to rtw_led

Move the led init and deinit functions from the hal layer to rtw_led.c.
rtl8188eu_led.c and rtl8188e_led.h can now be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: move SwLedOn and SwLedOff into rtw_led.c
Martin Kaiser [Sun, 26 Dec 2021 19:55:37 +0000 (20:55 +0100)]
staging: r8188eu: move SwLedOn and SwLedOff into rtw_led.c

Move the low-level functions SwLedOn and SwLedOff from the hal layer
into rtw_led.c. This is the only place where they're used.

There's no need to go through the hal layer for a simple register access
if the driver supports only a single chipset.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: switch the led off during deinit
Martin Kaiser [Sun, 26 Dec 2021 19:55:36 +0000 (20:55 +0100)]
staging: r8188eu: switch the led off during deinit

When the driver is unloaded or when the system goes into standby mode,
DeInitLed871x is called to stop the led layer. In this case, we stop
the blinking worker but we do not switch the led off explicitly. On my
system, I can go into standby mode with the LED enabled.

Add a call to SwLedOff to fix this.

Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: drop off byRxMode var in device.h
Tommaso Merciai [Sat, 25 Dec 2021 17:34:57 +0000 (18:34 +0100)]
staging: vt6655: drop off byRxMode var in device.h

Drop off unused variable byRxMode in device.h

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Link: https://lore.kernel.org/r/20211225173500.5459-1-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: most: dim2: use consistent routine naming
Nikita Yushchenko [Sun, 26 Dec 2021 08:25:29 +0000 (11:25 +0300)]
staging: most: dim2: use consistent routine naming

Rename init routines and enum values to reflect that those are for
Renesas R-Car Gen2 and R-Car Gen3 SoCs.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20211226082530.2245198-3-nikita.yoush@cogentembedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: most: dim2: update renesas compatible string
Nikita Yushchenko [Sun, 26 Dec 2021 08:25:28 +0000 (11:25 +0300)]
staging: most: dim2: update renesas compatible string

Use "renesas,rcar-gen3-mlp" instead of "rcar,medialb-dim2"
- the documented vendor prefix for Renesas is "renesas,"
- existing r-car devices use "rcar-genN-XXX" pattern.

There are currently no in-tree users to update.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20211226082530.2245198-2-nikita.yoush@cogentembedded.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: include variable declarations from Hal8188EPwrSeq.h
Abdun Nihaal [Fri, 24 Dec 2021 12:10:43 +0000 (17:40 +0530)]
staging: r8188eu: include variable declarations from Hal8188EPwrSeq.h

Variable declarations of rtl8188E_power_on_flow, rtl8188E_card_disable_flow
and rtl8188E_enter_lps_flow are present in Hal8188EPwrSeq.h.

A previous commit changed Hal8188EPwrSeq.c to include HalPwrSeqCmd.h
directly instead of Hal8188EPwrSeq.h, causing these sparse warnings:
- symbol 'rtl8188E_power_on_flow' was not declared. Should it be static?
- symbol 'rtl8188E_card_disable_flow' was not declared.Should it be static?
- symbol 'rtl8188E_enter_lps_flow' was not declared. Should it be static?

This patch reverts the include line to include the declarations.

Fixes: 4f458ec5f497 ("staging: r8188: move the steps into Hal8188EPwrSeq.c")
Acked-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/20211224121043.175650-1-abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8723bs: removed unused if blocks
Ismayil Mirzali [Wed, 22 Dec 2021 18:51:15 +0000 (20:51 +0200)]
staging: rtl8723bs: removed unused if blocks

Deleted the commented if blocks that weren't being used as suggested by
the maintainers.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
Link: https://lore.kernel.org/r/b4652b7490f3574445d567ef662270605533bfa4.1640197297.git.ismayilmirzeli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: pi433: remove unnecessary parentheses pointed out by checkpatch.pl
Paulo Miguel Almeida [Wed, 22 Dec 2021 07:02:56 +0000 (20:02 +1300)]
staging: pi433: remove unnecessary parentheses pointed out by checkpatch.pl

Checkpatch reports 'Unnecessary parentheses around <lines>'.
Fix this by removing extraneous parentheses where applicable.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20211222070256.GA7644@localhost.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vc04_services: Remove repeated word in vchiq log warning
Gautam Menghani [Tue, 28 Dec 2021 10:16:15 +0000 (15:46 +0530)]
staging: vc04_services: Remove repeated word in vchiq log warning

In a log warning in vhciq code, the word 'count' is repeated twice.
Remove repeated word 'count' from vhciq log warning.
This change has been suggested by checkpatch.pl

Signed-off-by: Gautam Menghani <gautammenghani14@gmail.com>
Link: https://lore.kernel.org/r/20211228101615.5073-1-gautammenghani14@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: greybus: fix stack size warning with UBSAN
Arnd Bergmann [Thu, 9 Dec 2021 19:51:42 +0000 (12:51 -0700)]
staging: greybus: fix stack size warning with UBSAN

clang warns about excessive stack usage in this driver when
UBSAN is enabled:

drivers/staging/greybus/audio_topology.c:977:12: error: stack frame size of 1836 bytes in function 'gbaudio_tplg_create_widget' [-Werror,-Wframe-larger-than=]

Rework this code to no longer use compound literals for
initializing the structure in each case, but instead keep
the common bits in a preallocated constant array and copy
them as needed.

Link: https://github.com/ClangBuiltLinux/linux/issues/1535
Link: https://lore.kernel.org/r/20210103223541.2790855-1-arnd@kernel.org/
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nathan: Address review comments from v1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211209195141.1165233-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: move the steps into Hal8188EPwrSeq.c
Martin Kaiser [Sun, 19 Dec 2021 18:39:26 +0000 (19:39 +0100)]
staging: r8188: move the steps into Hal8188EPwrSeq.c

Move the power transition steps into Hal8188EPwrSeq.c where the arrays
are defined.

There's no point in having defines for sequences of steps in the include
file. All of these sequences are used only once (apart from the end
sequence).

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: reformat the power transition steps
Martin Kaiser [Sun, 19 Dec 2021 18:39:25 +0000 (19:39 +0100)]
staging: r8188: reformat the power transition steps

Clean up the definitions of the power transition steps and address some
checkpatch warnings.

Reduce the line lengths where possible. Add spaces between elements.
Rewrite comments that are in contradiction with the definition they
describe.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove unused power command
Martin Kaiser [Sun, 19 Dec 2021 18:39:24 +0000 (19:39 +0100)]
staging: r8188: remove unused power command

None of the remaining power transition steps used PWR_CMD_READ.
It can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove base address from power transitions
Martin Kaiser [Sun, 19 Dec 2021 18:39:23 +0000 (19:39 +0100)]
staging: r8188: remove base address from power transitions

Remove the base entry from the power transition steps. This field
is not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove interface mask from power transitions
Martin Kaiser [Sun, 19 Dec 2021 18:39:22 +0000 (19:39 +0100)]
staging: r8188: remove interface mask from power transitions

For the r8188 driver, we always have a usb interface. We can remove
the power transition steps that are not applicable for a usb interface.

We can then remove the interface mask itself.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove fab mask from power transitions
Martin Kaiser [Sun, 19 Dec 2021 18:39:21 +0000 (19:39 +0100)]
staging: r8188: remove fab mask from power transitions

Remove the fab mask from the steps of the power transitions.
The fab mask is not used, all values are allowed for all steps.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove cut mask from power transitions
Martin Kaiser [Sun, 19 Dec 2021 18:39:20 +0000 (19:39 +0100)]
staging: r8188: remove cut mask from power transitions

Remove the power cut mask from the steps of the power transitions.
The power cut mask is not used, all values are allowed for all steps.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove sizes from power transition arrays
Martin Kaiser [Sun, 19 Dec 2021 18:39:19 +0000 (19:39 +0100)]
staging: r8188: remove sizes from power transition arrays

There's no need to set the array size explicitly if an array is
initialized with a constant value. Remove the array sizes and
related definitions for the power transition arrays.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove unused power transitions
Martin Kaiser [Sun, 19 Dec 2021 18:39:18 +0000 (19:39 +0100)]
staging: r8188: remove unused power transitions

The r8188 driver defines a number of transitions between different
power states. Remove the transitions which are not used by the rest
of the code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211219183926.4746-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: ODM_BB_RA_MASK is always set
Martin Kaiser [Sat, 18 Dec 2021 12:04:23 +0000 (13:04 +0100)]
staging: r8188: ODM_BB_RA_MASK is always set

Remove the ODM_BB_RA_MASK capability. It is always set for this driver.

Like for ODM_BB_DIG before, we can be sure that ODM_BB_RA_MASK was never
checked before it was set.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: ODM_BB_DIG is always set
Martin Kaiser [Sat, 18 Dec 2021 12:04:22 +0000 (13:04 +0100)]
staging: r8188: ODM_BB_DIG is always set

Remove the ODM_BB_DIG capability. It is always set for this driver.

(ODM_BB_DIG was set in Update_ODM_ComInfo_88E and checked in odm_DIG,
which was always called after the capability was set.)

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: remove unused odm capabilities
Martin Kaiser [Sat, 18 Dec 2021 12:04:21 +0000 (13:04 +0100)]
staging: r8188: remove unused odm capabilities

Remove odm capabilities which are either unused or set but
never checked.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: Bssid in struct fast_ant_train is set but not used
Martin Kaiser [Sat, 18 Dec 2021 12:04:20 +0000 (13:04 +0100)]
staging: r8188: Bssid in struct fast_ant_train is set but not used

Bssid in struct fast_ant_train is set but not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188: antSumRSSI is set but not used
Martin Kaiser [Sat, 18 Dec 2021 12:04:19 +0000 (13:04 +0100)]
staging: r8188: antSumRSSI is set but not used

antSumRSSI in struct fast_ant_train is set but not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>