The spin_lock()/spin_unlock() is synchronizing on the
nf_conntrack_locks_all_lock which is equivalent to
spin_unlock_wait() but the later should be more efficient.
Signed-off-by: Nicholas Mc Guire
---
Patch was compile tested with: x86_64_defconfig (implies CONFIG_NETFILTER=y)
Simple run test
On Fri, Mar 18, 2016 at 03:35:18PM -0700, Joe Perches wrote:
> On Fri, 2016-03-18 at 17:37 -0400, David Miller wrote:
> > From: Nicholas Mc Guire
> > > The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
> > > as the comment also su
The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
as the comment also suggests, which is equivalent to spin_unlock_wait()
but the later should be more efficient.
Signed-off-by: Nicholas Mc Guire
---
Problem located by coccinelle spatch
Patch was compile tested w
local_bh_disable() + spin_lock() is equivalent to spin_lock_bh(), same for
the unlock/enable case, so replace the calls by the appropriate wrappers.
Signed-off-by: Nicholas Mc Guire
---
net-next 3c8e43ba "sctp: remove macros sctp_spin_[un]lock" and
net-next 79b91130 "sctp
This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kzalloc.
Signed-off-by: Nicholas Mc Guire
---
Found by coccinelle script (relaxed version of
scripts/coccinelle/api/alloc/kzalloc-simple.cocci)
Patch was compile tested with: x86_64_defconfig +
CONFIG_RSI_91X
This is an API consolidation only. Bool initializations should
use true and false thus bool tests don't need an explicit comparison.
Signed-off-by: Nicholas Mc Guire
---
Found by coccinelle: scripts/coccinelle/misc/boolinit.cocci
Patch was compile tested with: x86_64_defc
This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kcalloc in this case as it is allocating an array
of elements.
Signed-off-by: Nicholas Mc Guire
---
Found by coccinelle script (relaxed version of
scripts/coccinelle/api/alloc/kzalloc-simple.cocci)
Patch was
This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kzalloc.
Signed-off-by: Nicholas Mc Guire
---
Found by coccinelle script (relaxed version of
scripts/coccinelle/api/alloc/kzalloc-simple.cocci)
Patch was compile tested with: x86_64_defconfig +
CONFIG_WL12XX=m
On Tue, Dec 22, 2015 at 09:56:10AM +1100, Julian Calaby wrote:
> Hi,
>
> On Tue, Dec 22, 2015 at 3:47 AM, Nicholas Mc Guire wrote:
> > This is an API consolidation only. The use of kmalloc + memset to 0
> > is equivalent to kzalloc.
> >
> > Signed-off-by: Nichola
named variable is added
and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARD=y
CONFIG_ATH10K=m
Patch is against 4.1-rc7 (localversion-next is -next-20150611)
drivers/net/wireless/ath/ath10k/txrx.c |6 +++---
1 fil
named variable is added
and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARD=y
CONFIG_ATH10K=m
Patch is against 4.1-rc7 (localversion-next is -next-20150611)
drivers/net/wireless/ath/ath10k/mac.c | 10 +-
Hi !
commit 2c86c275015c ("Add ipw2100 wireless driver.") introduced
drivers/net/wireless/ipw2100.c - line-numbers are from next-20150511
1410 static int ipw2100_hw_phy_off(struct ipw2100_priv *priv)
1411 {
1412
1413 #define HW_PHY_OFF_LOOP_DELAY (HZ / 5000)
141
From: Nicholas Mc Guire
scanning for trivial bug-patters with coccinelle spatches returned:
./drivers/net/wireless/rtlwifi/rtl8723be/dm.c:886
WARNING: condition with no effect (if branch == else)
Added in 'commit a619d1abe20c ("rtlwifi:
From: Nicholas Mc Guire
scanning for trivial bug-patters with coccinelle spatches returned:
./drivers/net/irda/via-ircc.c:598
WARNING: condition with no effect (if branch == else)
This code was added prior to the transition to git (Linux-2.6.12-rc2
On Sun, 14 Jun 2015, Larry Finger wrote:
> On 06/13/2015 05:43 AM, Nicholas Mc Guire wrote:
>> From: Nicholas Mc Guire
>>
>> scanning for trivial bug-patters with coccinelle spatches returned:
>> ./drivers/net/wireless/rtlwifi/rtl8723be/dm.c:886
>> WARN
commit: commit 2c86c275015c ("Add ipw2100 wireless driver.") introduced
HW_PHY_OFF_LOOP_DELAY (HZ / 5000) which always evaluated to 0. Clarified
by Stanislav Yakovlev that it should be 50
milliseconds thus fixed up to msecs_to_jiffies(50).
Signed-off-by: Nicholas Mc Guire
---
On Mon, 15 Jun 2015, Stanislav Yakovlev wrote:
> Hi Nicholas,
>
> On 12 June 2015 at 20:58, Nicholas Mc Guire wrote:
> > Hi !
> >
> > commit 2c86c275015c ("Add ipw2100 wireless driver.") introduced
> >
> > drivers/net/wireless/ipw2100.c - line-n
From: Nicholas Mc Guire
scanning for trivial bug-patters with coccinelle spatches returned:
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c:3391
WARNING: condition with no effect (if branch == else)
added in 'commit 5b435de0d786
nk")' with dev_dbg/dev_err (though
with the same message) to differentiate severity and then in 'commit
acebe8c10a6e ("mwifiex: change dbg print func to mwifiex_dbg")' all
dev_dbg,dev_warn and dev_err got converted to mwifiex_dbg which should
thus probably drop this if/e
On Wed, 08 Jul 2015, Avinash Patil wrote:
> Hi Nicholas,
>
> On Wed, Jul 8, 2015 at 7:15 AM, Nicholas Mc Guire wrote:
> > scanning for trivial bug-patters with coccinelle spatches returned:
> > ./drivers/net/wireless/mwifiex/sta_cmdresp.c:895
> > WARNING: c
ersion-next is -next-20150522)
Signed-off-by: Nicholas Mc Guire
---
V2: the unnecessary () flagged by Joe Perches
was removed - thanks (...once again...) !
drivers/net/irda/irda-usb.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/irda/irda-usb.c b/d
ion to use msecs_to_jiffies(val) conversion is
correct in all cases. Further the () around the arithmetic expression
was dropped.
Patch was compile tested for x86_64_defconfig + CONFIG_IRDA=m
Patch is against 4.1-rc4 (localversion-next is -next-20150522)
Signed-off-by: Nicholas Mc Guire
---
On Sun, 24 May 2015, David Miller wrote:
> From: Nicholas Mc Guire
> Date: Sat, 23 May 2015 15:43:36 +0200
>
> > API compliance scanning with coccinelle flagged:
> > ./net/irda/timer.c:63:35-37: use of msecs_to_jiffies probably perferable
> >
> > Converting mil
ion to use msecs_to_jiffies(val) conversion is
correct in all cases. Further the () around the arithmetic expression
was dropped.
Patch was compile tested for x86_64_defconfig + CONFIG_IRDA=m
Patch is against 4.1-rc4 (localversion-next is -next-20150522)
Signed-off-by: Nicholas Mc Guire
---
V
is -next-20150527)
Signed-off-by: Nicholas Mc Guire
---
As there is no documentation of the intended timeout it might be wrong
to convert it with msecs_to_jiffies as this can reduces the actual
jiffies value by at least a factor of 10 - so someone that knows this
driver needs to check on the
constant to jiffies with msecs_to_jiffies()
Signed-off-by: Nicholas Mc Guire
---
As the actually intended timeout is not documented and msecs_to_jiffies
timeouts can be a factor 10 different from the current effective timeout
As the original driver predates variable HZ (2.2.26 drivers/net/cosa.c
also
Fix:
drivers/net/wan/dscc4.c: In function 'dscc4_open':
drivers/net/wan/dscc4.c:1049:25: warning: variable 'ppriv' set but not used
[-Wunused-but-set-variable]
This has been in there unused since 1da177e4c3f (Linux-2.6.12-rc2) simply
remove it.
Signed-off-by: Nicholas Mc Guir
dependent
Numeric constants passed to schedule_timeout_*() make the effective
timeout HZ dependent which does not seem to be the intent here.
Fixed up by converting the constant to jiffies with msecs_to_jiffies()
Signed-off-by: Nicholas Mc Guire
---
As the intended timeout is not documented and
On Sun, 07 Jun 2015, David Miller wrote:
> From: Nicholas Mc Guire
> Date: Sat, 6 Jun 2015 09:51:51 +0200
>
> > @@ -517,7 +517,7 @@ static int cosa_probe(int base, int irq, int dma)
> > */
> > set_current_state(TASK_INTERRUPTIBLE);
> >
On Sun, 07 Jun 2015, David Miller wrote:
> From: Nicholas Mc Guire
> Date: Sat, 6 Jun 2015 10:41:06 +0200
>
> > API compliance scanning with coccinelle flagged:
> > ./drivers/net/wan/dscc4.c:1036:1-33:
> > WARNING: timeout (10) seems HZ dependent
> > .
dependent
Numeric constants passed to schedule_timeout_*() make the effective
timeout HZ dependent which does not seem to be the intent here.
Fixed up by converting the constant to jiffies with msecs_to_jiffies(),
passing 100ms (assuming HZ==100 in the original code).
Signed-off-by: Nicholas Mc Guire
with msecs_to_jiffies()
As this driver was introduced in the early 2.3 series it is most
likely assuming HZ=100 so the constant 50 is converted to 500ms.
Signed-off-by: Nicholas Mc Guire
---
Patch was compile tested with i386_defconfig + CONFIG_ATM=y,
CONFIG_ATM_IA=m
Patch is against 4.1-rc6
liquidio_set_rxcsum_command is a local function only, no need to expose
it outside of lio_main.c so declare it static and make sparse happy.
Signed-off-by: Nicholas Mc Guire
---
V2: forgot to fix up the checkpatch.pl warnings...
Detected by sparse:
CHECK drivers/net/ethernet/cavium
schedule_timeout_* takes a timeout in jiffies but the code currently is
passing in a constant which makes this timeout HZ dependent, so pass it
through msecs_to_jiffies() to fix this up.
Signed-off-by: Nicholas Mc Guire
---
Problem found by coccinelle script
The below patch sets the timeout to
liquidio_set_rxcsum_command is a local function only, no need to expose it
outside of lio_main.c
so declare it static and make sparse happy.
Signed-off-by: Nicholas Mc Guire
---
Detected by sparse:
CHECK drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/liquidio
schedule_timeout_* takes a timeout in jiffies but the code currently is
passing in a constant which makes this timeout HZ dependent, so pass it
through msecs_to_jiffies() to fix this up.
Fixes: commit b0d66369edcd ("liquidio VF error handling")
Signed-off-by: Nicholas Mc Guire
---
Pro
schedule_timeout_* takes a timeout in jiffies but the code currently is
passing in a constant which makes this timeout HZ dependent, so pass it
through msecs_to_jiffies() to fix this up.
Signed-off-by: Nicholas Mc Guire
---
Problem found by coccinelle spatch
The current delay can vary by a
Hi !
in your commit f5b586909581 ("rtlwifi: btcoexist: Modify driver to support
BT coexistence in rtl8723be") you introduced a if/else where both branches
are the same but the comment in the else branch suggests that this might be
unintended.
from code review only I canĀ“t say what the int
The port assignment in the if case should be to AUX not MAIN.
Fixes: commit baa170229095 ("rtlwifi: btcoexist: Implement antenna selection")
Signed-off-by: Nicholas Mc Guire
---
problem located by coccinelle
in:
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:exhalbtc_s
On Fri, May 10, 2019 at 01:28:00PM -0700, David Miller wrote:
> From: Nicholas Mc Guire
> Date: Fri, 10 May 2019 03:08:53 +0200
>
> > diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
> > index dd0e97f..c90edaa 100644
> > --- a/net/qrtr/qrtr.c
> > +++ b/net
sparse was unable to verify endiannes correctness due to reassignment
from le32_to_cpu to the same variable - fix this warning up by providing
a proper __le32 type and initializing it. This is not actually fixing
any bug - rather just addressing the sparse warning.
Signed-off-by: Nicholas Mc
41 matches
Mail list logo