[PATCH] Staging: wlan-ng: Fix sparse warnings by using appropriate endian types
From: Antoine Fix the following sparse endianness warnings: drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:375:46: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:377:33: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:378:47: warning: cast to restricted __le16 Signed-off-by: antoine --- drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 310e2c454590..ef0b9628305d 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -445,9 +445,9 @@ struct hfa384x_downloadbuffer { /*-- Information Record: commsquality --*/ struct hfa384x_commsquality { - u16 cq_curr_bss; - u16 asl_curr_bss; - u16 anl_curr_fc; + __le16 cq_curr_bss; + __le16 asl_curr_bss; + __le16 anl_curr_fc; } __packed; /*-- Information Record: dmbcommsquality --*/ -- 2.13.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Re: [PATCH] Staging: wlan-ng: Fix sparse warnings by using appropriate endian types
Hi, My real name is Antoine BLIN. I'm sorry for the mistake ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: sm750fb: ddk750_power.c: Remove optionnal parentheses.
Fix up "return is not a function, parentheses are not required" error found by the checkpatch.pl script. Signed-off-by: Antoine BLIN --- drivers/staging/sm750fb/ddk750_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index c8c51be..3c04447 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -20,7 +20,7 @@ unsigned int getPowerMode(void) { if (getChipType() == SM750LE) return 0; - return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE)); + return FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE); } -- 2.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: sm750fb: ddk750_power.c: Split lines over 80 characters.
Fix up "line over 80 characters" warning found by the checkpatch.pl script. Signed-off-by: Antoine BLIN --- drivers/staging/sm750fb/ddk750_power.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index 3c04447..e580dab 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -8,7 +8,8 @@ void ddk750_setDPMS(DPMS_t state) if (getChipType() == SM750LE) { value = PEEK32(CRT_DISPLAY_CTRL); - POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state)); + POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, +DPMS, state)); } else { value = PEEK32(SYSTEM_CTRL); value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state); @@ -39,15 +40,18 @@ void setPowerMode(unsigned int powerMode) switch (powerMode) { case POWER_MODE_CTRL_MODE_MODE0: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE0); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE0); break; case POWER_MODE_CTRL_MODE_MODE1: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE1); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE1); break; case POWER_MODE_CTRL_MODE_SLEEP: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, SLEEP); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + SLEEP); break; default: @@ -138,8 +142,9 @@ void enableZVPort(unsigned int enable) gate = FIELD_SET(gate, CURRENT_GATE, I2C,ON); #endif } else { - /* Disable ZV Port Gate. There is no way to know whether the GPIO pins are being used -or not. Therefore, do not disable the GPIO gate. */ + /* Disable ZV Port Gate. There is no way to know whether the + GPIO pins are being used or not. Therefore, do not disable the + GPIO gate. */ gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF); } -- 2.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel