[PATCH] staging/lustre: Use proper number of bytes in copy_from_user
From: Jian Yu This patch removes the usage of MAX_STRING_SIZE from copy_from_user() and just copies enough bytes to cover count passed in. Signed-off-by: Jian Yu Reviewed-on: http://review.whamcloud.com/23462 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8774 Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 8a2f02f3..db49992 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -400,10 +400,17 @@ int lprocfs_wr_uint(struct file *file, const char __user *buffer, char dummy[MAX_STRING_SIZE + 1], *end; unsigned long tmp; - dummy[MAX_STRING_SIZE] = '\0'; - if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) + if (count >= sizeof(dummy)) + return -EINVAL; + + if (count == 0) + return 0; + + if (copy_from_user(dummy, buffer, count)) return -EFAULT; + dummy[count] = '\0'; + tmp = simple_strtoul(dummy, &end, 0); if (dummy == end) return -EINVAL; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH]: staging: Greybus: Remove unnecessary braces for single statement block
On Fri, Nov 18, 2016 at 8:45 PM, Rahul Krishnan wrote: > This patch fixes the following checkpath.pl warning > WARNING: braces {} are not necessary for single statement blocks > > > Signed-off-by: Rahul Krishnan > --- > drivers/staging/greybus/sdio.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Acked-by: Viresh Kumar ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: Replace blank spaces with tabstops
Fix checkpatch warning: WARNING: Statements should start on a tabstop Signed-off-by: Vijai Kumar K --- drivers/staging/rtl8712/rtl8712_led.c | 24 drivers/staging/rtl8712/rtl871x_recv.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index a8e237e..317aeee 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -355,7 +355,7 @@ static void SwLedBlink1(struct LED_871x *pLed) } pLed->bLedScanBlinkInProgress = false; } else { -if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_STATE_OFF; else pLed->BlinkingLedState = LED_STATE_ON; @@ -390,7 +390,7 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->BlinkTimes = 0; pLed->bLedBlinkInProgress = false; } else { -if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_STATE_OFF; else pLed->BlinkingLedState = LED_STATE_ON; @@ -460,7 +460,7 @@ static void SwLedBlink2(struct LED_871x *pLed) } pLed->bLedScanBlinkInProgress = false; } else { -if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_STATE_OFF; else pLed->BlinkingLedState = LED_STATE_ON; @@ -667,7 +667,7 @@ static void SwLedBlink4(struct LED_871x *pLed) msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { -if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_STATE_OFF; else pLed->BlinkingLedState = LED_STATE_ON; @@ -764,7 +764,7 @@ static void SwLedBlink5(struct LED_871x *pLed) msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { -if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_STATE_OFF; else pLed->BlinkingLedState = LED_STATE_ON; @@ -946,7 +946,7 @@ static void SwLedControlMode1(struct _adapter *padapter, if (psitesurveyctrl->traffic_busy && check_fwstate(pmlmepriv, _FW_LINKED)) ; /* dummy branch */ -else if (!pLed->bLedScanBlinkInProgress) { + else if (!pLed->bLedScanBlinkInProgress) { if (IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedNoLinkBlinkInProgress) { @@ -970,7 +970,7 @@ static void SwLedControlMode1(struct _adapter *padapter, pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); -} + } break; case LED_CTL_TX: case LED_CTL_RX: @@ -1000,7 +1000,7 @@ static void SwLedControlMode1(struct _adapter *padapter, case LED_CTL_START_WPS: /*wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: -if (!pLed->bLedWPSBlinkInProgress) { + if (!pLed->bLedWPSBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedNoLinkBlinkInProgress = false; @@ -1113,9 +1113,9 @@ static void SwLedControlMode2(struct _adapter *padapter, switch (LedAction) { case LED_CTL_SITE_SURVEY: -if (pmlmepriv->sitesurveyctrl.traffic_busy) + if (pmlmepriv->sitesurveyctrl.traffic_busy) ; /* dummy branch */ -else if (!pLed->bLedScanBlinkInProgress) { + else if (!pLed->bLedScanBlinkInProgress) { if (IS_LED_WPS_BLINKING(pLed)) return; @@ -1132,7 +1132,7 @@ static void SwLedControlMode2(struct _adapter *padapter, pLed->BlinkingLedState = LED_STATE_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_t
[PATCH] staging: rtl8712: Fix coding style warnings on Block comments
Fixed checkpatch.pl warnings related to Block comments in staging/rtl8712/*.c files. Signed-off-by: Vijai Kumar K --- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 14 ++--- drivers/staging/rtl8712/rtl871x_mlme.c | 30 +-- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 34 +--- drivers/staging/rtl8712/rtl871x_recv.c | 11 ++-- drivers/staging/rtl8712/rtl871x_security.c | 80 ++--- drivers/staging/rtl8712/rtl871x_xmit.c | 45 6 files changed, 101 insertions(+), 113 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c index 0aaf2aa..01a1504 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c @@ -139,9 +139,10 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid) if (!memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN)) { if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) - goto _Abort_Set_BSSID; /* driver is in - * WIFI_ADHOC_MASTER_STATE - */ + /* driver is in +* WIFI_ADHOC_MASTER_STATE +*/ + goto _Abort_Set_BSSID; } else { r8712_disassoc_cmd(padapter); if (check_fwstate(pmlmepriv, _FW_LINKED)) @@ -203,9 +204,10 @@ void r8712_set_802_11_ssid(struct _adapter *padapter, WIFI_ADHOC_STATE); } } else { - goto _Abort_Set_SSID; /* driver is in - * WIFI_ADHOC_MASTER_STATE - */ + /* driver is in +* WIFI_ADHOC_MASTER_STATE +*/ + goto _Abort_Set_SSID; } } } else { diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index c1feef3..5df1273 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -137,11 +137,10 @@ static void free_network_nolock(struct mlme_priv *pmlmepriv, } -/* - return the wlan_network with the matching addr - Shall be called under atomic context... - to avoid possible racing condition... -*/ +/* return the wlan_network with the matching addr + * Shall be called under atomic context... + * to avoid possible racing condition... + */ static struct wlan_network *_r8712_find_network(struct __queue *scanned_queue, u8 *addr) { @@ -239,11 +238,10 @@ void r8712_free_network_queue(struct _adapter *dev) } /* - return the wlan_network with the matching addr - - Shall be called under atomic context... - to avoid possible racing condition... -*/ + * return the wlan_network with the matching addr + * Shall be called under atomic context... + * to avoid possible racing condition... + */ static struct wlan_network *r8712_find_network(struct __queue *scanned_queue, u8 *addr) { @@ -369,9 +367,7 @@ static void update_current_network(struct _adapter *adapter, } } -/* -Caller must hold pmlmepriv->lock first. -*/ +/* Caller must hold pmlmepriv->lock first */ static void update_scanned_network(struct _adapter *adapter, struct wlan_bssid_ex *target) { @@ -651,8 +647,8 @@ void r8712_free_assoc_resources(struct _adapter *adapter) } /* -*r8712_indicate_connect: the caller has to lock pmlmepriv->lock -*/ + * r8712_indicate_connect: the caller has to lock pmlmepriv->lock + */ void r8712_indicate_connect(struct _adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -668,8 +664,8 @@ void r8712_indicate_connect(struct _adapter *padapter) /* -*r8712_ind_disconnect: the caller has to lock pmlmepriv->lock -*/ + * r8712_ind_disconnect: the caller has to lock pmlmepriv->lock + */ void r8712_ind_disconnect(struct _adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index d464c13..e42fc14 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -190,19 +190,15 @@ void r8712_init_pwrctrl_priv(struct _adapter *padapter) } /* -Caller: r8712_cmd_thread - -Check if the fw_pwrstate is okay for issuing
[PATCH v3] staging: skein: threefish_block.c Remove blank lines
Make suggested checkpatch modification for CHECK: Please don't use multiple blank lines Acked-by: Jason Cooper --- v3 adds previously missed ack and --to email for Jason v2 makes changes to correct for email format patch submission drivers/staging/skein/threefish_block.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/skein/threefish_block.c b/drivers/staging/skein/threefish_block.c index a95563f..5064065 100644 --- a/drivers/staging/skein/threefish_block.c +++ b/drivers/staging/skein/threefish_block.c @@ -64,7 +64,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k3 + t2; b0 += b1 + k2; b1 = rol64(b1, 14) ^ b0; @@ -117,7 +116,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k0 + t1; b0 += b1 + k4; b1 = rol64(b1, 14) ^ b0; @@ -170,7 +168,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k2 + t0; b0 += b1 + k1; b1 = rol64(b1, 14) ^ b0; @@ -223,7 +220,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k4 + t2; b0 += b1 + k3; b1 = rol64(b1, 14) ^ b0; @@ -276,7 +272,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k1 + t1; b0 += b1 + k0; b1 = rol64(b1, 14) ^ b0; @@ -329,7 +324,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k3 + t0; b0 += b1 + k2; b1 = rol64(b1, 14) ^ b0; @@ -382,7 +376,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k0 + t2; b0 += b1 + k4; b1 = rol64(b1, 14) ^ b0; @@ -435,7 +428,6 @@ void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input, b2 += b1; b1 = rol64(b1, 32) ^ b2; - b1 += k2 + t1; b0 += b1 + k1; b1 = rol64(b1, 14) ^ b0; @@ -579,7 +571,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k3 + t2; b3 -= k4 + 16; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -648,7 +639,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k1 + t0; b3 -= k2 + 14; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -717,7 +707,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k4 + t1; b3 -= k0 + 12; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -786,7 +775,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k2 + t2; b3 -= k3 + 10; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -855,7 +843,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k0 + t0; b3 -= k1 + 8; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -924,7 +911,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k3 + t1; b3 -= k4 + 6; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -993,7 +979,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k1 + t2; b3 -= k2 + 4; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; @@ -1062,7 +1047,6 @@ void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input, b2 -= b3 + k4 + t0; b3 -= k0 + 2; - tmp = b3 ^ b0; b3 = ror64(tmp, 32); b0 -= b3; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6656: Fix coding style warnings on Block comments
Fix checkpatch.pl warnings related to Block comments in staging/vt6656/rf.c file. Signed-off-by: Vijai Kumar K --- drivers/staging/vt6656/rf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 8b72479..6101a35 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -730,9 +730,9 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate) return false; /* - * 0x080F1B00 for 3 wire control TxGain(D10) - * and 0x31 as TX Gain value - */ +* 0x080F1B00 for 3 wire control TxGain(D10) +* and 0x31 as TX Gain value +*/ power_setting = 0x080c0b00 | (power << 12); ret &= vnt_rf_write_embedded(priv, power_setting); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: skein: threefish_block.c Remove blank lines
Hi Walt, > On Nov 19, 2016, at 11:54, Walt Feasel wrote: > > Make suggested checkpatch modification for > > CHECK: Please don't use multiple blank lines > > Signed-off-by: Walt Feasel I Acked the previous version, so you should place that above your S-o-b when submitting a new version. If no new version is necessary, the maintainer will add it. Also, please keep the Cc list from previous versions. Thx, Jason. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Possible corrupt file or patch
On Sun, Nov 20, 2016 at 10:50:49AM +0100, Greg KH wrote: > On Sun, Nov 20, 2016 at 01:41:46AM -0500, Walt Feasel wrote: > > I have a few files that look perfectly fine in nano and > > gedit but the patch file that gets made shows the columns > > out of alignment. I have remade them several > > times to the same effect. I have also made sure that > > there isnt a tab and space mix. Is this a bug that > > happens sometimes or do I need to do something to > > fix this? > > > > I would really appreciate any assistance on this or > > feed back that this file does the same for others. > > > > Signed-off-by: Walt Feasel > > --- > > v2 makes changes to correct for email format patch submission > > > > drivers/staging/speakup/speakup_decpc.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/speakup/speakup_decpc.c > > b/drivers/staging/speakup/speakup_decpc.c > > index 9e16498..813461c 100644 > > --- a/drivers/staging/speakup/speakup_decpc.c > > +++ b/drivers/staging/speakup/speakup_decpc.c > > @@ -75,12 +75,12 @@ > > #defineCTRL_buff_free 0x0800 /* buffer remain count */ > > #defineCTRL_buff_used 0x0900 /* buffer in use */ > > #defineCTRL_speech 0x0a00 /* immediate speech change */ > > -#define CTRL_SP_voice0x0001 /* voice change */ > > -#define CTRL_SP_rate 0x0002 /* rate change */ > > -#define CTRL_SP_comma0x0003 /* comma pause change */ > > -#define CTRL_SP_period 0x0004 /* period pause change */ > > -#define CTRL_SP_rate_delta 0x0005 /* delta rate change */ > > -#define CTRL_SP_get_param0x0006 /* return the desired parameter > > */ > > +#define CTRL_SP_voice 0x0001 /* voice change */ > > +#define CTRL_SP_rate 0x0002 /* rate change */ > > +#define CTRL_SP_comma 0x0003 /* comma pause change */ > > +#define CTRL_SP_period 0x0004 /* period pause change */ > > +#define CTRL_SP_rate_delta 0x0005 /* delta rate change */ > > +#define CTRL_SP_get_param 0x0006 /* return the desired parameter */ > > #defineCTRL_last_index 0x0b00 /* get last index spoken */ > > #defineCTRL_io_priority0x0c00 /* change i/o priority */ > > #defineCTRL_free_mem 0x0d00 /* get free paragraphs on > > module */ > > If you look close, there is a tab character after the "#define" and > before the "CTRL" on all of these lines, not a space. Odds are that > nano and gedit do not show it. If you use something like emacs or vim, > there are modes in which you can see control characters like this. > > I recommend getting rid of all of the tab characters right after > "#define" as this is just a mess and causes confusion as you are seeing. > > thanks, > > greg k-h > Greg, Thanks again! I saw them in vim! Setting whitespace in nano is not done by default I guess but have it set now. Walt ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Possible corrupt file or patch
On Sun, Nov 20, 2016 at 01:41:46AM -0500, Walt Feasel wrote: > I have a few files that look perfectly fine in nano and > gedit but the patch file that gets made shows the columns > out of alignment. I have remade them several > times to the same effect. I have also made sure that > there isnt a tab and space mix. Is this a bug that > happens sometimes or do I need to do something to > fix this? > > I would really appreciate any assistance on this or > feed back that this file does the same for others. > > Signed-off-by: Walt Feasel > --- > v2 makes changes to correct for email format patch submission > > drivers/staging/speakup/speakup_decpc.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/speakup/speakup_decpc.c > b/drivers/staging/speakup/speakup_decpc.c > index 9e16498..813461c 100644 > --- a/drivers/staging/speakup/speakup_decpc.c > +++ b/drivers/staging/speakup/speakup_decpc.c > @@ -75,12 +75,12 @@ > #define CTRL_buff_free 0x0800 /* buffer remain count */ > #define CTRL_buff_used 0x0900 /* buffer in use */ > #define CTRL_speech 0x0a00 /* immediate speech change */ > -#define CTRL_SP_voice0x0001 /* voice change */ > -#define CTRL_SP_rate 0x0002 /* rate change */ > -#define CTRL_SP_comma0x0003 /* comma pause change */ > -#define CTRL_SP_period 0x0004 /* period pause change */ > -#define CTRL_SP_rate_delta 0x0005 /* delta rate change */ > -#define CTRL_SP_get_param0x0006 /* return the desired parameter > */ > +#define CTRL_SP_voice0x0001 /* voice change */ > +#define CTRL_SP_rate 0x0002 /* rate change */ > +#define CTRL_SP_comma0x0003 /* comma pause change */ > +#define CTRL_SP_period 0x0004 /* period pause change */ > +#define CTRL_SP_rate_delta 0x0005 /* delta rate change */ > +#define CTRL_SP_get_param0x0006 /* return the desired parameter */ > #define CTRL_last_index 0x0b00 /* get last index spoken */ > #define CTRL_io_priority0x0c00 /* change i/o priority */ > #define CTRL_free_mem 0x0d00 /* get free paragraphs on > module */ If you look close, there is a tab character after the "#define" and before the "CTRL" on all of these lines, not a space. Odds are that nano and gedit do not show it. If you use something like emacs or vim, there are modes in which you can see control characters like this. I recommend getting rid of all of the tab characters right after "#define" as this is just a mess and causes confusion as you are seeing. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] staging: slicoss: fix different address space warnings
On Sat, Nov 19, 2016 at 2:20 PM, Greg KH wrote: > On Fri, Nov 18, 2016 at 06:57:18PM +0100, Sergio Paracuellos wrote: >> Remove incorrect __iomem annotation. >> >> This patch fix the following sparse warnings in slicoss driver: >> warning: incorrect type in assignment (different address spaces) >> >> Signed-off-by: Sergio Paracuellos >> --- >> drivers/staging/slicoss/slic.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h >> index 420546d..14d7555 100644 >> --- a/drivers/staging/slicoss/slic.h >> +++ b/drivers/staging/slicoss/slic.h >> @@ -380,7 +380,7 @@ struct slic_shmemory { >> dma_addr_t isr_phaddr; >> dma_addr_t lnkstatus_phaddr; >> dma_addr_t stats_phaddr; >> - struct slic_shmem_data __iomem *shmem_data; >> + struct slic_shmem_data *shmem_data; > > But, is this the correct fix? It looks like shmem_data is being treated > like a pointer to io memory, so we need to use the correct accessors for > that memory, and not just a "raw" pointer, right? Removing this marking > seems to be moving backwards... That was the intention of v3 of the patch. But after Dan suggestions I though that just removing this mark would be enough because it was wrong. I am a little lost now :) Cheers, Sergio Paracuellos > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel