There is only one struct in rtw_qos.h and it is only included from
drv_types.h. Move the struct into drv_types.h to reduce the number
of header files.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The function rtw_scan_abort() is never used, so remove it.
Discovered by cppcheck.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
if ((pwrpriv->rpwm == pslv)) {
~~~~~~~~~~~~~~^~~~~~~
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: remove
extraneous parentheses around the comparison to silence this warning
if ((pwrpriv->rpwm == pslv)) {
~ ^ ~
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: use '=' to
turn this equality comparison into an assignment
if ((pwrpriv->rpwm == pslv)) {
^~
=
drivers/staging/rtl8188eu/hal/odm.c:1062:27: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0))
*/
~~~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: remove extraneous
parentheses around the comparison to silence this warning
if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0))
*/
~ ^ ~
drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: use '=' to turn this
equality comparison into an assignment
if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0))
*/
^~
=
Link: https://github.com/ClangBuiltLinux/linux/issues/163
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes nullpointer checks which are redundant. container_of
returns structure containing entity which we know for sure is not null,
so the whole structure can not be null.
Signed-off-by: Arkadiusz Lis <areklis909@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the TODO item to remove manual cache flushing from bulk_receive.
This was previously done in this commit:
commit 7e8dbea410 ("staging: bcm2835-camera: Remove explicit cache
flush operations")
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Trivial fix to spelling mistake in struct field name
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Trivial fix to spelling mistake in DBG_871X debug messages.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Trivial fix to spelling mistake in RT_TRACE message
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch corrects a typo (frambuffer->framebuffer) in the
sm750fb_fram(e)buffer_release and sm750fb_fram(e)buffer_alloc function
names.
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor wilc_netdev_init() to return the error code received from
register_netdev() during the failure condition.
Earlier discussion link
[1]. https://www.spinics.net/lists/linux-wireless/msg177304.html
Suggested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor wilc_set_multicast_list() by making below changes:
o use kmalloc_array
o remove unnecessary res
o add u8 *cur_mc
o use i as index
o use '%pM' extension in netdev_dbg()
The below checkpatch issue is also resolved after code refactor.
'spaces preferred around that '/' (ctx:VxV)'
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Changes to avoid the below checkpatch warning:
'usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt;'
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in
ccflag-y in Makefile.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Avoid use of static variable and move them as part of private
data(wilc_priv) struct.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to
zero as the buffer was allocated using kzalloc().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Instead of using static variable 'g_spi' move it as part of 'wilc'
struct. Also allocating the memory in the probe function and
free is taken care in wilc_netdev_cleanup().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Instead of using static variable 'g_sdio' move it as part of 'wilc'
struct. Also allocating the memory in the probe function and free during
deinitialization.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
'wilc_connected_ssid' actually used to store the BSSID information for
connected BSSID. 'wilc_vif' already has 'bssid' variable to store the
same information. So refactor code to remove 'wilc_connected_ssid' and
instead used 'wilc_vif' struct 'bssid' element.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Instead of using extra completion variable to handle the sync call now
using msg->is_sync flag to handle the sync call.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more
appropriate for structure to store the values of string configuration.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor the code in wilc_wlan_cfg.c file to avoid the use of static
variables. Move the static variables as part of wilc struct and also
dynamically allocating memory for keeping those variables.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg'
and only have the string type configuration values in 'wilc_mac_cfg'
struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte'
array.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to remove the unused element stored in cfg struct.
Removed those wid from the cfg variables whose value is not
fetched(GET_CFG) from the code. In case the wid is only set to the
firmware then there is need to store them as part of cfg variables, so
removed the unused code.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to remove the wid type not used in the code.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use the correct datatype for storing the byte value in 'wilc_cfg_byte'
struct.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Handle the setting of default value for 'wilc_cfg_rsp' type for all
cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this
value to know the type of the received message.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Return 'void' from wilc_wlan_parse_info_frame() as same constant value
is returned always. Also removed the 'size' from input parameter as its
not used in the function.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(),
as its return value is not used in caller. The value set in
'rsp' argument is used to get the success status.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always
return value '1' and its not used by the caller.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use 'void' return type for below functions as they always return '0' and
their return value is not used by caller.
add_tcp_pending_ack()
update_tcp_session()
add_tcp_pending_ack()
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use 'void' return for wilc_wlan_txq_add_to_head() as its always
return '0' value.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change return type to 'void' for host_int_get_assoc_res_info() as its
return value is not used. 'rcvd_assoc_resp_info_len' parameter value is
used to know the status.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same
value always return.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to use 'void' return type for wilc_deinit_host_int(),
as its return value is not used in caller.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to use 'void' return type for wlan_deinit_locks() &
wlan_init_locks(), as same value is return.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(),
as its always returns the same value.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup patch to use 'void' return type for wilc_frame_register(), as
its return value is not used.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clang warns that the address of a pointer will always evaluated as true
in a boolean context:
drivers/staging/wilc1000/linux_wlan.c:267:20: warning: address of
'vif->ndev->dev' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (!(&vif->ndev->dev))
~ ~~~~~~~~~~~^~~
1 warning generated.
Since this statement always evaluates to false due to the logical not,
remove it.
Link: https://github.com/ClangBuiltLinux/linux/issues/121
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clang warns when one enumerated type is implicitly converted to another.
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1264:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
wifionly_cfg->chip_interface = BTC_INTF_PCI;
~ ^~~~~~~~~~~~
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1267:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
wifionly_cfg->chip_interface = BTC_INTF_USB;
~ ^~~~~~~~~~~~
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1270:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN;
~ ^~~~~~~~~~~~~~~~
3 warnings generated.
Use the values from the correct enumerated type, wifionly_chip_interface.
BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0
BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1
BTC_INTF_USB = WIFIONLY_INTF_USB = 2
Link: https://github.com/ClangBuiltLinux/linux/issues/171
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The member regd of the struct rtl_priv is true in a boolean context.
drivers/staging/rtlwifi/regd.c:413:27: warning: address of 'rtlpriv->regd' will always
evaluate to 'true' [-Wpointer-bool-conversion]
if (!wiphy || !&rtlpriv->regd)
~ ~~~~~~~~~^~~~
1 warning generated.
Link: https://github.com/ClangBuiltLinux/linux/issues/170
Signed-off-by: Karthik Nishanth <nishanthkarthik@live.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl error:
ERROR: "foo * bar" should be "foo *bar"
in the interface/vchi directory
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch removes the macros and structs associated with the
"vchi_msg_queuev_ex" function, which was previously removed in 49bec49.
Also fixes the checkpatch.pl errors:
ERROR: Macros with complex values should be enclosed in parentheses
ERROR: space required after that ','
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl error:
ERROR: code indent should use tabs where possible
in the interface/vchi directory
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl error:
ERROR: space prohibited after/before that open/closed parenthesis
in the interface/vchi directory.
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
As far as I can tell, this has never been used.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use the compatible string in the DTB to select the correct cache line
size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add support for the AD7605-4 to the AD7606 driver. The AD7605-4 is mostly
interface compatible to the AD7606-6 with the only difference being not
having support for oversampling.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This driver was originally written by ST in 2016 as a misc input device
driver, and hasn't been maintained for a long time. I grabbed some code
from it's API and reformed it into an iio proximity device driver.
This version of driver uses i2c bus to talk to the sensor and
polling for measuring completes, so no irq line is needed.
It can be tested with reading from
/sys/bus/iio/devices/iio:deviceX/in_distance_input
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>