[PATCH] staging: wlan-ng: reduce type warnings
Fixes the following sparse output: drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16 drivers/staging/wlan-ng/p80211conv.c:154:38: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:154:38:expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:154:38:got restricted __be16 [usertype] drivers/staging/wlan-ng/p80211conv.c:390:42: warning: cast to restricted __le16 drivers/staging/wlan-ng/p80211conv.c:413:29: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:413:29:expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:413:29:got restricted __be16 [usertype] drivers/staging/wlan-ng/p80211conv.c:481:29: warning: incorrect type in assignment (different base types) drivers/staging/wlan-ng/p80211conv.c:481:29:expected unsigned short [unsigned] [usertype] type drivers/staging/wlan-ng/p80211conv.c:481:29:got restricted __be16 [usertype] Signed-off-by: Alexander Alemayhu --- drivers/staging/wlan-ng/p80211conv.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 8387e6a3031a..8b0905e7c9be 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -387,7 +387,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, (((memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) == 0) && (ethconv == WLAN_ETHCONV_8021h) && - (p80211_stt_findproto(le16_to_cpu(e_snap->type || + (p80211_stt_findproto(be16_to_cpu(e_snap->type || (memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) != 0))) { pr_debug("SNAP+RFC1042 len: %d\n", payload_length); diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h index ed70d98e5cf1..04bac2ed0e8a 100644 --- a/drivers/staging/wlan-ng/p80211conv.h +++ b/drivers/staging/wlan-ng/p80211conv.h @@ -130,7 +130,7 @@ struct p80211_metawep { struct wlan_ethhdr { u8 daddr[ETH_ALEN]; u8 saddr[ETH_ALEN]; - u16 type; + __be16 type; } __packed; /* local llc header type */ @@ -143,7 +143,7 @@ struct wlan_llc { /* local snap header type */ struct wlan_snap { u8 oui[WLAN_IEEE_OUI_LEN]; - u16 type; + __be16 type; } __packed; /* Circular include trick */ -- 2.11.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vc04_services: remove unused functions
On Tue, Feb 07, 2017 at 03:09:44PM +0300, Dan Carpenter wrote: > There is a bunch of vc04_services that we're still looking to merge in > the near future. Please hold off deleting these until we are further > along on that. > OK. Thanks. -- Mit freundlichen Grüßen Alexander Alemayhu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vc04_services: remove unused functions
Looking at the history these calls were introduced in 71bad7f08641 (staging: add bcm2708 vchiq driver, 2013-07-02) and they were not being used at all. Discovered using sparse and fixes the following output: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:816:1: warning: symbol 'vchi_readbuf_uint32' was not declared. Should it be static? drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:827:1: warning: symbol 'vchi_writebuf_uint32' was not declared. Should it be static? drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:841:1: warning: symbol 'vchi_readbuf_uint16' was not declared. Should it be static? drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:852:1: warning: symbol 'vchi_writebuf_uint16' was not declared. Should it be static? Signed-off-by: Alexander Alemayhu --- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 48 -- 1 file changed, 48 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c index 48984abc3854..cd0c332210ca 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -808,54 +808,6 @@ int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, short *peer_ve } EXPORT_SYMBOL(vchi_get_peer_version); -/* -- - * read a uint32_t from buffer. - * network format is defined to be little endian - * */ -uint32_t -vchi_readbuf_uint32(const void *_ptr) -{ - const unsigned char *ptr = _ptr; - return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); -} - -/* -- - * write a uint32_t to buffer. - * network format is defined to be little endian - * */ -void -vchi_writebuf_uint32(void *_ptr, uint32_t value) -{ - unsigned char *ptr = _ptr; - ptr[0] = (unsigned char)((value >> 0) & 0xFF); - ptr[1] = (unsigned char)((value >> 8) & 0xFF); - ptr[2] = (unsigned char)((value >> 16) & 0xFF); - ptr[3] = (unsigned char)((value >> 24) & 0xFF); -} - -/* -- - * read a uint16_t from buffer. - * network format is defined to be little endian - * */ -uint16_t -vchi_readbuf_uint16(const void *_ptr) -{ - const unsigned char *ptr = _ptr; - return ptr[0] | (ptr[1] << 8); -} - -/* -- - * write a uint16_t into the buffer. - * network format is defined to be little endian - * */ -void -vchi_writebuf_uint16(void *_ptr, uint16_t value) -{ - unsigned char *ptr = _ptr; - ptr[0] = (value >> 0) & 0xFF; - ptr[1] = (value >> 8) & 0xFF; -} - /*** * Name: vchi_service_use * -- 2.11.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] fix coding style
On Sun, Oct 23, 2016 at 05:31:09PM +0800, Jiong Du wrote: > --- > drivers/staging/ks7010/michael_mic.c | 19 +++ > 1 file changed, 11 insertions(+), 8 deletions(-) > Looks like you are missing a topic. You could add 'staging: ks7010:'. Which seems to be used by others when looking at `git log drivers/staging/ks7010/`. You might also want to add a changelog comment. Thanks. -- Mit freundlichen Grüßen Alexander Alemayhu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: i4l: pcbit: remove duplicated include from capi.c
On Tue, Oct 18, 2016 at 02:37:10PM +, Wei Yongjun wrote: > From: Wei Yongjun > > Remove duplicated include. > How did you discover that? Just curious if you used any tooling. -- Mit freundlichen Grüßen Alexander Alemayhu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/5] Replace data type declarations with variables of same types in several source files.
On Mon, Oct 10, 2016 at 04:02:17PM +0200, Sergio Paracuellos wrote: > This patch series replaces several sizeof(struct XXX) stuff in favour > of sizeof(var) which is the preferred one. > Why not squash this series into one patch? The commit messages are fairly similar and the changes are focused into one area. Would be better with one commit, IMO. -- Mit freundlichen Grüßen Alexander Alemayhu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:greybus:arche-apb-ctrl: fixed some coding style issue
On Wed, Oct 12, 2016 at 04:45:54PM +0200, Greg KH wrote: > > You can subscribe to the driverdev mailing list to see what othes are > working on, and you can follow my staging-testing kernel branch in the > staging.git tree. But sometimes you just get unlucky, lots of people > are working on cleaning up staging drivers, people do the same work at > the same time quite often, it's just part of the process. > Is this (http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel) the right page for subscribing? Thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: pcbit: replace some include asm/*.h with linux/*.h
Fixes the following checkpatch output: ./pcbit/capi.c:39: WARNING: Use #include instead of ./pcbit/capi.c:40: WARNING: Use #include instead of ./pcbit/callbacks.c:25: WARNING: Use #include instead of ./pcbit/layer2.c:39: WARNING: Use #include instead of ./pcbit/drv.c:34: WARNING: Use #include instead of ./pcbit/drv.c:35: WARNING: Use #include instead of ./pcbit/edss1.c:26: WARNING: Use #include instead of Signed-off-by: Alexander Alemayhu --- This is my first patch to the list, hopefully I've done everything correctly. If not please let me know, thanks. drivers/staging/i4l/pcbit/callbacks.c | 2 +- drivers/staging/i4l/pcbit/capi.c | 4 ++-- drivers/staging/i4l/pcbit/drv.c | 4 ++-- drivers/staging/i4l/pcbit/edss1.c | 2 +- drivers/staging/i4l/pcbit/layer2.c| 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/i4l/pcbit/callbacks.c b/drivers/staging/i4l/pcbit/callbacks.c index efb6d6a3639a..212ab0b229d4 100644 --- a/drivers/staging/i4l/pcbit/callbacks.c +++ b/drivers/staging/i4l/pcbit/callbacks.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/drivers/staging/i4l/pcbit/capi.c b/drivers/staging/i4l/pcbit/capi.c index 373f90feda5a..91f299477d43 100644 --- a/drivers/staging/i4l/pcbit/capi.c +++ b/drivers/staging/i4l/pcbit/capi.c @@ -36,8 +36,8 @@ #include -#include -#include +#include +#include #include diff --git a/drivers/staging/i4l/pcbit/drv.c b/drivers/staging/i4l/pcbit/drv.c index d417df5efb5f..87b852259b89 100644 --- a/drivers/staging/i4l/pcbit/drv.c +++ b/drivers/staging/i4l/pcbit/drv.c @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #include #include "pcbit.h" diff --git a/drivers/staging/i4l/pcbit/edss1.c b/drivers/staging/i4l/pcbit/edss1.c index 6d291d548423..5980d1b5da95 100644 --- a/drivers/staging/i4l/pcbit/edss1.c +++ b/drivers/staging/i4l/pcbit/edss1.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/drivers/staging/i4l/pcbit/layer2.c b/drivers/staging/i4l/pcbit/layer2.c index a136c72547e5..0592bf6ee9c9 100644 --- a/drivers/staging/i4l/pcbit/layer2.c +++ b/drivers/staging/i4l/pcbit/layer2.c @@ -36,7 +36,7 @@ #include -#include +#include #include "pcbit.h" -- 2.10.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel