]> asedeno.scripts.mit.edu Git - linux.git/log
linux.git
6 years agostaging: mt7621-mmc: fix spelling mistake: "Eanable" -> "Enable"
Colin Ian King [Fri, 18 May 2018 10:03:59 +0000 (11:03 +0100)]
staging: mt7621-mmc: fix spelling mistake: "Eanable" -> "Enable"

Trivial fix to spelling mistake in N_MSG message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: fix coding style issues in p80211netdev.c
Tim Collier [Wed, 16 May 2018 07:53:05 +0000 (08:53 +0100)]
staging: wlan-ng: fix coding style issues in p80211netdev.c

Fix 2 "Alignment should match open parenthesis" messages issued by
checkpatch.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: fix coding style issues in p80211netdev.h
Tim Collier [Tue, 15 May 2018 07:44:27 +0000 (08:44 +0100)]
staging: wlan-ng: fix coding style issues in p80211netdev.h

Fix two issues with parameters not aligned to opening parenthesis, as
reported by checkpatch. File is now clean for checkpatch.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: goldfish: Kconfig: fixed code style issue
ankit patel [Wed, 16 May 2018 20:04:34 +0000 (15:04 -0500)]
Staging: goldfish: Kconfig: fixed code style issue

Style fix: config GOLDFISH_AUDIO containing "--help--" to "help"

Signed-off-by: ankit patel <ankit.mayurbhai.patel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoDelete the goldfish_nand driver.
Roman Kiryanov [Tue, 15 May 2018 20:58:45 +0000 (13:58 -0700)]
Delete the goldfish_nand driver.

This driver was inherited from qemu1 and not used anymore.

Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Switch to pr_warn_once in ion_buffer_destroy
Laura Abbott [Mon, 14 May 2018 21:35:09 +0000 (14:35 -0700)]
staging: android: ion: Switch to pr_warn_once in ion_buffer_destroy

Syzbot reported yet another warning with Ion:

WARNING: CPU: 0 PID: 1467 at drivers/staging/android/ion/ion.c:122
ion_buffer_destroy+0xd4/0x190 drivers/staging/android/ion/ion.c:122
Kernel panic - not syncing: panic_on_warn set ...

This is catching that a buffer was freed with an existing kernel mapping
still present. This can be easily be triggered from userspace by calling
DMA_BUF_SYNC_START without calling DMA_BUF_SYNC_END. Switch to a single
pr_warn_once to indicate the error without being disruptive.

Reported-by: syzbot+cd8bcd40cb049efa2770@syzkaller.appspotmail.com
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: add SPDX identifier
Sergio Paracuellos [Tue, 15 May 2018 04:49:54 +0000 (06:49 +0200)]
staging: mt7621-gpio: add SPDX identifier

It's good to have SPDX identifiers in driver files to make it easier to
audit the kernel tree for correct licenses.

Fix up the one of staging gpio-mt7621 file to have a proper SPDX
identifier, based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: fix some warnings because of lines exceeded 80 characters
Sergio Paracuellos [Tue, 15 May 2018 04:49:53 +0000 (06:49 +0200)]
staging: mt7621-gpio: fix some warnings because of lines exceeded 80 characters

This patch silence some complains of checkpatch script because
of the use of long lines.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: change object lookup to no wait mode
Lai Siyao [Tue, 15 May 2018 02:15:48 +0000 (22:15 -0400)]
staging: lustre: obdclass: change object lookup to no wait mode

Currently we set LU_OBJECT_HEARD_BANSHEE on object when we want
to remove object from cache, but this may lead to deadlock, because
when other process lookup such object, it needs to wait for this
object until release (done at last refcount put), while that process
maybe already hold an LDLM lock.

Now that current code can handle dying object correctly, we can just
return such object in lookup, thus the above deadlock can be avoided.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9049
Reviewed-on: https://review.whamcloud.com/26965
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-eth: Remove unused variable
Kamal Heib [Mon, 14 May 2018 20:20:03 +0000 (23:20 +0300)]
staging: mt7621-eth: Remove unused variable

Remove unused variable 'condition' which was set but not used.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Remove unused define
Nathan Chancellor [Mon, 14 May 2018 14:03:53 +0000 (07:03 -0700)]
staging: ks7010: Remove unused define

After commit 6d6612deaf55 ("staging: ks7010: Remove unnecessary limit
checks"), this define is not used anywhere. Remove it as well.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Fix checkpatch.pl errors
Sidong Yang [Mon, 14 May 2018 16:26:41 +0000 (16:26 +0000)]
staging: rtl8723bs: Fix checkpatch.pl errors

Move open brace to same line with enum.
Remove prohibited space before ','.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Check return value of ion_buffer_kmap_get
Nathan Chancellor [Mon, 14 May 2018 18:50:44 +0000 (11:50 -0700)]
staging: android: ion: Check return value of ion_buffer_kmap_get

GCC warns that vaddr is set but unused. Check the return value of
ion_buffer_kmap_get to make vaddr useful and make sure everything
is properly configured before beginning a DMA.

Suggested-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: use true/false instead of 1/0
Samuel Thibault [Mon, 14 May 2018 20:57:25 +0000 (22:57 +0200)]
staging: speakup: use true/false instead of 1/0

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging:Comedi:comedi_compat32.c: Lindent changes
Pratik Jain [Tue, 15 May 2018 05:20:39 +0000 (10:50 +0530)]
Staging:Comedi:comedi_compat32.c: Lindent changes

Recommended indentation by Lindent on file comedi_compat32.c

Signed-off-by: Pratik Jain <pratik.jain0509@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa
Sergio Paracuellos [Sun, 13 May 2018 18:35:58 +0000 (20:35 +0200)]
staging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa

There is an assignment inside hostif_sme_set_pmksa function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: use 'u16' for casts in assignments in hostif_sme_set_rsn
Sergio Paracuellos [Sun, 13 May 2018 18:35:57 +0000 (20:35 +0200)]
staging: ks7010: use 'u16' for casts in assignments in hostif_sme_set_rsn

There are some assignments inside hostif_sme_set_rsn function
which are being used together with cpu_to_le16 using uint16_t
as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change two parameter types in hostif_mic_failure_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:56 +0000 (20:35 +0200)]
staging: ks7010: change two parameter types in hostif_mic_failure_request

Parameters 'failure_count' and 'timer' was declared as unsigned
short and then there was being casted to u16 inside cpu_to_le16
to make the assignation. Just declare them as 'u16' and avoid
casting at all.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace uint* type into the u* ones in hostif_bss_scan_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:55 +0000 (20:35 +0200)]
staging: ks7010: replace uint* type into the u* ones in hostif_bss_scan_request

In function hostif_bss_scan_request parameters 'scan_ssid' and
'scan_ssid_len' are declared as uint8_t. Change them to be 'u8'
instead which is preferred. Also update two casts inside the same
function to use 'u32' instead of 'uint32_t'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace cast types in assignments in hostif_phy_information_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:54 +0000 (20:35 +0200)]
staging: ks7010: replace cast types in assignments in hostif_phy_information_request

There are some assignments inside hostif_phy_information_request
function which are being used together with cpu_to_le16 using
uint16_t as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace cast type in assignment in hostif_adhoc_set_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:53 +0000 (20:35 +0200)]
staging: ks7010: replace cast type in assignment in hostif_adhoc_set_request

There is an assignment inside hostif_adhoc_set_request function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace cast type in assignments in hostif_infrastructure_set_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:52 +0000 (20:35 +0200)]
staging: ks7010: replace cast type in assignments in hostif_infrastructure_set_request

There are some assignments inside hostif_infrastructure_set_request
function which are being used together with cpu_to_le16 using
uint16_t as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: use u16 as type for casting in hostif_ps_adhoc_set_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:51 +0000 (20:35 +0200)]
staging: ks7010: use u16 as type for casting in hostif_ps_adhoc_set_request

There is an assignment inside hostif_ps_adhoc_set_request function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace casts to use type u16 in init_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:50 +0000 (20:35 +0200)]
staging: ks7010: replace casts to use type u16 in init_request

There are soem assignments inside init_request function which
are being used together with cpu_to_le16 using uint16_t as cast
type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: use u16 as cast type in hostif_start_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:49 +0000 (20:35 +0200)]
staging: ks7010: use u16 as cast type in hostif_start_request

Use u16 as cast type in hostif_start_request function replacing
uint16_t which was being used.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: avoid no needed cast in ks_wlan_cap
Sergio Paracuellos [Sun, 13 May 2018 18:35:48 +0000 (20:35 +0200)]
staging: ks7010: avoid no needed cast in ks_wlan_cap

In ks_wlan_cap there is a cast to uint16_t to use cpu_to_le16
with variable 'capability' which is already defined as u16.
Avoid this cast to clean code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change parameter type in hostif_mib_get_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:47 +0000 (20:35 +0200)]
staging: ks7010: change parameter type in hostif_mib_get_request

Second parameter 'mib_attribute' in function hostif_mib_get_request
is declared as unsigned long and inside the function a cast to uint32_t
is being used. Just pass a u32 instead and avoid the casting.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request
Sergio Paracuellos [Sun, 13 May 2018 18:35:46 +0000 (20:35 +0200)]
staging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request

There are some castings inside the function hostif_data_request
which are being using with uint16_t type. Fields which have being
assigned are declared as u16. So update casts types to u16 in all
of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: use u16 as type for casting in hostif_data_indication_wpa
Sergio Paracuellos [Sun, 13 May 2018 18:35:45 +0000 (20:35 +0200)]
staging: ks7010: use u16 as type for casting in hostif_data_indication_wpa

Field 'counter' in mic_failure struct is being assigned casting
value using uint16_t. Replace with u16 which is the correct type
of the field and the preferred one.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace not standard uint type to unsigned int
Sergio Paracuellos [Sun, 13 May 2018 18:35:44 +0000 (20:35 +0200)]
staging: ks7010: replace not standard uint type to unsigned int

The field 'wakeup_count' in 'ks_wlan_private' struct is declared
as 'uint' which is not a standard type. Replace in favour of
'unsigned int' which it is.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace uint8_t with u8 in ks_wlan_set_rx_gain
Sergio Paracuellos [Sun, 13 May 2018 18:35:43 +0000 (20:35 +0200)]
staging: ks7010: replace uint8_t with u8 in ks_wlan_set_rx_gain

In function ks_wlan_set_rx_gain a cast to uint8_t is being used
to assign reception gain. 'rx_gain' field is defined as u8 so
replace the cast to the correct type

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace uint8_t with u8 in ks_wlan_set_tx_gain
Sergio Paracuellos [Sun, 13 May 2018 18:35:42 +0000 (20:35 +0200)]
staging: ks7010: replace uint8_t with u8 in ks_wlan_set_tx_gain

In function ks_wlan_set_tx_gain a cast to uint8_t is being used
to assign transmission gain. 'tx_gain' field is defined as u8 so
replace the cast to the correct type.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate
Sergio Paracuellos [Sun, 13 May 2018 18:35:41 +0000 (20:35 +0200)]
staging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate

There are some casts to uint8_t in ks_wlan_set_rate function to
assign values of the bitrate. Just change it to u8 which is the one
defined for the field 'body' of the struct which is in use.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change parameter type in ks_wlan_hw_rx function
Sergio Paracuellos [Sun, 13 May 2018 18:35:40 +0000 (20:35 +0200)]
staging: ks7010: change parameter type in ks_wlan_hw_rx function

The parameter 'size' in function ks_wlan_hw_rx is declared as
uint16_t and can be declared as size_t which makes more sense.
It is being passed to hif_align_size function which also expects
a size_t as parameter so just change its type. Also update two
casts in calls to this function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: change cast from uint16_t to u16
Sergio Paracuellos [Sun, 13 May 2018 18:35:39 +0000 (20:35 +0200)]
staging: ks7010: change cast from uint16_t to u16

Header size and event fields of header are declared
as __le16 and being casted using uint16_t in cpu_to_le16.
Change cast to use preferred u16.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: replace unsigned char type with u8
Sergio Paracuellos [Sun, 13 May 2018 18:35:38 +0000 (20:35 +0200)]
staging: ks7010: replace unsigned char type with u8

Variable 'byte' in ks7010_upload_firmware function is declared
as unsigned char and is only being used to read hardware
registers which are expected in sdio_read_byteb function as u8.
Change 'byte' variable type to u8 which is preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: remove no necessary blank line
Sergio Paracuellos [Sun, 13 May 2018 18:35:37 +0000 (20:35 +0200)]
staging: ks7010: remove no necessary blank line

There was two blank lines between definitions and statements
in ks7010_upload_firmware function. Remove one of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: remove not used definition WPA_CAPABILITY_PREAUTH
Sergio Paracuellos [Sun, 13 May 2018 18:35:36 +0000 (20:35 +0200)]
staging: ks7010: remove not used definition WPA_CAPABILITY_PREAUTH

The WPA_CAPABILITY_PREAUTH definition is not being used at all so
just remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835: Use BIT_ULL macro
Kilian Köppchen [Sun, 13 May 2018 16:21:34 +0000 (18:21 +0200)]
staging: bcm2835: Use BIT_ULL macro

This patch fixes the checkpatch.pl check hint:

CHECK: Prefer using the BIT_ULL macro

Signed-off-by: Kilian Köppchen <kiliankoeppchen@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-eth: Refactor ethtool stats
Kamal Heib [Sat, 12 May 2018 20:40:03 +0000 (23:40 +0300)]
staging: mt7621-eth: Refactor ethtool stats

This patch removes the ugly macro hack to make sure hw_stats and ethtool
strings are consisten, instead define a new struct which will hold the
stat string and his index within the hw_stats struct.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor host_int_parse_assoc_resp_info() to remove unused code
Ajay Singh [Fri, 11 May 2018 08:13:31 +0000 (13:43 +0530)]
staging: wilc1000: refactor host_int_parse_assoc_resp_info() to remove unused code

Remove 'connect_resp_info' structure as most of its elements are not used.

Modified wilc_parse_assoc_resp_info() to directly parse and fill value
in connect_info structure variable. Remove use of 'assoc_resp_len' variable.
get_assoc_resp_cap_info() & get_asoc_id() functions are remove as its
not used anymore.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove s8idxarray to avoid datatype in variable name
Ajay Singh [Fri, 11 May 2018 08:13:30 +0000 (13:43 +0530)]
staging: wilc1000: remove s8idxarray to avoid datatype in variable name

Cleanup patch to have variable names as per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structure
Ajay Singh [Fri, 11 May 2018 08:13:29 +0000 (13:43 +0530)]
staging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structure

Cleanup patch to remove the unused variable from 'wilc_priv' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: added comments for mutex and spinlock_t
Ajay Singh [Fri, 11 May 2018 08:13:28 +0000 (13:43 +0530)]
staging: wilc1000: added comments for mutex and spinlock_t

Added comments for mutex and spinlock_t to avoid checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove 'flag' argument from wilc_mac_indicate()
Ajay Singh [Fri, 11 May 2018 08:13:27 +0000 (13:43 +0530)]
staging: wilc1000: remove 'flag' argument from wilc_mac_indicate()

Remove 'flag' function parameter in wilc_mac_indicate() as only one
condition was handled using that parameter. Also removed unnecessary
call to wilc_mac_indicate() as no operation was performed in that
function call.
After above changes below macros are not required anymore.
WILC_MAC_INDICATE_STATUS 0x1
WILC_MAC_INDICATE_SCAN 0x2

This changes also helped in resolving the line over 80 chars issue
found by checkatpch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: added #define for setting radiotap header
Ajay Singh [Fri, 11 May 2018 08:13:26 +0000 (13:43 +0530)]
staging: wilc1000: added #define for setting radiotap header

Added new macro to resolve below checkpatch issues in linux_mon.

"Lines should not end with a '('"

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_sdio struct
Ajay Singh [Fri, 11 May 2018 08:13:25 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_sdio struct

Fix line over 80 chars issue found by checkpatch.pl script by placing
the comment message above the macro preprocessor.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor del_station() to avoid parenthesis misalignment
Ajay Singh [Fri, 11 May 2018 08:13:24 +0000 (13:43 +0530)]
staging: wilc1000: refactor del_station() to avoid parenthesis misalignment

Refactor the code to fix open parenthesis alignment issue reported by
checkpatch.pl script in del_station().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename u8security to avoid datatype in variable name
Ajay Singh [Fri, 11 May 2018 08:13:23 +0000 (13:43 +0530)]
staging: wilc1000: rename u8security to avoid datatype in variable name

Cleanup patch to avoid use of datatype in variable name to follow as
per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars issue in connect()
Ajay Singh [Fri, 11 May 2018 08:13:22 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars issue in connect()

Fix line over 80 characters in connect() by using temporary variables.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in scan()
Ajay Singh [Fri, 11 May 2018 08:13:21 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in scan()

Fix line over 80 characters issues found by checkpatch.pl script with
the help of local variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in add_key()
Ajay Singh [Fri, 11 May 2018 08:13:20 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 characters in add_key()

Fix line over 80 character issue found by checkpatch.pl script in
add_key().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declaration
Ajay Singh [Fri, 11 May 2018 08:13:19 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declaration

Fix line over 80 characters issue found by checkpatch.pl script in
function declaration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in get_station()
Ajay Singh [Fri, 11 May 2018 08:13:18 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in get_station()

Fix line over 80 characters issue in get_station().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec()
Ajay Singh [Fri, 11 May 2018 08:13:17 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec()

Fix line over 80 characters issues reported by checkpatch.pl script in
wilc_wfi_cfg_tx_vendor_spec() by using temporary variable. Simplified
'if else' condition with 'if'.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired()
Ajay Singh [Fri, 11 May 2018 08:13:16 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired()

Refactor wilc_wfi_remain_on_channel_expired() to avoid line over 80
character issue reported by checkpatch.pl script. Also assigned value in the
variable at the time of declaration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()
Ajay Singh [Fri, 11 May 2018 08:13:15 +0000 (13:43 +0530)]
staging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()

Use kmemdup instead of kmalloc & memcpy in add_network_to_shadow(). Also
added  code to set 'ies_len' to zero in case of memory allocation
failure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in add_network_to_shadow()
Ajay Singh [Fri, 11 May 2018 08:13:14 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in add_network_to_shadow()

Fix line over 80 characters issue reported by checkpatch in
add_network_to_shadow() by using temporary variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename clear_duringIP() to avoid camelCase issue
Ajay Singh [Fri, 11 May 2018 08:13:13 +0000 (13:43 +0530)]
staging: wilc1000: rename clear_duringIP() to avoid camelCase issue

Rename clear_duringIP() function to avoid camelCase issue reported by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()
Ajay Singh [Fri, 11 May 2018 08:13:12 +0000 (13:43 +0530)]
staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()

Fix below checkpatch issue found in mgmt_tx()

Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
p2p_mgmt_data)...)

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()
Ajay Singh [Fri, 11 May 2018 08:13:11 +0000 (13:43 +0530)]
staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()

Fix below reported checkpatch issues in wilc_wfi_cfg_alloc().
kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev)

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in linux_mon
Ajay Singh [Fri, 11 May 2018 08:13:10 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in linux_mon

Fix line over 80 char issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: replace kmalloc with kmemdup() in handle_connect_timeout()
Ajay Singh [Fri, 11 May 2018 08:13:09 +0000 (13:43 +0530)]
staging: wilc1000: replace kmalloc with kmemdup() in handle_connect_timeout()

Instead of kmalloc and memcpy use kmemdup in handle_connect_timeout().
Also return -ENOMEM incase of failure to allocate the memory.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()
Ajay Singh [Fri, 11 May 2018 08:13:08 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()

Fix line over 80 characters issue in host_int_parse_assoc_resp_info() by
using shorter name for the local variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()
Ajay Singh [Fri, 11 May 2018 08:13:07 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()

Split host_int_parse_join_bss_param() to avoid the line over 80
character issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect()
Ajay Singh [Fri, 11 May 2018 08:13:06 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect()

Fix line over 80 char issue in host_int_handle_disconnect() by using
temp variable to hold the 'wilc_connect_result' function pointer.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters issue in handle_connect()
Ajay Singh [Fri, 11 May 2018 08:13:05 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 characters issue in handle_connect()

Fix line over 80 character issue found by checkpatch.pl script by
aligning the input argument in function call.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in handle_key()
Ajay Singh [Fri, 11 May 2018 08:13:04 +0000 (13:43 +0530)]
staging: wilc1000: fix line over 80 chars in handle_key()

Fix checkpatch reported issue of line over 80 char in handle_key().
Introduced new functions by spliting existing function to address the
checkpatch issue.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove 'ret' variable in handle_key()
Ajay Singh [Fri, 11 May 2018 08:13:03 +0000 (13:43 +0530)]
staging: wilc1000: remove 'ret' variable in handle_key()

Remove the use of unnecessary 'ret' variable and use existing 'result'
variable to hold the status. Also changed type of 'result' from s32 to
int to confirm with the function return type.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: added complete() call for error scenario in handle_key()
Ajay Singh [Fri, 11 May 2018 08:13:02 +0000 (13:43 +0530)]
staging: wilc1000: added complete() call for error scenario in handle_key()

During memory allocation failure in handle_key() the complete() was not
called for comp_test_key_block event. So now added the code to call
complete() for event during error scenario.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-eth: Fix quoted string split across lines
Kamal Heib [Wed, 9 May 2018 12:40:11 +0000 (15:40 +0300)]
staging: mt7621-eth: Fix quoted string split across lines

Quoted strings should not be split to help text grep in the source.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-eth: Fix line over 80 characters
Kamal Heib [Wed, 9 May 2018 12:40:10 +0000 (15:40 +0300)]
staging: mt7621-eth: Fix line over 80 characters

This change fixes all the lines that get over 80 characters.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-eth: Prefer unsigned int to bare use of unsigned
Kamal Heib [Wed, 9 May 2018 12:40:09 +0000 (15:40 +0300)]
staging: mt7621-eth: Prefer unsigned int to bare use of unsigned

This commit replaces all the unsigned definitions in favour of 'unsigned
int' which is preferred.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Replace open-coded idr with a struct idr.
Eric Anholt [Fri, 11 May 2018 16:35:15 +0000 (09:35 -0700)]
staging: bcm2835-camera: Replace open-coded idr with a struct idr.

We just need some integer handles that can map back to our message
struct when we're handling a reply, which struct idr is perfect for.

v2: Fix error check to look at the right variable.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Use 'kvfree()' for memory allocated by 'kvzalloc()'
Christophe JAILLET [Sat, 12 May 2018 12:14:26 +0000 (14:14 +0200)]
staging: lustre: Use 'kvfree()' for memory allocated by 'kvzalloc()'

'buf' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Fixes: 11c647caf74b ("staging: lustre: obdclass: variable llog chunk size")
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Fix an error handling path in 'client_common_fill_super()'
Christophe JAILLET [Sat, 12 May 2018 06:33:05 +0000 (08:33 +0200)]
staging: lustre: Fix an error handling path in 'client_common_fill_super()'

According to error handling path before and after this one, we should go
to 'out_md_fid' here, instead of 'out_md', if 'obd_connect()' fails.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fix spelling mistake: "req_ulinked" -> "req_unlinked"
Colin Ian King [Fri, 11 May 2018 13:38:59 +0000 (14:38 +0100)]
staging: lustre: fix spelling mistake: "req_ulinked" -> "req_unlinked"

Trivial fix to spelling mistake in DEBUG_REQ message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: o2iblnd: Fix crash in kiblnd_handle_early_rxs()
Doug Oucharek [Thu, 10 May 2018 18:07:01 +0000 (11:07 -0700)]
staging: lustre: o2iblnd: Fix crash in kiblnd_handle_early_rxs()

Under upstream staging commit 5a2ca43fa54f561c252c2, the list handling
code in kiblnd_handle_early_rxs() got changed to list_for_each_safe().
That protects against the current thread from deleting the current entry
it is looking at. It does not protect against another thread from deleting
the next item in the list (which the tmp variable points to). The way this
routine holds then releases a lock opens the door to other threads doing
just that.

This patch reverts this commit on this routine.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9886
Fixes: 5a2ca43fa54f ("Staging: lustre: Iterate list using list_for_each_entry")
Signed-off-by: Doug Oucharek <dougso@me.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: Fix coding style
Samuel Thibault [Sun, 13 May 2018 09:38:30 +0000 (11:38 +0200)]
staging: speakup: Fix coding style

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: video: fix build warnings
Greg Kroah-Hartman [Mon, 14 May 2018 09:34:29 +0000 (11:34 +0200)]
staging: most: video: fix build warnings

Commit 7d7cdb4fa552 ("staging: most: video: remove debugging code") ended up
adding a bunch of build warnings about unused variables.  Fix that up by
removing those variables as we don't need them anymore.

Cc: Abdun Nihaal <abdun.nihaal@gmail.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 7d7cdb4fa552 ("staging: most: video: remove debugging code")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Fix module section mismatch warnings.
Eric Anholt [Mon, 14 May 2018 07:44:11 +0000 (08:44 +0100)]
staging: bcm2835-camera: Fix module section mismatch warnings.

Noticed by Stephen Rothwell in -next.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: fix block comment alignment in p80211metastruct.h
Tim Collier [Fri, 11 May 2018 07:36:46 +0000 (08:36 +0100)]
staging: wlan-ng: fix block comment alignment in p80211metastruct.h

Fix checkpatch warning for misaligned * characters in the block
comment at the start of p80211metastruct.h; with this change the file
is checkpatch clean.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835: Fix mmal_port_parameter_get() signed/unsigned warnings.
Eric Anholt [Thu, 10 May 2018 19:42:20 +0000 (12:42 -0700)]
staging: bcm2835: Fix mmal_port_parameter_get() signed/unsigned warnings.

The arg is a u32 *, so switch over to that in our declarations.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835: Remove dead code related to framerate.
Eric Anholt [Thu, 10 May 2018 19:42:19 +0000 (12:42 -0700)]
staging: bcm2835: Remove dead code related to framerate.

Fixes a compiler warning about a set-but-not-used variable. I think
this was just leftover dead code from before set_framerate_params(),
since that also sets up some mmal_parameter_rational structs for fps.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Fix warnings about string ops on v4l2 uapi.
Eric Anholt [Thu, 10 May 2018 19:42:18 +0000 (12:42 -0700)]
staging: bcm2835-camera: Fix warnings about string ops on v4l2 uapi.

The v4l2 uapi uses u8[] for strings, so cast those to char * to avoid
compiler warnings about unsigned vs signed with sprintf() and friends.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Fix indentation of tables
Dave Stevenson [Thu, 10 May 2018 19:42:17 +0000 (12:42 -0700)]
staging: bcm2835-camera: Fix indentation of tables

As requested by Mauro Carvalho Chehab in review.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Fix comment typos.
Dave Stevenson [Thu, 10 May 2018 19:42:15 +0000 (12:42 -0700)]
staging: bcm2835-camera: Fix comment typos.

Fix a typo flagged by checkpatch, and another in the same line.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Replace BUG_ON with return error
Dave Stevenson [Thu, 10 May 2018 19:42:14 +0000 (12:42 -0700)]
staging: bcm2835-camera: Replace BUG_ON with return error

The error conditions don't warrant taking the kernel down, so remove
BUG_ON.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Move struct vchiq_mmal_rect
Dave Stevenson [Thu, 10 May 2018 19:42:13 +0000 (12:42 -0700)]
staging: bcm2835-camera: Move struct vchiq_mmal_rect

struct vchiq_mmal_rect is only referenced from mmal-parameters.h, yet
was defined in mmal-vchiq.h.

Move it to avoid having to include multiple headers for no reason.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Add multiple include protection
Dave Stevenson [Thu, 10 May 2018 19:42:12 +0000 (12:42 -0700)]
staging: bcm2835-camera: Add multiple include protection

mmal-parameters.h didn't have the normal

...

protection to stop it being included multiple times.  Add it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Remove V4L2/MMAL buffer remapping
Dave Stevenson [Thu, 10 May 2018 19:42:11 +0000 (12:42 -0700)]
staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping

The MMAL and V4L2 buffers had been disassociated, and linked on
demand.  Seeing as both are finite and low in number, and we now have
the same number of each, link them for the duration.  This removes the
complexity of maintaining lists as the struct mmal_buffer context
comes back from the VPU, so we can directly link back to the relevant
V4L2 buffer.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Match MMAL buffer count to V4L2.
Dave Stevenson [Thu, 10 May 2018 19:42:10 +0000 (12:42 -0700)]
staging: bcm2835-camera: Match MMAL buffer count to V4L2.

For historical reasons, the number of buffers passed to the VPU over
MMAL did not match that passed from V4L2.  That is a silly situation
as the driver has to duplicate serialisation and other functions that
have already been implemented in V4L2/videobuf2.

As we had more V4L2 buffers than MMAL ones, the MMAL buffer headers
were returned to the VPU immediately on being filled, which is now
invalid.

Match the number of buffers notified in queue_setup with that used in
MMAL.  Return buffers only when we get them from V4L2.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Remove bulk_mutex as it is not required
Dave Stevenson [Thu, 10 May 2018 19:42:09 +0000 (12:42 -0700)]
staging: bcm2835-camera: Remove bulk_mutex as it is not required

There is no requirement to serialise bulk transfers as that is all
done in VCHI, and if a second MMAL_MSG_TYPE_BUFFER_TO_HOST happened
before the VCHI_CALLBACK_BULK_RECEIVED, then the service_callback
thread is deadlocked.

Remove the bulk_mutex so that multiple receives can be scheduled at a
time.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Allocate context once per buffer
Dave Stevenson [Thu, 10 May 2018 19:42:08 +0000 (12:42 -0700)]
staging: bcm2835-camera: Allocate context once per buffer

The struct mmal_msg_context was being allocated for every message
being sent to the VPU, and freed when it came back.  Whilst that is
required behaviour for some messages (mainly the synchronous ones), it
is wasteful for the video buffers that make up the majority of the
traffic.

Add to the buffer_init/cleanup hooks that it allocates/frees the
msg_context required.

v2: changes by anholt from the downstream tree: clean up indentation,
    pass an error value through, forward-declare the struct so we have
    less void *

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Skip ISP pass to eliminate padding.
Dave Stevenson [Thu, 10 May 2018 19:42:07 +0000 (12:42 -0700)]
staging: bcm2835-camera: Skip ISP pass to eliminate padding.

Interleaved RGB and single plane YUV formats can be delivered by the
GPU without the secondary step of removing padding, as the
bytesperline field can be set appropriately.

Planar YUV needs the GPU to still remove padding, as there is no way
to report that there is padding between the planes (ie on the height).
The multi-planar formats are NOT applicable, as there is no easy way
to make them contiguous in memory (ie one large allocation that gets
broken up). The whole task is passed across to videobuf2 which has no
notion of that requirement.

v2: Changes by anholt from the downstream driver: Flag two more planar
    formats as needing padding removal, and remove broken userspace
    workaround.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/bcm2835-camera: Set ourselves up as a platform driver.
Eric Anholt [Thu, 10 May 2018 19:42:06 +0000 (12:42 -0700)]
staging/bcm2835-camera: Set ourselves up as a platform driver.

This allows bcm2835-camera to automatically probe after VCHI has
loaded, rather than only successfully probing if the arbitrary probe
order chooses us after VCHI.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/vc04_services: Register a platform device for the camera driver.
Eric Anholt [Thu, 10 May 2018 19:42:05 +0000 (12:42 -0700)]
staging/vc04_services: Register a platform device for the camera driver.

We had the camera driver set up in a module_init function, but that
meant that the camera driver would fail to load if it was initialized
before VCHI.  By attaching to this platform_device, it can get a
defined load order.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove rx_handler_data unnecessary read
Ivan Safonov [Wed, 9 May 2018 19:44:06 +0000 (22:44 +0300)]
staging:r8188eu: Remove rx_handler_data unnecessary read

Rx handler (assigned with netdev_rx_handler_register,
called from __netif_receive_skb()) uses value of dev->rx_handler_data.
The driver has no rx handler and does not need it, so remove rx_handler_data read.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: add static to libcfs_dev declaration
Justin Skists [Thu, 10 May 2018 19:41:29 +0000 (20:41 +0100)]
staging: lustre: lnet: add static to libcfs_dev declaration

Add a static prefix to the declaration for libcfs_dev. This would fix
the following sparse warning:

drivers/staging/lustre/lnet/libcfs/module.c:317:19: warning: symbol
'libcfs_dev' was not declared. Should it be static?

Signed-off-by: Justin Skists <justin.skists@juzza.co.uk>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: fix spelling mistake: "traking" -> "tracking"
Colin Ian King [Thu, 10 May 2018 15:07:41 +0000 (16:07 +0100)]
staging: rtlwifi: fix spelling mistake: "traking" -> "tracking"

Trivial fix to spelling mistake in ODM_RT_TRACE message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>