linux-2.6-microblaze.git
3 years agostaging: rtl8723bs: remove duplicate pstat->hwaddr check
Denis Efremov [Fri, 5 Mar 2021 15:50:01 +0000 (18:50 +0300)]
staging: rtl8723bs: remove duplicate pstat->hwaddr check

IS_MCAST(pstat->hwaddr) checked twice in a row in
odm_RefreshRateAdaptiveMaskCE(). Remove the second check.

Signed-off-by: Denis Efremov <efremov@linux.com>
Link: https://lore.kernel.org/r/20210305155001.61951-1-efremov@linux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove useless typedef's in HalPhyRf.h
Marco Cesati [Fri, 5 Mar 2021 14:49:06 +0000 (15:49 +0100)]
staging: rtl8723bs: remove useless typedef's in HalPhyRf.h

This commit fixes the following checkpatch.pl warnings:

    WARNING: do not add new typedefs
    #11: FILE: hal/HalPhyRf.h:11:
    +typedef enum _SPUR_CAL_METHOD {

    WARNING: do not add new typedefs
    #16: FILE: hal/HalPhyRf.h:16:
    +typedef enum _PWRTRACK_CONTROL_METHOD {

    WARNING: do not add new typedefs
    #27: FILE: hal/HalPhyRf.h:27:
    +typedef struct _TXPWRTRACK_CFG {

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210305144906.18850-1-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: removed unused code block
Fabio Aiuto [Fri, 5 Mar 2021 19:17:16 +0000 (20:17 +0100)]
staging: rtl8723bs: removed unused code block

Removed conditional code block checked by unused CONFIG_TX_BCAST2UNI

This patch does the cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210305191713.GA2466@agape.jhs
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: rename parameters of odm_phy_status_query()
Michael Straube [Sat, 6 Mar 2021 08:11:33 +0000 (09:11 +0100)]
staging: rtl8188eu: rename parameters of odm_phy_status_query()

Rename parameters of odm_phy_status_query() to avoid camel case.

pDM_Odm -> dm_odm
pPhyInfo -> phy_info
pPhyStatus -> phy_status
pPktinfo -> pkt_info

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210306081133.1272-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: rename ODM_PhyStatusQuery()
Michael Straube [Sat, 6 Mar 2021 08:11:32 +0000 (09:11 +0100)]
staging: rtl8188eu: rename ODM_PhyStatusQuery()

Rename ODM_PhyStatusQuery() to odm_phy_status_query() to avoid camel
case.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210306081133.1272-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vc04_services: vchiq_arm: fix error return code of vchiq_release_internal...
Jia-Ju Bai [Sat, 6 Mar 2021 13:22:45 +0000 (05:22 -0800)]
staging: vc04_services: vchiq_arm: fix error return code of vchiq_release_internal() and vchiq_use_internal()

When arm_state is NULL, no error return code of vchiq_release_internal()
and vchiq_use_internal() is assigned.
To fix this bug, ret is assigned with VCHIQ_ERROR.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20210306132245.16811-1-baijiaju1990@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: ralink-gdma: Check return code of device_reset
Giovanni Gherdovich [Sat, 6 Mar 2021 14:13:22 +0000 (15:13 +0100)]
staging: ralink-gdma: Check return code of device_reset

The device_reset() function is marked as "__must_check", thus the static
analysis tool "sparse" complains that in ralink-gdma its return value is
ignored. Log a warning in case it returns an error.

Signed-off-by: Giovanni Gherdovich <bobdc9664@seznam.cz>
Link: https://lore.kernel.org/r/20210306141322.7516-1-bobdc9664@seznam.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax: i2400m: fix some incorrect type warnings
Darryl T. Agostinelli [Mon, 8 Mar 2021 14:48:39 +0000 (08:48 -0600)]
staging: wimax: i2400m: fix some incorrect type warnings

Fix some "incorrect type in assignment" warnings reported by sparse in fw.c

sparse warnings:
wimax/i2400m/fw.c:266:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:266:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:267:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:267:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:268:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:268:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:269:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:269:25: warning: incorrect type in assignment (different base types)

Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
Link: https://lore.kernel.org/r/20210308144839.2364329-1-dagostinelli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax/i2400m: convert __le32 type to host byte-order
karthik alapati [Sun, 21 Feb 2021 15:31:28 +0000 (21:01 +0530)]
staging: wimax/i2400m: convert __le32 type to host byte-order

fix sparse type warning by converting __le32 types
to host byte-order types before comparison

Signed-off-by: karthik alapati <mail@karthek.com>
Link: https://lore.kernel.org/r/87f93e091f736cb422f1d557fa5a2ac752f057a8.1613921277.git.mail@karthek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax/i2400m: fix byte-order issue
karthik alapati [Sun, 21 Feb 2021 15:31:05 +0000 (21:01 +0530)]
staging: wimax/i2400m: fix byte-order issue

fix sparse byte-order warnings by converting host byte-order
type to __le16 byte-order types before assigning to hdr.length

Signed-off-by: karthik alapati <mail@karthek.com>
Link: https://lore.kernel.org/r/0ae5c5c4c646506d8be871e7be5705542671a1d5.1613921277.git.mail@karthek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove redundant variable shadowing
Nikolay Kyx [Tue, 2 Mar 2021 13:32:17 +0000 (16:32 +0300)]
staging: rtl8192e: remove redundant variable shadowing

In function rtl92e_start_adapter() automatic variable 'i' referenced only
within certain loops, used as iteration counter. Control flow can't get
into such loop w/o 'i = 0' assignment.

It's redundant to shadow this variable by creating scope around loop.

This patch fixes the following sparse warning:

warning: symbol 'i' shadows an earlier one

Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210302133217.145994-1-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: reformat rx_ts_record struct
William Durand [Mon, 1 Mar 2021 21:53:34 +0000 (21:53 +0000)]
staging: rtl8192e: reformat rx_ts_record struct

This change uses a space instead of tabs between the type and name of
each member of the struct.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-10-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxLastFragNum to rx_last_frag_num in rx_ts_record struct
William Durand [Mon, 1 Mar 2021 21:53:33 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxLastFragNum to rx_last_frag_num in rx_ts_record struct

Rename RxLastFragNum to rx_last_frag_num to silence a checkpatch warning
about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-9-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxLastSeqNum to rx_last_seq_num in rx_ts_record struct
William Durand [Mon, 1 Mar 2021 21:53:32 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxLastSeqNum to rx_last_seq_num in rx_ts_record struct

Rename RxLastSeqNum to rx_last_seq_num to silence a checkpatch warning
about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-8-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxAdmittedBARecord to rx_admitted_ba_record in rx_ts_record...
William Durand [Mon, 1 Mar 2021 21:53:31 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxAdmittedBARecord to rx_admitted_ba_record in rx_ts_record struct

Rename RxAdmittedBARecord to rx_admitted_ba_record to silence a
checkpatch warning about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-7-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxPktPendingTimer to rx_pkt_pending_timer in rx_ts_record...
William Durand [Mon, 1 Mar 2021 21:53:30 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxPktPendingTimer to rx_pkt_pending_timer in rx_ts_record struct

Rename RxPktPendingTimer to rx_pkt_pending_timer to silence a checkpatch
warning about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxPendingPktList to rx_pending_pkt_list in rx_ts_record...
William Durand [Mon, 1 Mar 2021 21:53:29 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxPendingPktList to rx_pending_pkt_list in rx_ts_record struct

Rename RxPendingPktList to rx_pending_pkt_list to silence a checkpatch
warning about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq in rx_ts_re...
William Durand [Mon, 1 Mar 2021 21:53:28 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq in rx_ts_record struct

Rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq to silence a
checkpatch warning about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record struct
William Durand [Mon, 1 Mar 2021 21:53:27 +0000 (21:53 +0000)]
staging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record struct

Rename RxIndicateSeq to rx_indicate_seq to silence a checkpatch warning
about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename TsCommonInfo to ts_common_info in rx_ts_record struct
William Durand [Mon, 1 Mar 2021 21:53:26 +0000 (21:53 +0000)]
staging: rtl8192e: rename TsCommonInfo to ts_common_info in rx_ts_record struct

Rename TsCommonInfo to ts_common_info to silence a checkpatch warning
about CamelCase.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210301215335.767-2-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: os_dep: Replace sprintf with scnprintf
Candy Febriyanto [Mon, 1 Mar 2021 15:00:11 +0000 (22:00 +0700)]
staging: rtl8723bs: os_dep: Replace sprintf with scnprintf

The use of sprintf with format string here means that there is a risk
that the writes will go out of bounds, replace it with scnprintf.

In one block of the translate_scan function sprintf is only called once
(it's not being used to concatenate strings) so there is no need to keep
the pointer "p", remove it.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Candy Febriyanto <cfebriyanto@gmail.com>
Link: https://lore.kernel.org/r/d76c5f1db8dbf02ac0ab954b0971ce24e5a8b9bd.1614610197.git.cfebriyanto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: Replace sprintf with scnprintf
Candy Febriyanto [Mon, 1 Mar 2021 15:01:50 +0000 (22:01 +0700)]
staging: rtl8723bs: hal: Replace sprintf with scnprintf

The use of sprintf with format string here means that there is a risk
that the writes will go out of bounds, replace it with scnprintf.

Also avoid unnecessarily passing "%s" on some of the function calls.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Candy Febriyanto <cfebriyanto@gmail.com>
Link: https://lore.kernel.org/r/ed564fb9e325f757b2b937df37689d40b96d8831.1614610197.git.cfebriyanto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: Replace sprintf with scnprintf
Candy Febriyanto [Mon, 1 Mar 2021 14:58:17 +0000 (21:58 +0700)]
staging: rtl8723bs: core: Replace sprintf with scnprintf

The use of sprintf with format string here means that there is a risk
that the writes will go out of bounds, replace it with scnprintf.

In on_action_public_default the variable "cnt" isn't being used for
anything meaningful so remove it.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Candy Febriyanto <cfebriyanto@gmail.com>
Link: https://lore.kernel.org/r/6c260641164d6856fc4447555fe739124cb27c19.1614610197.git.cfebriyanto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*
Ivan Safonov [Sat, 27 Feb 2021 22:22:37 +0000 (01:22 +0300)]
staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*

cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
improve code consistency.

Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210227222236.581490-5-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging:rtl8712: use IEEE80211_FCTL_* kernel definitions
Ivan Safonov [Sat, 27 Feb 2021 22:22:36 +0000 (01:22 +0300)]
staging:rtl8712: use IEEE80211_FCTL_* kernel definitions

_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_,
_PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_*
kernel definitions.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210227222236.581490-4-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging:rtl8712: remove unused definitions from wifi.h
Ivan Safonov [Sat, 27 Feb 2021 22:22:35 +0000 (01:22 +0300)]
staging:rtl8712: remove unused definitions from wifi.h

These definitions are not used and will not be useful in the future.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210227222236.581490-3-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)A
Ivan Safonov [Sat, 27 Feb 2021 22:22:34 +0000 (01:22 +0300)]
staging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)A

get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210227222236.581490-2-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: fwserial: minor coding style fix
Lee Gibson [Fri, 26 Feb 2021 11:48:00 +0000 (11:48 +0000)]
staging: fwserial: minor coding style fix

Fixes this checkpatch warning
WARNING: Integer promotion: Using 'h' in '%04hx' is unnecessary

Signed-off-by: Lee Gibson <leegib@gmail.com>
Link: https://lore.kernel.org/r/20210226114800.316897-1-leegib@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Clear stale AI data on detach
Ian Abbott [Mon, 1 Mar 2021 16:57:57 +0000 (16:57 +0000)]
staging: comedi: dt2814: Clear stale AI data on detach

When the Comedi "detach" handler is called, it is possible that an extra
A/D conversion (triggered during termination of a Comedi asynchronous
command) is still in progress.  In that case, the FINISH bit in the
Status register will eventually get set and there will be stale data
waiting to be read from the A/D Data register.  The interrupt handler
will also be called if still connected at the time.  That should all be
mostly harmless, but it would be better to wait for any such conversion
to complete and clear any stale data during the "detach".  Add a custom
"detach" handler `dt2814_detach()` to do that if an interrupt handler
has been set up.  (There is no need to do it if no interrupt handler was
set up because Comedi asynchronous command support is disabled in that
case.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-7-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Remove struct dt2814_private
Ian Abbott [Mon, 1 Mar 2021 16:57:56 +0000 (16:57 +0000)]
staging: comedi: dt2814: Remove struct dt2814_private

The `ntrig` member of the `struct dt2814_private` pointed to by
`dev->private` is no longer used as a counter to determine the end of
acquisition for a Comedi asynchronous command.  The other member
`curadscan` is also unused.  Remove the allocation of the private data
during initialization and remove the definition of `struct
dt2814_private` since they are no longer needed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-6-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Fix asynchronous command interrupt handling
Ian Abbott [Mon, 1 Mar 2021 16:57:55 +0000 (16:57 +0000)]
staging: comedi: dt2814: Fix asynchronous command interrupt handling

The support for asynchronous commands in this driver is currently
broken.  If interrupts are enabled, the interrupt handler is called at
the end of every A/D conversion.  A/D conversions could be due to
software-triggered conversions resulting from Comedi `INSN_READ`
instruction handling, or due to timer-trigger conversions enabled when
a Comedi asynchronous command is set up.  We only want the interrupt
handler to read a sample from the A/D Data register for timer-triggered
conversions, but currently it always reads the A/D Data register.  Since
the A/D Data register is read twice (to read a 12-bit value from an
8-bit register), that probably interferes with the reading for
software-triggered conversions.

The interrupt handler does not currently do anything with the data, it
just ignores it.  It should be written to the Comedi buffer if handling
an asynchronous command.

Other problems are that the driver has no Comedi `cancel` handler to
call when the asynchronous command is being stopped manually, and it
does not handle "infinite" acquisitions (when the command's `stop_src ==
TRIG_NONE`) properly.

Change the interrupt handler to check the timer enable (ENB) bit to
check the asynchronous command is active and return early if not
enabled.  Also check the error (ERR) and "conversion complete" (FINISH)
bits, and return early if neither is set.  Then the sample can be read
from the A/D Data register to clear the ERR and FINISH bits.  If the ERR
bit was set, terminate the acquisition with an error, otherwise write
the data to the Comedi buffer and check for end of acquisition.  Replace
the current check for end of acquisition, using the count of completed
scans in `scans_done` (updated by calls to `comedi_buf_write_samples()`)
when `stop_src == TRIG_COUNT`) and allowing "infinite" acquisitions when
`stop_src == TRIG_NONE`.

Add a `cancel` handler function `dt2814_ai_cancel()` that will be called
when the end of acquisition event is processed and when the acquisition
is stopped manually.  It turns off the timer enable (ENB) bit in the
Control register, leaving the current channel selected.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-5-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Call dt2814_ai_clear() during initialization
Ian Abbott [Mon, 1 Mar 2021 16:57:54 +0000 (16:57 +0000)]
staging: comedi: dt2814: Call dt2814_ai_clear() during initialization

The Comedi "attach" handler `dt2814_attach()` writes to the Control
register to turn off the timer enable 'ENB' bit, which triggers a
conversion.  It then sleeps awhile and checks the Status register,
returning an error if the ERR bit is set.  However, the ERR bit could
have been set due to the conversion being triggered while the A/D
converter was busy (unlikely) or due to the conversion being triggered
before some previous sample had been read from the A/D Data register.

Replace the existing code with a call to `dt2814_ai_clear()` which waits
for any conversion to finish and then clears any unread data or error
condition.  A non-zero return value from `dt2814_ai_clear()` indicates a
time-out while waiting for the A/D converter to become non-busy.  Return
an error in that case.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-4-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Don't wait for conversion in interrupt handler
Ian Abbott [Mon, 1 Mar 2021 16:57:53 +0000 (16:57 +0000)]
staging: comedi: dt2814: Don't wait for conversion in interrupt handler

When the interrupt handler decides the final sample has been acquired,
it turns off the timer enable (ENB) bit in the Command register.  That
triggers another A/D conversion.  The interrupt handler currently waits
for that to finish and then reads the resulting, unwanted sample.  Since
the functions for handling Comedi read instructions and for setting up
asynchronous commands now call `dt2814_ai_clear()` to wait for and
discard any spurious A/D conversion, let's remove that code from the
interrupt handler.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: dt2814: Clear stale AI data before operation
Ian Abbott [Mon, 1 Mar 2021 16:57:52 +0000 (16:57 +0000)]
staging: comedi: dt2814: Clear stale AI data before operation

When performing a Comedi read instruction or setting up an asynchronous
command on the AI subdevice, clear any stale data on the A/D registers
by waiting for the Status register's BUSY bit to clear (if set) and then
if the FINISH or ERR bit is set, reading the A/D Data register twice to
clear the stale data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-2-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Remove the hardcoding of the clock outputs
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:39 +0000 (18:40 +0530)]
staging: clocking-wizard: Remove the hardcoding of the clock outputs

The number of output clocks are configurable in the hardware.
Currently the driver registers the maximum number of outputs.
Fix the same by registering only the outputs that are there.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-8-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Add support for fractional support
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:38 +0000 (18:40 +0530)]
staging: clocking-wizard: Add support for fractional support

Currently the set rate granularity is to integral divisors.
Add support for the fractional divisors.
Only the first output0 is fractional in the hardware.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-7-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Add support for dynamic reconfiguration
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:37 +0000 (18:40 +0530)]
staging: clocking-wizard: Add support for dynamic reconfiguration

The patch adds support for dynamic reconfiguration of clock output rate.
Output clocks are registered as dividers and set rate callback function
is used for dynamic reconfiguration.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Co-developed-by: Chirag Parekh <chirag.parekh@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-6-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Allow changing of parent rate for single output
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:36 +0000 (18:40 +0530)]
staging: clocking-wizard: Allow changing of parent rate for single output

If there is only one output then allow changing of the parent rate.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-5-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Update the fixed factor divisors
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:35 +0000 (18:40 +0530)]
staging: clocking-wizard: Update the fixed factor divisors

Update the fixed factor clock registration to register the divisors.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-4-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Rename speed-grade to xlnx,speed-grade
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:34 +0000 (18:40 +0530)]
staging: clocking-wizard: Rename speed-grade to xlnx,speed-grade

Rename speed-grade to xlnx,speed-grade

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-3-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: clocking-wizard: Fix kernel-doc warning
Shubhrajyoti Datta [Wed, 24 Feb 2021 13:10:33 +0000 (18:40 +0530)]
staging: clocking-wizard: Fix kernel-doc warning

Fix the clocking wizard main structure kernel documentation.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1614172241-17326-2-git-send-email-shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: reformat bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:09 +0000 (17:29 +0000)]
staging: rtl8192e: reformat bss_ht struct

This change uses a space instead of tabs between the type and name of
each member of the struct.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-14-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHT1R to bd_ht_1r in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:08 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdHT1R to bd_ht_1r in bss_ht struct

Rename bdHT1R to bd_ht_1r to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-13-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename RT2RT_HT_Mode to rt2rt_ht_mode in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:07 +0000 (17:29 +0000)]
staging: rtl8192e: rename RT2RT_HT_Mode to rt2rt_ht_mode in bss_ht struct

Rename RT2RT_HT_Mode to rt2rt_ht_mode to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-12-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time in bss_ht...
William Durand [Sat, 20 Feb 2021 17:29:06 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time in bss_ht struct

Rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time to silence a
checkpatch warning about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-11-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdRT2RTAggregation to bd_rt2rt_aggregation in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:05 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdRT2RTAggregation to bd_rt2rt_aggregation in bss_ht struct

Rename bdRT2RTAggregation to bd_rt2rt_aggregation to silence a
checkpatch warning about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-10-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdBandWidth to bd_bandwidth in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:04 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdBandWidth to bd_bandwidth in bss_ht struct

Rename bdBandWidth to bd_bandwidth to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-9-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHTSpecVer to bd_ht_spec_ver in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:03 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdHTSpecVer to bd_ht_spec_ver in bss_ht struct

Rename bdHTSpecVer to bd_ht_spec_ver to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-8-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHTInfoLen to bd_ht_info_len in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:02 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdHTInfoLen to bd_ht_info_len in bss_ht struct

Rename bdHTInfoLen to bd_ht_info_len to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-7-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHTInfoBuf to bd_ht_info_buf in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:01 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdHTInfoBuf to bd_ht_info_buf in bss_ht struct

Rename bdHTInfoBuf to bd_ht_info_buf to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHTCapLen to bd_ht_cap_len in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:29:00 +0000 (17:29 +0000)]
staging: rtl8192e: rename bdHTCapLen to bd_ht_cap_len in bss_ht struct

Rename bdHTCapLen to bd_ht_cap_len to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:28:59 +0000 (17:28 +0000)]
staging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht struct

Rename bdHTCapBuf to bd_ht_cap_buf to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bdSupportHT to bd_support_ht in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:28:58 +0000 (17:28 +0000)]
staging: rtl8192e: rename bdSupportHT to bd_support_ht in bss_ht struct

Rename bdSupportHT to bd_support_ht to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove blank line in bss_ht struct
William Durand [Sat, 20 Feb 2021 17:28:57 +0000 (17:28 +0000)]
staging: rtl8192e: remove blank line in bss_ht struct

Fix a checkpatch warning about a blank line after an open curly brace.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-2-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax: fix code style issues
Hassan Shahbazi [Tue, 23 Feb 2021 06:42:29 +0000 (08:42 +0200)]
staging: wimax: fix code style issues

Fixes 'WARNING: Missing a blank line after declarations' generated by
checkpatch.pl script.

Signed-off-by: Hassan Shahbazi <h.shahbazi.git@gmail.com>
Link: https://lore.kernel.org/r/20210223064227.62631-1-h.shahbazi.git@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vc04_services: fix indent in vchiq_debugfs_node
Bastien Maureille [Mon, 22 Feb 2021 18:18:14 +0000 (19:18 +0100)]
staging: vc04_services: fix indent in vchiq_debugfs_node

Fix checkpatch.pl warning regarding space indents and replace it with
tabs to comply with kernel coding style.

Signed-off-by: Bastien Maureille <bastien.maureille@gmail.com>
Link: https://lore.kernel.org/r/20210222181812.268909-1-bastien.maureille@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rt8192u: Move constant in comparison to the RHS
Simone Serra [Tue, 23 Feb 2021 23:41:02 +0000 (00:41 +0100)]
staging: rt8192u: Move constant in comparison to the RHS

Fixes checkpatch warning:

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Simone Serra <serrazimone@gmail.com>
Link: https://lore.kernel.org/r/20210223234102.15784-1-serrazimone@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax: Fix block comment style issue in stack.c
Amrit Khera [Mon, 22 Feb 2021 10:15:42 +0000 (15:45 +0530)]
staging: wimax: Fix block comment style issue in stack.c

This change fixes a checkpatch warning for "Block comments use
* on subsequent lines". It removes the unnecessary block comment.

Signed-off-by: Amrit Khera <amritkhera98@gmail.com>
Link: https://lore.kernel.org/r/20210222101541.2571-1-amritkhera98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: Remove filename reference from file
George Xanthakis [Sun, 21 Feb 2021 17:05:42 +0000 (19:05 +0200)]
staging: android: Remove filename reference from file

This commit fixes a checkpatch warning that references the filename in
the the file comments.

Signed-off-by: George Xanthakis <kompiouterakias@gmail.com>
Link: https://lore.kernel.org/r/20210221170542.45309-1-kompiouterakias@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi dt2814: Removed unused variables
Fatih Yildirim [Sun, 21 Feb 2021 20:28:55 +0000 (23:28 +0300)]
staging: comedi dt2814: Removed unused variables

Removed unused variables.

Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Fatih Yildirim <yildirim.fatih@gmail.com>
Link: https://lore.kernel.org/r/20210221202855.12442-1-yildirim.fatih@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax: i2400m: add space before open parenthesis
Rajesh Kumbhakar [Sun, 21 Feb 2021 13:39:51 +0000 (05:39 -0800)]
staging: wimax: i2400m: add space before open parenthesis

fixing ERROR: space required before the open parenthesis '('

Signed-off-by: Rajesh Kumbhakar <sssraj.sssraj@gmail.com>
Link: https://lore.kernel.org/r/20210221133951.21234-1-sssraj.sssraj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: kpc2000: code style: fix line length issue
Nikolay Kyx [Sun, 21 Feb 2021 13:22:46 +0000 (16:22 +0300)]
staging: kpc2000: code style: fix line length issue

This patch fixes the following checkpatch.pl warning:

WARNING: line length of 124 exceeds 100 columns

in file kpc2000_i2c.c

Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210221132246.1154-2-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: kpc2000: code style: match alignment with open parenthesis
Nikolay Kyx [Sun, 21 Feb 2021 13:22:45 +0000 (16:22 +0300)]
staging: kpc2000: code style: match alignment with open parenthesis

This patch fixes the following checkpatch.pl check:

CHECK: Alignment should match open parenthesis

in files kpc2000_i2c.c kpc2000_spi.c

Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210221132246.1154-1-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: fix alignment issues in rtllib_wx.c
William Durand [Fri, 19 Feb 2021 23:33:52 +0000 (23:33 +0000)]
staging: rtl8192e: fix alignment issues in rtllib_wx.c

Fixes "Alignment should match open parenthesis" issues reported by
checkpatch.pl in the `rtllib_wx.c` file.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219233352.2298-1-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: reformat ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:28 +0000 (23:11 +0000)]
staging: rtl8192e: reformat ba_record struct

This change uses a space instead of tabs between the type and name of
each member of the struct.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-8-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename BaStartSeqCtrl to ba_start_seq_ctrl in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:27 +0000 (23:11 +0000)]
staging: rtl8192e: rename BaStartSeqCtrl to ba_start_seq_ctrl in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-7-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename BaTimeoutValue to ba_timeout_value in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:26 +0000 (23:11 +0000)]
staging: rtl8192e: rename BaTimeoutValue to ba_timeout_value in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename BaParamSet to ba_param_set in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:25 +0000 (23:11 +0000)]
staging: rtl8192e: rename BaParamSet to ba_param_set in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename DialogToken to dialog_token in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:24 +0000 (23:11 +0000)]
staging: rtl8192e: rename DialogToken to dialog_token in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename bValid to b_valid in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:23 +0000 (23:11 +0000)]
staging: rtl8192e: rename bValid to b_valid in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename Timer to timer in ba_record struct
William Durand [Fri, 19 Feb 2021 23:11:22 +0000 (23:11 +0000)]
staging: rtl8192e: rename Timer to timer in ba_record struct

Fixes a checkpatch CHECK issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219231128.27119-2-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename TID to tid in delba_param_set union
William Durand [Fri, 19 Feb 2021 16:14:00 +0000 (16:14 +0000)]
staging: rtl8192e: rename TID to tid in delba_param_set union

This change uses lowercase for a field name to be more consistent with
the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219161400.29316-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename Initiator to initiator in delba_param_set union
William Durand [Fri, 19 Feb 2021 16:13:59 +0000 (16:13 +0000)]
staging: rtl8192e: rename Initiator to initiator in delba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219161400.29316-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename Reserved to reserved in delba_param_set union
William Durand [Fri, 19 Feb 2021 16:13:58 +0000 (16:13 +0000)]
staging: rtl8192e: rename Reserved to reserved in delba_param_set union

This change uses lowercase for a field name to be more consistent with
the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219161400.29316-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename shortData to short_data in delba_param_set union
William Durand [Fri, 19 Feb 2021 16:13:57 +0000 (16:13 +0000)]
staging: rtl8192e: rename shortData to short_data in delba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219161400.29316-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename charData to char_data in delba_param_set union
William Durand [Fri, 19 Feb 2021 16:13:56 +0000 (16:13 +0000)]
staging: rtl8192e: rename charData to char_data in delba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219161400.29316-2-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: fix code style comparison warning
Kurt Manucredo [Fri, 19 Feb 2021 18:23:54 +0000 (18:23 +0000)]
staging: rtl8723bs: fix code style comparison warning

checkpatch gives the following WARNING:
WARNING: Comparisons should place the constant on the right side of the test
this patch fixes the coding style warning.

Signed-off-by: Kurt Manucredo <fuzzybritches@protonmail.com>
Link: https://lore.kernel.org/r/20210219182331.8-1-fuzzybritches@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: gasket: removed unnecessary debug message to fix coding style warning
Ashish Vara [Fri, 19 Feb 2021 18:14:33 +0000 (23:44 +0530)]
staging: gasket: removed unnecessary debug message to fix coding style warning

removed unnecessary out of memory message to fix coding style warning.

Signed-off-by: Ashish Vara <ashishvara89@yahoo.com>
Link: https://lore.kernel.org/r/0c041d98-9b0f-95a3-3b19-ff94243a0bbc@yahoo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: gasket Fix comparison with Null
Mayank Suman [Fri, 19 Feb 2021 17:41:14 +0000 (23:11 +0530)]
staging: gasket Fix comparison with Null

Comparison with NULL is redundant
as pointer will evaluate to true if is non-NULL.
The change was suggested by checkpatch.pl.

Signed-off-by: Mayank Suman <mayanksuman@live.com>
Link: https://lore.kernel.org/r/PS1PR04MB2934D85E82A3730349F56FE9D6849@PS1PR04MB2934.apcprd04.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: octeon: cleanup unnecessary parentheses in ethernet-spmi.c
Shreesh Adiga [Fri, 19 Feb 2021 17:07:37 +0000 (22:37 +0530)]
staging: octeon: cleanup unnecessary parentheses in ethernet-spmi.c

checkpatch.pl reported issue of unnecessary parentheses for the
expression. It has been removed to fix the report.

Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
Link: https://lore.kernel.org/r/20210219170737.1138083-1-16567adigashreesh@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: fwserial: match alignment with open parenthesis
Nikolay Kyx [Fri, 19 Feb 2021 15:49:17 +0000 (18:49 +0300)]
staging: fwserial: match alignment with open parenthesis

This patch fixes the following checkpatch.pl check:

CHECK: Alignment should match open parenthesis

in file fwserial.c

Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210219154917.23388-1-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192u: remove unnecessary return in r8190_rtl8256.c
Du Cheng [Fri, 19 Feb 2021 15:05:27 +0000 (23:05 +0800)]
staging: rtl8192u: remove unnecessary return in r8190_rtl8256.c

remove the unnecessary return at the end of function
phy_set_rf8256_ofdm_tx_power(), reported by scripts/checkpatch.pl.

Signed-off-by: Du Cheng <ducheng2@gmail.com>
Link: https://lore.kernel.org/r/20210219150527.8358-2-ducheng2@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192u: fix RT_TRACE() in r8190_rtl8256.c
Du Cheng [Fri, 19 Feb 2021 15:05:26 +0000 (23:05 +0800)]
staging: rtl8192u: fix RT_TRACE() in r8190_rtl8256.c

use MACRO __func__ instead of the literal names for RT_TRACE()
in phy_set_rf8256_bandwidth() and phy_rf8256_config_para_file(),
as reported by scripts/checkpatch.pl.

Signed-off-by: Du Cheng <ducheng2@gmail.com>
Link: https://lore.kernel.org/r/20210219150527.8358-1-ducheng2@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: greybus: Fix blank line style issue in sdio.c
Amrit Khera [Fri, 19 Feb 2021 14:42:31 +0000 (20:12 +0530)]
staging: greybus: Fix blank line style issue in sdio.c

This change fixes a checkpatch check for "Please don't use
multiple blank lines".

Signed-off-by: Amrit Khera <amritkhera98@gmail.com>
Link: https://lore.kernel.org/r/20210219144230.32055-1-amritkhera98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: sm750fb: added identifier names for function declarations
shivang upadhyay [Fri, 19 Feb 2021 10:08:03 +0000 (15:38 +0530)]
staging: sm750fb: added identifier names for function declarations

checkpatch.pl complains about not having identifiers names in
function declarations . This patch uses the same names as are
used in source file sm750_accel.c , but with snake case.

Signed-off-by: shivang upadhyay <oroz3x@gmail.com>
Link: https://lore.kernel.org/r/20210219100803.5311-1-oroz3x@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: hikey9xx: fix warning styling issues
Alaa Emad [Fri, 19 Feb 2021 10:18:12 +0000 (12:18 +0200)]
staging: hikey9xx: fix warning styling issues

Fix "WARNING: please, no space before tabs" styling issue in
hi6421-spmi-pmic.c for lines 51,52,53 and 69.

Signed-off-by: Alaa Emad <alaaemadhossney.ae@gmail.com>
Link: https://lore.kernel.org/r/20210219101812.3483-1-alaaemadhossney.ae@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename TID to tid in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:06 +0000 (10:12 +0000)]
staging: rtl8192e: rename TID to tid in ba_param_set union

This change uses lowercase for a field name to be more consistent with
the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-7-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename AMSDU_Support to amsdu_support in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:05 +0000 (10:12 +0000)]
staging: rtl8192e: rename AMSDU_Support to amsdu_support in ba_param_set union

This change does not fix a checkpatch issue but it is more consistent
with the rest of the union.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename BufferSize to buffer_size in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:04 +0000 (10:12 +0000)]
staging: rtl8192e: rename BufferSize to buffer_size in ba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename BAPolicy to ba_policy in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:03 +0000 (10:12 +0000)]
staging: rtl8192e: rename BAPolicy to ba_policy in ba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename shortData to short_data in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:02 +0000 (10:12 +0000)]
staging: rtl8192e: rename shortData to short_data in ba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename charData to char_data in ba_param_set union
William Durand [Fri, 19 Feb 2021 10:12:01 +0000 (10:12 +0000)]
staging: rtl8192e: rename charData to char_data in ba_param_set union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219101206.18036-2-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wimax/i2400m: don't change the endianness of one byte variable
Muhammad Usama Anjum [Thu, 18 Feb 2021 09:21:54 +0000 (14:21 +0500)]
staging: wimax/i2400m: don't change the endianness of one byte variable

It is wrong to change the endianness of a variable which has just one
byte size.

Sparse warnings fixed:
drivers/staging//wimax/i2400m/control.c:452:17: warning: cast to restricted __le32
drivers/staging//wimax/i2400m/control.c:452:17: warning: cast to restricted __le32
drivers/staging//wimax/i2400m/op-rfkill.c:159:14: warning: cast to restricted __le32
drivers/staging//wimax/i2400m/op-rfkill.c:160:14: warning: cast to restricted __le32

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20210218092154.GA46388@LEGION
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6656: Fix alignment of function args
Florian Ziegler [Thu, 18 Feb 2021 23:22:15 +0000 (00:22 +0100)]
staging: vt6656: Fix alignment of function args

Align function arguments to fix checkpatch.pl CHECK message and rewrap
to match the file's style.

Signed-off-by: Florian Ziegler <florian.ziegler@posteo.de>
Link: https://lore.kernel.org/r/20210218232215.17508-1-florian.ziegler@posteo.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: Format comments
Suryashankar Das [Thu, 18 Feb 2021 18:24:15 +0000 (23:54 +0530)]
staging: rtl8188eu: Format comments

This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments should align the * on each line

Signed-off-by: Suryashankar Das <suryashankardas.2002@gmail.com>
Link: https://lore.kernel.org/r/20210218182414.49107-1-suryashankardas.2002@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: emxx_udc: remove unused variable driver_desc
Sean Behan [Wed, 17 Feb 2021 14:21:15 +0000 (09:21 -0500)]
staging: emxx_udc: remove unused variable driver_desc

When building with W=1 (or however you found it), there is a warning
that this variable is unused.

It is not used so remove it to fix the warning.

Signed-off-by: Sean Behan <codebam@riseup.net>
Link: https://lore.kernel.org/r/20210217142118.7107-1-codebam@riseup.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: qlge: fix comment style in qlge_main.c
Du Cheng [Tue, 16 Feb 2021 10:19:45 +0000 (18:19 +0800)]
staging: qlge: fix comment style in qlge_main.c

fix the closing of a one-line block comment,
marked incorrect by scripts/checkpatch.pl.

Signed-off-by: Du Cheng <ducheng2@gmail.com>
Link: https://lore.kernel.org/r/20210216101945.187474-1-ducheng2@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: Remove unused function pointer typedef wi_act_func
Chen Lin [Mon, 15 Feb 2021 13:02:54 +0000 (21:02 +0800)]
staging: rtl8723bs: Remove unused function pointer typedef wi_act_func

Remove the 'wi_act_func' typedef as it is not used.

Signed-off-by: Chen Lin <chen.lin5@zte.com.cn>
Link: https://lore.kernel.org/r/1613394174-3826-1-git-send-email-chen45464546@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename SeqNum to seq_num in sequence_control union
William Durand [Sun, 14 Feb 2021 14:03:32 +0000 (14:03 +0000)]
staging: rtl8192e: rename SeqNum to seq_num in sequence_control union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210214140332.16175-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: rename FragNum to frag_num in sequence_control union
William Durand [Sun, 14 Feb 2021 14:03:31 +0000 (14:03 +0000)]
staging: rtl8192e: rename FragNum to frag_num in sequence_control union

Fixes a checkpatch CHECK message.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210214140332.16175-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>