On Thu, Mar 16, 2017 at 11:27:21PM +1100, Tobin C. Harding wrote: > Sparse emits numerous warnings highlighting endian issues. The > endianess is deterministic because the function calls that are causing > the issues either accept as parameters, or return as results, types of > specific size and endianess. We can use these types as a guide in > changing variable declarations and struct member definitions to suit > the required endianess. > > Patch 01 renames a common kernel identifier. > > Patch 02 fixes variable passed into ntohs(). > > Patch 03 fixes declarations for variables that are used as lval's in calls > to cpu_to_leXX(). > > Patch 04 fixes endian bug, making arithmetic work on any architecture. > > Patch 05 fixes endian variable degrading to integer. > > Patch 06 uses le16_to_cpu() for assigning endian value to cpu type. > > Code has not been tested. Patch set builds on x86_64 and PowerPC. > > Tobin C. Harding (6): > staging: ks7010: rename sk_buf ptr to skb > staging: ks7010: change unsigned short to __be16 > staging: ks7010: set lval type of cpu_to_leXX() > staging: ks7010: use le16_to_cpu for arithmetic > staging: ks7010: add endian non-specific variable > staging: ks7010: use le16_to_cpu() to queue event > > drivers/staging/ks7010/eap_packet.h | 4 +- > drivers/staging/ks7010/ks7010_sdio.c | 14 ++++-- > drivers/staging/ks7010/ks_hostif.c | 71 ++++++++++++++--------------- > drivers/staging/ks7010/ks_hostif.h | 88 ++++++++++++++++++------------------ > 4 files changed, 90 insertions(+), 87 deletions(-) > > -- > 2.7.4 > Please drop this patch. There are deeper endian problems with the current code that need addressing also. thanks, Tobin. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel