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 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
return type of wait_for_completion_timeout is unsigned long not int, this
patch adds an appropriate return type and assignment.
Signed-off-by: Nicholas Mc Guire
---
The return type of wait_for_completion_timeout is unsigned long not
int. This patch adds a separate variable of proper type for
A number if/else if/else branches are identical - so the condition has no
effect on the effective code and can be significantly simplified - this
patch removes the condition and the duplicated code.
Signed-off-by: Nicholas Mc Guire
---
This looks like the output of some broken code-generator
On Tue, 03 Feb 2015, Jes Sorensen wrote:
> Nicholas Mc Guire writes:
> > A number if/else if/else branches are identical - so the condition has no
> > effect on the effective code and can be significantly simplified - this
> > patch removes the condition and the duplicated
This is only an API consolidation to make things more readable.
Instances of HZ / CONST are replaced by appropriate msecs_to_jiffies().
Signed-off-by: Nicholas Mc Guire
---
Converting milliseconds to jiffies by "val * HZ / 1000" or passing
HZ / 10 is technically OK but a
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Signed-off-by: Nicholas Mc Guire
---
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
ok but msecs_to_jiffies(val) is the cleaner so
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Signed-off-by: Nicholas Mc Guire
---
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
ok but msecs_to_jiffies(val) is the cleaner so
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Signed-off-by: Nicholas Mc Guire
---
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
ok but msecs_to_jiffies(val) is the cleaner so
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_BRCMFMAC=m,
CONFIG_MMC=m, CONFIG_BRCMFMAC_SDIO=y
Patch is against
the if/elseif/else is exhaustive - there is no 4th case given the
rssi_ctrl_mask = RADIO_2055_NBRSSI_SEL | RADIO_2055_WBRSSI_G1_SEL |
RADIO_2055_WBRSSI_G2_SEL;
so this unreachable else case (dead code) can be dropped.
Signed-off-by: Nicholas Mc Guire
---
It seems that there are only three
timeout was being passed as int but assigned from u32/u16 values and used
as unsigned type. This is really only for better readability.
Signed-off-by: Nicholas Mc Guire
---
After review of the use locations of mesh_plink_timer_set() and declarations
in sta_info.h this should not be breaking
at least 1 always.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_MAC80211_MESH=y
Patch is against 4.0-rc1 (localversion-next is -next-20150302)
net/mac80211/mesh_plink.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --gi
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
While at it the missing spaces 3*HZ -> 3 * HZ were added as well (should
this be in a separate patch ?)
Pa
Putting code into the parameter list of wait_event_timeout() might be
legal C-code but not really readable - the "inline" code is simply
moved into a function and that passed to wait_event_timeout() as the
condition.
Signed-off-by: Nicholas Mc Guire
---
Thanks to Bjorn Mork for cla
wait_event_timeout() returns 0 on timeout and >= 1 on success but never
< 0 - so checking for timeout should be for equiavalence to 0 no <= 0.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
CONFIG_ATH10K=m
Patch is agains
On Wed, 11 Mar 2015, Pat Erley wrote:
> On 03/11/2015 12:19 PM, Nicholas Mc Guire wrote:
>> Putting code into the parameter list of wait_event_timeout() might be
>> legal C-code but not really readable - the "inline" code is simply
>> moved into a function and th
On Wed, 11 Mar 2015, Bj??rn Mork wrote:
> Nicholas Mc Guire writes:
>
> > Putting code into the parameter list of wait_event_timeout() might be
> > legal C-code but not really readable - the "inline" code is simply
> > moved into a function and that pas
On Wed, 11 Mar 2015, Johannes Berg wrote:
> On Wed, 2015-03-11 at 15:01 -0400, Nicholas Mc Guire wrote:
> > Putting code into the parameter list of wait_event_timeout() might be
> > legal C-code but not really readable - the "inline" code is simply
> > moved int
On Wed, 11 Mar 2015, Sergei Shtylyov wrote:
> Hello.
>
> On 03/11/2015 10:01 PM, Nicholas Mc Guire wrote:
>
>> Putting code into the parameter list of wait_event_timeout() might be
>> legal C-code but not really readable - the "inline" code is simply
>>
eout check is fixed up to ret == 0 .
Signed-off-by: Nicholas Mc Guire
---
Thanks to Bjorn Mork for clarifying my initial confusion !
v2: Thanks to Pat Erley for catching the botched skip
parameter - should have been call by reference not value - fixed here.
As Bjorn Mork pointed out, a patch
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Note: this patch generates a checkpatch CHECK
CHECK: Alignment should match open parenthesis
#53: FILE: drivers
functions being int.
Signed-off-by: Nicholas Mc Guire
---
Checking the call-sites of ath10k_wmi_wait_for_unified_ready and
ath10k_wmi_wait_for_service_ready the positive return value (remaining
time in jiffies) is never passed up the call-chain nor used so it is
cleaner to treat this like a
n with the current <= 0 check
as on success >= 1 is returned always - so this really is just a cleanup.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
CONFIG_ATH10K=m
Patch is against 4.0-rc3 (localversion-next is -n
On Fri, 13 Mar 2015, Kalle Valo wrote:
> Nicholas Mc Guire writes:
>
> > Return type of wait_for_completion_timeout is unsigned long not int.
> > An appropriately named unsigned long is added and the assignments fixed up.
> > Rather than returning 0 (timeout) or a more
On Fri, 13 Mar 2015, Kalle Valo wrote:
> Nicholas Mc Guire writes:
>
> > Return type of wait_for_completion_timeout is unsigned long not int.
> > An appropriately named unsigned long is added and the assignments fixed up.
> >
> > Signed-off-by: Nichola
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added, respectively 'ret'
renamed, and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_A
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
CONFIG_ATH10K=m
Patch is against 4.0
return type of wait_for_completion_timeout is unsigned long not int. This
patch adjusts the type and name of the return variable and adjusts the
success/fail values to match those used at the call site in ath10k_core_start
Signed-off-by: Nicholas Mc Guire
---
Adjustment of return values was
All of the bringup/init functions called in ath10k_core_start return 0 on
success and != 0 on failure - ath10k_wmi_wait_for_service_ready and
ath10k_wmi_wait_for_unified_ready were adjusted to fit this model and the
call sites here fixed up accordingly.
Signed-off-by: Nicholas Mc Guire
On Fri, 13 Mar 2015, Michal Kazior wrote:
> On 12 March 2015 at 16:49, Nicholas Mc Guire wrote:
> > Return type of wait_for_completion_timeout is unsigned long not int.
> > An appropriately named unsigned long is added and the assignments fixed up.
> > Rather than returning
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Missing spaces 1*HZ -> 1 * HZ were also added along the way.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defcon
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
CONFIG_ATH10K=m
Patch is against 4.0
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Signed-off-by: Nicholas Mc Guire
---
Patch was only compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
CONFIG_ATH10K=m
Patch is against 4.0
On Sat, 14 Mar 2015, Sergei Shtylyov wrote:
> Hello.
>
> On 03/14/2015 11:55 AM, Nicholas Mc Guire wrote:
>
>> All of the bringup/init functions called in ath10k_core_start return 0 on
>> success and != 0 on failure - ath10k_wmi_wait_for_service_ready and
>> ath10k_w
int so
ath10k_wmi_wait_for_service_ready() and ath10k_wmi_wait_for_unified_ready()
were fixed up accordingly.
Signed-off-by: Nicholas Mc Guire
---
This was initially in two separate patches which were joined as suggested
by Sergei Shtylyov to ensure that it
will not break bisection - thanks
On Mon, 16 Mar 2015, Kalle Valo wrote:
> Nicholas Mc Guire writes:
>
> > On Fri, 13 Mar 2015, Kalle Valo wrote:
> >
> >> Nicholas Mc Guire writes:
> >>
> >> > Return type of wait_for_completion_timeout is unsigned long not int.
> >>
_defconfig + CONFIG_BRCMFMAC=m
Patch is agianst 4.0-rc4 (localversion-next is -next-20150317)
Signed-off-by: Nicholas Mc Guire
---
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
On Tue, 17 Mar 2015, Joe Perches wrote:
> On Tue, 2015-03-17 at 08:06 -0400, Nicholas Mc Guire wrote:
> > Converting milliseconds to jiffies by "val * HZ / 1000" is technically
> > OK but msecs_to_jiffies(val) is the cleaner solution and handles all
> > corner cases
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
wait_for_completion_timeout does not return negative values so
"ret" handling here should check for timeout only.
patch was only compile tested for x86_64_defconfig + CONFIG_ATH_DEBUG=y
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire
---
d
wait_for_completion_timeout does not return negative values so
"ret" handling here should check for timeout only.
patch was only compile tested for x86_64_defconfig + CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire
---
d
wait_for_completion_timeout does not return negative values so
"ret" handling here should check for timeout only.
patch was only compile tested for x86_64_defconfig + CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire
---
d
wait_for_completion_timeout does not return negative values so the tests
for <= 0 are not needed and the case differentiation in the error handling
path unnecessary.
patch was only compile tested x86_64_defconfig + CONFIG_ATH_CARDS=m
CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20
wait_for_completion_timeout does not return negative values so
"ret" handling here should check for timeout only.
patch was only compile tested for x86_64_defconfig + CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire
---
d
On Tue, 30 Dec 2014, Sergei Shtylyov wrote:
> Hello.
>
> On 12/30/2014 03:20 PM, Nicholas Mc Guire wrote:
>
>> wait_for_completion_timeout does not return negative values so the tests
>> for <= 0 are not needed and the case differentiation in the error handling
&g
On Tue, 30 Dec 2014, Sergei Shtylyov wrote:
> On 12/30/2014 09:28 PM, Nicholas Mc Guire wrote:
>
>>>> wait_for_completion_timeout does not return negative values so the tests
>>>> for <= 0 are not needed and the case differentiation in the error handling
>>&
S=m
CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20141226
None of the proposed cleanups are critical.
All changes should only be removing unreachable cases.
Signed-off-by: Nicholas Mc Guire
---
drivers/net/wireless/ath/ath10k/debug.c |2 +-
drivers/net/wireless/ath/ath10k/ht
off-by: Nicholas Mc Guire
---
patch was only compile tested x86_64_defconfig + CONFIG_ATH_CARDS=m
CONFIG_ATH10K=m
patch is against linux-next 3.19.0-rc1 -next-20141226
None of the proposed cleanups are critical.
All changes should only be removing unreachable cases.
drivers/net/wireless/ath/ath
if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.
Signed-off-by: Nicholas Mc Guire
---
Only the timeout case was being handled, the signal case
(-ERESTARTSYS) was treated just like the case of
if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.
Signed-off-by: Nicholas Mc Guire
---
Only the timeout case was being handled, the signal case
(-ERESTARTSYS) was treated just like the case of
On Thu, 22 Jan 2015, Christian Lamparter wrote:
> On Tuesday, January 20, 2015 06:25:43 AM Nicholas Mc Guire wrote:
> > if(!wait_for_completion_interruptible_timeout(...))
> > only handles the timeout case - this patch adds handling the
> > signal case the same as timeout.
&
On Thu, 14 May 2015, Kalle Valo wrote:
> Nicholas Mc Guire writes:
>
> > Patch is against 4.1-rc3 (localversion-next is -next-20150514)
>
> BTW, this info should be under "---" line so that it doesn't get stored
> to the actual commit log.
>
that is w
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 +-
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
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
scanning for trivial bug-patters with coccinelle spatches returned:
./drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1395
WARNING: condition with no effect (if branch == else)
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c - line numbers from 4.1-rc7
1395if (bWithoutHWSM) {
1396
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:
On Sat, 13 Jun 2015, Jes Sorensen wrote:
> Nicholas Mc Guire writes:
> > scanning for trivial bug-patters with coccinelle spatches returned:
> > ./drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1395
> > WARNING: condition with no effect (if branch == else)
&g
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
ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. For this large delay msleep() is preferable.
Fixes: commit 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI
driver")
Link: http://lkml.org/lkml/2017/1/11/377
Signed-off-by: Nichola
69 matches
Mail list logo