[PATCH] staging: rts5208: Change data type to unsigned int.
This patch fixes a minor checkpatch warning: "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" Signed-off-by: Louie Lu --- drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c index d203104..b300387 100644 --- a/drivers/staging/rts5208/rtsx_scsi.c +++ b/drivers/staging/rts5208/rtsx_scsi.c @@ -1521,7 +1521,7 @@ static int write_host_reg(struct scsi_cmnd *srb, struct rtsx_chip *chip) static int set_variable(struct scsi_cmnd *srb, struct rtsx_chip *chip) { - unsigned lun = SCSI_LUN(srb); + unsigned int lun = SCSI_LUN(srb); if (srb->cmnd[3] == 1) { /* Variable Clock */ -- 2.8.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: rtl8712: delete one space before if statement
This patch fixed minor checkpatch warning: WARNING: Statements should start on a tabstop Signed-off-by: Louie Lu --- drivers/staging/rtl8712/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index b615fbf..cbe4de0 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -425,7 +425,7 @@ static int netdev_open(struct net_device *pnetdev) else netif_wake_queue(pnetdev); -if (video_mode) + if (video_mode) enable_video_mode(padapter, cbw40_enable); /* start driver mlme relation timer */ start_drv_timers(padapter); -- 2.8.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/3] staging: rtl8712: fixed indent and comment style in code
This patchsets cleanup some warning report from checkpatch Including: * space indent * bad comment style Louie Lu (3): staging: rtl8712: delete one space before if statement staging: rtl8172: fixed comment style in rts871x_cmd.c staging: rtl8712: fixed comment style and space indent drivers/staging/rtl8712/os_intfs.c| 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 46 +++ drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 37 - 3 files changed, 48 insertions(+), 37 deletions(-) -- 2.8.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: rtl8172: fixed comment style in rts871x_cmd.c
Fixed comment style warning by checkpatch: * Block comments use * on subsequent lines * Block comments use a trailing */ on a separate line Signed-off-by: Louie Lu --- drivers/staging/rtl8712/rtl871x_cmd.c | 46 +++ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 5838696..51b6959 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -51,9 +51,9 @@ #include "mlme_osdep.h" /* -Caller and the r8712_cmd_thread can protect cmd_q by spin_lock. -No irqsave is necessary. -*/ + * Caller and the r8712_cmd_thread can protect cmd_q by spin_lock. + * No irqsave is necessary. + */ static sint _init_cmd_priv(struct cmd_priv *pcmdpriv) { @@ -110,14 +110,14 @@ static void _free_cmd_priv(struct cmd_priv *pcmdpriv) } /* -Calling Context: - -_enqueue_cmd can only be called between kernel thread, -since only spin_lock is used. - -ISR/Call-Back functions can't call this sub-function. - -*/ + * Calling Context: + * + * _enqueue_cmd can only be called between kernel thread, + * since only spin_lock is used. + * + * ISR/Call-Back functions can't call this sub-function. + * + */ static sint _enqueue_cmd(struct __queue *queue, struct cmd_obj *obj) { @@ -211,11 +211,11 @@ void r8712_free_cmd_obj(struct cmd_obj *pcmd) } /* -r8712_sitesurvey_cmd(~) - ### NOTE: () - MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, -YOU SHOULD HAVE LOCKED pmlmepriv->lock -*/ + * r8712_sitesurvey_cmd(~) + * ### NOTE: () + * MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, + * YOU SHOULD HAVE LOCKED pmlmepriv->lock + */ u8 r8712_sitesurvey_cmd(struct _adapter *padapter, struct ndis_802_11_ssid *pssid) { @@ -491,8 +491,9 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1)); psecnetwork->IELength = 0; - /* If the driver wants to use the bssid to create the connection. -* If not, we copy the connecting AP's MAC address to it so that + /* +* If the driver wants to use the bssid to create the connection. +* If not, we copy the connecting AP's MAC address to it so that * the driver just has the bssid information for PMKIDList searching. */ if (!pmlmepriv->assoc_by_bssid) @@ -519,7 +520,8 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) } } if (pregistrypriv->ht_enable) { - /* For WEP mode, we will use the bg mode to do the connection + /* +* For WEP mode, we will use the bg mode to do the connection * to avoid some IOT issues, especially for Realtek 8192u * SoftAP. */ @@ -904,8 +906,10 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter, (r8712_get_wlan_bssid_ex_sz(pnetwork))); if (pmlmepriv->fw_state & _FW_UNDER_LINKING) pmlmepriv->fw_state ^= _FW_UNDER_LINKING; - /* we will set _FW_LINKED when there is one more sat to -* join us (stassoc_event_callback) */ + /* +* we will set _FW_LINKED when there is one more sat to +* join us (stassoc_event_callback) +*/ } createbss_cmd_fail: spin_unlock_irqrestore(&pmlmepriv->lock, irqL); -- 2.8.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: rtl8712: fixed comment style and space indent
fixed comment style and space indent report from checkpatch: * WARNING: Statements should start on a tabstop * WARNING: Block comments use * on subsequent lines * WARNING: suspect code indent for conditional statements (16, 32) Signed-off-by: Louie Lu --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 37 --- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index e205adf..5c05f21 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -422,7 +422,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, (u8)_FAIL) ret = -EOPNOTSUPP; } else { - /* don't update "psecuritypriv->PrivacyAlgrthm" and + /* +* don't update "psecuritypriv->PrivacyAlgrthm" and * "psecuritypriv->PrivacyKeyIndex=keyid", but can * r8712_set_key to fw/cam */ @@ -664,7 +665,7 @@ static int r8711_wx_set_freq(struct net_device *dev, struct iw_freq *fwrq = &wrqu->freq; int rc = 0; -/* If setting by frequency, convert to a channel */ + /* If setting by frequency, convert to a channel */ if ((fwrq->e == 1) && (fwrq->m >= (int) 2.412e8) && (fwrq->m <= (int) 2.487e8)) { @@ -827,7 +828,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev, for (j = 0; j < NUM_PMKID_CACHE; j++) { if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) { - /* BSSID is matched, the same AP => Remove + /* +*BSSID is matched, the same AP => Remove * this PMKID information and reset it. */ eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid); @@ -870,11 +872,13 @@ static int r8711_wx_get_range(struct net_device *dev, wrqu->data.length = sizeof(*range); memset(range, 0, sizeof(*range)); - /* Let's try to keep this struct in the same order as in + /* +* Let's try to keep this struct in the same order as in * linux/include/wireless.h */ - /* TODO: See what values we can set, and remove the ones we can't + /* +* TODO: See what values we can set, and remove the ones we can't * set, or fill them with some default data. */ /* ~5 Mb/s real (802.11b) */ @@ -1714,7 +1718,8 @@ static int r871x_wx_set_auth(struct net_device *dev, } break; case IW_AUTH_DROP_UNENCRYPTED: - /* HACK: + /* +* HACK: * * wpa_supplicant calls set_wpa_enabled when the driver * is loaded and unloaded, regardless of if WPA is being @@ -1727,12 +1732,13 @@ static int r871x_wx_set_auth(struct net_device *dev, */ if (padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption1Enabled) { - /* it means init value, or using wep, -* ndisencryptstatus = -* Ndis802_11Encryption1Enabled, -* then it needn't reset it; -*/ - break; + /* +* it means init value, or using wep, +* ndisencryptstatus = +* Ndis802_11Encryption1Enabled, +* then it needn't reset it; +*/ + break; } if (paramval) { @@ -1976,9 +1982,9 @@ static int r871x_get_ap_info(struct net_device *dev, if (pdata->length >= 32) { if (copy_from_user(data, pdata->pointer, 32)) return -EINVAL; -data[32] = 0; + data[32] = 0; } else { -return -EINVAL; + return -EINVAL; } spin_lock_irqsave(&(pmlmepriv->scanned_queue.lock), irqL); phead = &queue->queue; @@ -2107,7 +2113,8 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value) case IEEE_PARAM_TKIP_COUNTERMEASURES: break; case IEEE_PARAM_DROP_UNENCRYPTED: - /* HACK: + /* +* HACK:
Re: [PATCH 3/3] staging: rtl8712: fixed comment style and space indent
2016-09-02 20:55 GMT+08:00 Greg KH : > On Fri, Sep 02, 2016 at 06:16:10PM +0800, Louie Lu wrote: >> fixed comment style and space indent report from checkpatch: >> >> * WARNING: Statements should start on a tabstop >> * WARNING: Block comments use * on subsequent lines >> * WARNING: suspect code indent for conditional statements (16, 32) >> >> Signed-off-by: Louie Lu >> --- >> drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 37 >> --- >> 1 file changed, 22 insertions(+), 15 deletions(-) > > This patch adds errors :( > > Now if you want to constantly submit new checkpatch cleanups to the > driver, that's a good thing, but really, please use checkpatch on your > patches to ensure you are doing things properly. > > I'm dropping it from my patch queue. > > thanks, > > greg k-h Hi Greg, sorry about that I didn't know I add error to this file. I'll make sure this won't happen again. And if I want to resubmit this patch 3/3, I'll only need to resend this one, like [PATCH 3/3 v2] this way? thanks, Louie Lu ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8712: fixed comment style and space indent
fixed comment style and space indent report from checkpatch in rtl8712/rtl871x_ioctl_linux.c: * WARNING: Statements should start on a tabstop * WARNING: Block comments use * on subsequent lines * WARNING: suspect code indent for conditional statements (16, 32) Signed-off-by: Louie Lu --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 37 --- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index e205adf..f8a5fc3 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -422,7 +422,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, (u8)_FAIL) ret = -EOPNOTSUPP; } else { - /* don't update "psecuritypriv->PrivacyAlgrthm" and + /* +* don't update "psecuritypriv->PrivacyAlgrthm" and * "psecuritypriv->PrivacyKeyIndex=keyid", but can * r8712_set_key to fw/cam */ @@ -664,7 +665,7 @@ static int r8711_wx_set_freq(struct net_device *dev, struct iw_freq *fwrq = &wrqu->freq; int rc = 0; -/* If setting by frequency, convert to a channel */ + /* If setting by frequency, convert to a channel */ if ((fwrq->e == 1) && (fwrq->m >= (int) 2.412e8) && (fwrq->m <= (int) 2.487e8)) { @@ -827,7 +828,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev, for (j = 0; j < NUM_PMKID_CACHE; j++) { if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) { - /* BSSID is matched, the same AP => Remove + /* +*BSSID is matched, the same AP => Remove * this PMKID information and reset it. */ eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid); @@ -870,11 +872,13 @@ static int r8711_wx_get_range(struct net_device *dev, wrqu->data.length = sizeof(*range); memset(range, 0, sizeof(*range)); - /* Let's try to keep this struct in the same order as in + /* +* Let's try to keep this struct in the same order as in * linux/include/wireless.h */ - /* TODO: See what values we can set, and remove the ones we can't + /* +* TODO: See what values we can set, and remove the ones we can't * set, or fill them with some default data. */ /* ~5 Mb/s real (802.11b) */ @@ -1714,7 +1718,8 @@ static int r871x_wx_set_auth(struct net_device *dev, } break; case IW_AUTH_DROP_UNENCRYPTED: - /* HACK: + /* +* HACK: * * wpa_supplicant calls set_wpa_enabled when the driver * is loaded and unloaded, regardless of if WPA is being @@ -1727,12 +1732,13 @@ static int r871x_wx_set_auth(struct net_device *dev, */ if (padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption1Enabled) { - /* it means init value, or using wep, -* ndisencryptstatus = -* Ndis802_11Encryption1Enabled, -* then it needn't reset it; -*/ - break; + /* +* it means init value, or using wep, +* ndisencryptstatus = +* Ndis802_11Encryption1Enabled, +* then it needn't reset it; +*/ + break; } if (paramval) { @@ -1976,9 +1982,9 @@ static int r871x_get_ap_info(struct net_device *dev, if (pdata->length >= 32) { if (copy_from_user(data, pdata->pointer, 32)) return -EINVAL; -data[32] = 0; + data[32] = 0; } else { -return -EINVAL; + return -EINVAL; } spin_lock_irqsave(&(pmlmepriv->scanned_queue.lock), irqL); phead = &queue->queue; @@ -2107,7 +2113,8 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value) case IEEE_PARAM_TKIP_COUNTERMEASURES: break; case IEEE_PARAM_DROP_UNENCRYPTED: - /* HACK: + /* +