This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.
Change-Id: Ifc56e6297146c9095432b757fabd0c463d7cc583
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 62057517
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Without much context to why these warnings even exist (especially with
the ambiguous comment "Avoid warning in user-space"), I'd rather play
it safe and not disturb the code but "fix" the warning.
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
As pointed out by Josh in the comments of 60e5a5f0b974, this seems
like an addition that just isn't necessary. Self assign shouldn't
be necessary here so we'll just reverse the condition and eliminate
the self assignment.
Reviewed-by: joshuous <joshuous@gmail.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Clang warns when a variable is assigned to itself.
drivers/net/usb/lan78xx.c:940:11: warning: explicitly assigning value of
variable of type 'u32' (aka 'unsigned int') to itself [-Wself-assign]
offset = offset;
~~~~~~ ^ ~~~~~~
1 warning generated.
Reorder the if statement to acheive the same result and avoid a self
assignment warning.
Link: https://github.com/ClangBuiltLinux/linux/issues/129
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Clang warns:
../sound/soc/codecs/tfa98xx/tfa_dsp.c:3155:9: warning: implicit conversion
from enumeration type 'enum Tfa98xx_Error' to different enumeration type
'enum tfa_error' [-Wenum-conversion]
return err;
~~~~~~ ^~~
../sound/soc/codecs/tfa98xx/tfa_dsp.c:3215:9: warning: implicit conversion
from enumeration type 'enum Tfa98xx_Error' to different enumeration type
'enum tfa_error' [-Wenum-conversion]
return err;
~~~~~~ ^~~
../sound/soc/codecs/tfa98xx/tfa_dsp.c:3267:9: warning: implicit conversion
from enumeration type 'enum Tfa98xx_Error' to different enumeration type
'enum tfa_error' [-Wenum-conversion]
return err;
~~~~~~ ^~~
@neobuddy89: adapted for oneplus-msm8998
Change-Id: I4d1d428f0306bbe6bb25d8beab8a74307aaeadf7
Signed-off-by: Jean-Baptiste Théou <jb@essential.com>
Currently a CPU is considered as busy if it's utilization in
the last window exceeds busy threshold. A CPU loaded with
hardirqs/softirqs does not necessarily have high utilization.
Isolating such CPUs may hurt performance as it involves waking
up the CPU frequently from deep c-state. Prevent isolating
high irq loaded CPUs by considering them as busy.
Change-Id: I169b69f6003eb59a126c8a16b67b65be2aa7af40
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Use the latest version of GCC to take advantage of improved static analysis.
These issues appeared as warnings from the compiler.
Many of these fixes are for clearly incorrect code; compiler warnings
should not be taken lightly.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
* We get it, shit's broken. We're flashing custom stuff, shit's bound
to break. Don't pop this annoying screen up, we're not even using
verity anyway.
Change-Id: Icd77b70ec1df9108a4ba9e7fd8cb9623b35b78db
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Some devices might want to use that logic
without enabling download mode
Change-Id: Idd4a2cc8a47041740f8d4e9f43bffd84fae5830d
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also increase the number of
policies supported by the blkio controller so that BFQ can add its
own.
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini@google.com>
According to Google we should set this to 0
as there is excessive logging in specific usecases
which has a negative impact on latency.
Change-Id: If03401694c2b746b5e2111cb5daafa8eab169e29
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Avoid delays in binder transactions due to preemption of
binder_deferred_func() with binder_deferred_lock held.
Bug: 66914906
Test: boots; binder tests pass; trace analysis in bug
Change-Id: I1a89ba15b27e43552890292f135a5e2d969231e2
Signed-off-by: Corey Tabaka <eieio@google.com>
Copying fence debug names for frequent users of sync fences causes a
measurably significant portion of CPU time to be spent on this strlcpy.
#ifdef out the sync fence name copy by default to improve performance.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This patch disables default slimbus access exposed through debugfs.
Bug: 67430947
Change-Id: Iaf1b7cdf638dbc6e6de3681b8418f1840b94ccad
Signed-off-by: David Lin <dtwlin@google.com>
This fixes the smatch warning below:
drivers/soc/qcom/memshare/msm_memshare.c:570 handle_alloc_generic_req()
warn: inconsistent returns 'mutex:&memsh_drv->mem_share'.
Bug: 35898203
Change-Id: I86f3d77c9bb471b1bc26360e11e378fa3d1a3f66
Signed-off-by: David Lin <dtwlin@google.com>
This fixes the smath warning below:
drivers/thermal/qpnp-adc-tm.c:2943 qpnp_adc_tm_disable_chan_meas() warn:
inconsistent returns 'mutex:&chip->adc->adc_lock'.
Bug: 35898203
Change-Id: I149ed4868cd4754246b3b8845a0af7f1f08c0931
Signed-off-by: David Lin <dtwlin@google.com>
This fixes the following smatch warning:
drivers/soc/qcom/qmi_interface.c:2019 qmi_svc_event_notifier_register()
warn: inconsistent returns 'mutex:&temp->svc_addr_list_lock'.
Change-Id: I2ada7d79a0ac6b6a14abad0cb463af491dd1c319
Signed-off-by: David Lin <dtwlin@google.com>
In case of error on lost arbitration, the host should at least attempt
to retry in case if the bus error is transient (i.e., from signal
interference or misbehaved devices). Use the default 2s timeout setting.
Bug: 35439882
Change-Id: Id9bd5a5ea764405401588220a2d2bf0fd85111f7
Signed-off-by: David Lin <dtwlin@google.com>
This patch fixes the following coccicheck errors:
msm_rng.c:335:2-8: ERROR: missing clk_put;
clk_get on line 282 and execution via conditional on line 333
msm_rng.c:335:2-8: ERROR: missing clk_put;
clk_get on line 285 and execution via conditional on line 333
Bug: 35898203
Change-Id: Id6e0854ec11f95fe2bf7f887876535e2d8e74d22
Signed-off-by: David Lin <dtwlin@google.com>
bfq-iosched was missing from the Makefile.
Test: Check /sys/block/sda/queue/scheduler. bfq now available.
Change-Id: I57407ef65aad9ef319d56b9338a3180fadc9053b
In certain 802.11 wireless deployments, there will be ARP proxies
that use knowledge of the network to correctly answer requests.
To prevent gratuitous ARP frames on the shared medium from being
a problem, on such deployments wireless needs to drop them.
Enable this by providing an option called "drop_gratuitous_arp".
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4078228159c9f54cca7347a8bdace29f2abdef65)
Change-Id: I8772dbd7471085878f8b4161eb2a056d79b8b232
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
In certain 802.11 wireless deployments, there will be NA proxies
that use knowledge of the network to correctly answer requests.
To prevent unsolicitd advertisements on the shared medium from
being a problem, on such deployments wireless needs to drop them.
Enable this by providing an option called "drop_unsolicited_na".
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit aec215e7aa380fe5f85eb6948766b58bf78cb6c3)
Change-Id: Iad429a767a786087b0985632be44932b2e3fd1a8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv6 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.
Reviewed-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit dede82143bf1bbf92ea73a519bb0298b19c56cb9)
Change-Id: I76c8f84b53e95c40ad3c2b5adac0ec4964cc920c
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
In order to solve a problem with 802.11, the so-called hole-196 attack,
add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if
enabled, causes the stack to drop IPv4 unicast packets encapsulated in
link-layer multi- or broadcast frames. Such frames can (as an attack)
be created by any member of the same wireless network and transmitted
as valid encrypted frames since the symmetric key for broadcast frames
is shared between all stations.
Additionally, enabling this option provides compliance with a SHOULD
clause of RFC 1122.
Change-Id: I8de9fa5bdbea0556802f2ee553d0e73c1349213e
Reviewed-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
*) Implements sysfs proximity_state so that fp reader
can be disabled by PocketMode app.
*) Code fragments copied from fpc1020 driver where possible.
Change-Id: If0e6fa3172e1546d989de8522b2bdd734a3840a6
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpuidle was disabled while entering suspend as part of commit
8651f97bd9 in order to work around some
ACPI bugs. However, there's no reason to do this on modern
platforms. Leaving cpuidle enabled can result in improved power
consumption if dpm_resume_noirq runs for a significant time.
Change-Id: Ie182785b176f448698c0264eba554d1e315e8a06