[PATCH] staging/imx: Fix inconsistent IS_ERR and PTR_ERR

2018-02-28 Thread Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in imx_csi_probe. The proper pointer to be passed as argument is pinctrl instead of priv->vdev. This issue was detected with the help of Coccinelle. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Gustavo A. R. Silva

[RFC] android: ion: How to properly clean caches for uncached allocations

2018-02-28 Thread Liam Mark
The issue: Currently in ION if you allocate uncached memory it is possible that there are still dirty lines in the cache. And often these dirty lines in the cache are the zeros which were meant to clear out any sensitive kernel data. What this means is that if you allocate uncached memory from

Re: [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:07PM -0800, Quytelda Kahja wrote: ... I would normally respond to the cover letter but here goes. Reviewed-by: Tobin C. Harding thanks, Tobin. ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:09PM -0800, Quytelda Kahja wrote: > The code that generates a WLAN capability mask is repeated in five > functions. This change refactors that code into a new function, which is > called now in each of those functions. Perhaps in future something like: Code to

[PATCH 2/5] staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.

2018-02-28 Thread Quytelda Kahja
SSID_MAX_SIZE is a constant defined locally in ks_hostif.h, but it should be replaced with IEEE80211_MAX_SSID_LEN from the kernel's 802.11 header, of which it is just a copy. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 4 ++--

[PATCH 4/5] staging: ks7010: Replace local capability constants with kernel constants.

2018-02-28 Thread Quytelda Kahja
This driver defined constants BSS_CAP_* to represent WLAN capability codes; however, these constants are already defined in the header 'linux/ieee80211.h' as WLAN_CAPABILITY_*. This change removes the locally defined constants and substitutes the kernel's constants. Signed-off-by: Quytelda Kahja

[PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

2018-02-28 Thread Quytelda Kahja
The code that generates a WLAN capability mask is repeated in five functions. This change refactors that code into a new function, which is called now in each of those functions. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 88

[PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

2018-02-28 Thread Quytelda Kahja
The case statement in get_ap_information() should not use literal integers to parse information element IDs when these values are provided by name in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'. Signed-off-by: Quytelda Kahja ---

[PATCH 5/5] staging: ks7010: Replace local frame type constants with kernel constants.

2018-02-28 Thread Quytelda Kahja
This driver defined constants FRAME_TYPE_* to represent frame control field codes; however, these constants are already defined in the header 'linux/ieee80211.h' as IEEE80211_STYPE_*. This change removes the locally defined constants and substitutes the kernel's constants. Signed-off-by:

Re: [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

2018-02-28 Thread Tobin C. Harding
On Wed, Feb 28, 2018 at 09:19:07PM -0800, Quytelda Kahja wrote: > The case statement in get_ap_information() should not use literal integers > to parse information element IDs when these values are provided by name > in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'. Nice. Magic number

[PATCH] staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr

2018-02-28 Thread Colin King
From: Colin Ian King Currently the allocation of priv->oldaddr is not null checked which will lead to subsequent errors when accessing priv->oldaddr. Fix this with a null pointer check and a return of -ENOMEM on allocation failure. Detected with Coccinelle: