Re: [PATCH] ath9k_htc: check seq number instead of cmd id for timeout

2015-04-05 Thread Fred Chou
Hi all,

May I have an update on the patch status please?

Thanks and regards,
Fred

On 13/3/2015 4:32 PM, Fred Chou wrote:
> From: Fred Chou 
> 
> As the driver may send multiple wmi commands with identical cmd id,
> it is more robust to check seq number for timeout instead.
> 
> Signed-off-by: Fred Chou 
> ---
>  drivers/net/wireless/ath/ath9k/wmi.c | 12 ++--
>  drivers/net/wireless/ath/ath9k/wmi.h |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/wmi.c 
> b/drivers/net/wireless/ath/ath9k/wmi.c
> index 65c8894..aba909f 100644
> --- a/drivers/net/wireless/ath/ath9k/wmi.c
> +++ b/drivers/net/wireless/ath/ath9k/wmi.c
> @@ -224,7 +224,7 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff 
> *skb,
>  
>   /* Check if there has been a timeout. */
>   spin_lock(&wmi->wmi_lock);
> - if (cmd_id != wmi->last_cmd_id) {
> + if (be16_to_cpu(hdr->seq_no) != wmi->last_seq_id) {
>   spin_unlock(&wmi->wmi_lock);
>   goto free_skb;
>   }
> @@ -272,11 +272,16 @@ static int ath9k_wmi_cmd_issue(struct wmi *wmi,
>  enum wmi_cmd_id cmd, u16 len)
>  {
>   struct wmi_cmd_hdr *hdr;
> + unsigned long flags;
>  
>   hdr = (struct wmi_cmd_hdr *) skb_push(skb, sizeof(struct wmi_cmd_hdr));
>   hdr->command_id = cpu_to_be16(cmd);
>   hdr->seq_no = cpu_to_be16(++wmi->tx_seq_id);
>  
> + spin_lock_irqsave(&wmi->wmi_lock, flags);
> + wmi->last_seq_id = wmi->tx_seq_id;
> + spin_unlock_irqrestore(&wmi->wmi_lock, flags);
> +
>   return htc_send_epid(wmi->htc, skb, wmi->ctrl_epid);
>  }
>  
> @@ -292,7 +297,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
>   struct sk_buff *skb;
>   u8 *data;
>   int time_left, ret = 0;
> - unsigned long flags;
>  
>   if (ah->ah_flags & AH_UNPLUGGED)
>   return 0;
> @@ -320,10 +324,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id 
> cmd_id,
>   wmi->cmd_rsp_buf = rsp_buf;
>   wmi->cmd_rsp_len = rsp_len;
>  
> - spin_lock_irqsave(&wmi->wmi_lock, flags);
> - wmi->last_cmd_id = cmd_id;
> - spin_unlock_irqrestore(&wmi->wmi_lock, flags);
> -
>   ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len);
>   if (ret)
>   goto out;
> diff --git a/drivers/net/wireless/ath/ath9k/wmi.h 
> b/drivers/net/wireless/ath/ath9k/wmi.h
> index 0db37f2..2aad6dc 100644
> --- a/drivers/net/wireless/ath/ath9k/wmi.h
> +++ b/drivers/net/wireless/ath/ath9k/wmi.h
> @@ -143,7 +143,7 @@ struct wmi {
>   enum htc_endpoint_id ctrl_epid;
>   struct mutex op_mutex;
>   struct completion cmd_wait;
> - enum wmi_cmd_id last_cmd_id;
> + u16 last_seq_id;
>   struct sk_buff_head wmi_event_queue;
>   struct tasklet_struct wmi_event_tasklet;
>   u16 tx_seq_id;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ath9k_htc: check seq number instead of cmd id for timeout

2015-03-15 Thread Fred Chou

On 15/03/2015 14:48, Oleksij Rempel wrote:
> thank you for your patch. Looks good for me. Did you tested it?

Yes. Working all right for two days.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ath9k_htc: check seq number instead of cmd id for timeout

2015-03-13 Thread Fred Chou
From: Fred Chou 

As the driver may send multiple wmi commands with identical cmd id,
it is more robust to check seq number for timeout instead.

Signed-off-by: Fred Chou 
---
 drivers/net/wireless/ath/ath9k/wmi.c | 12 ++--
 drivers/net/wireless/ath/ath9k/wmi.h |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/wmi.c 
b/drivers/net/wireless/ath/ath9k/wmi.c
index 65c8894..aba909f 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -224,7 +224,7 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff 
*skb,
 
/* Check if there has been a timeout. */
spin_lock(&wmi->wmi_lock);
-   if (cmd_id != wmi->last_cmd_id) {
+   if (be16_to_cpu(hdr->seq_no) != wmi->last_seq_id) {
spin_unlock(&wmi->wmi_lock);
goto free_skb;
}
@@ -272,11 +272,16 @@ static int ath9k_wmi_cmd_issue(struct wmi *wmi,
   enum wmi_cmd_id cmd, u16 len)
 {
struct wmi_cmd_hdr *hdr;
+   unsigned long flags;
 
hdr = (struct wmi_cmd_hdr *) skb_push(skb, sizeof(struct wmi_cmd_hdr));
hdr->command_id = cpu_to_be16(cmd);
hdr->seq_no = cpu_to_be16(++wmi->tx_seq_id);
 
+   spin_lock_irqsave(&wmi->wmi_lock, flags);
+   wmi->last_seq_id = wmi->tx_seq_id;
+   spin_unlock_irqrestore(&wmi->wmi_lock, flags);
+
return htc_send_epid(wmi->htc, skb, wmi->ctrl_epid);
 }
 
@@ -292,7 +297,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
struct sk_buff *skb;
u8 *data;
int time_left, ret = 0;
-   unsigned long flags;
 
if (ah->ah_flags & AH_UNPLUGGED)
return 0;
@@ -320,10 +324,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
wmi->cmd_rsp_buf = rsp_buf;
wmi->cmd_rsp_len = rsp_len;
 
-   spin_lock_irqsave(&wmi->wmi_lock, flags);
-   wmi->last_cmd_id = cmd_id;
-   spin_unlock_irqrestore(&wmi->wmi_lock, flags);
-
ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len);
if (ret)
goto out;
diff --git a/drivers/net/wireless/ath/ath9k/wmi.h 
b/drivers/net/wireless/ath/ath9k/wmi.h
index 0db37f2..2aad6dc 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.h
+++ b/drivers/net/wireless/ath/ath9k/wmi.h
@@ -143,7 +143,7 @@ struct wmi {
enum htc_endpoint_id ctrl_epid;
struct mutex op_mutex;
struct completion cmd_wait;
-   enum wmi_cmd_id last_cmd_id;
+   u16 last_seq_id;
struct sk_buff_head wmi_event_queue;
struct tasklet_struct wmi_event_tasklet;
u16 tx_seq_id;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ath9k_htc: avoid memcpy when downloading firmware

2015-03-03 Thread Fred Chou


On 3/3/2015 2:00 PM, Eric Dumazet wrote:
> On Tue, 2015-03-03 at 12:24 +0800, Fred Chou wrote:
>> From: Fred Chou 
>>
>> The temporary buffer to hold firmware data is not really needed,
>> and memcpy can be avoided by using data pointer instead.
>>
>> Signed-off-by: Fred Chou 
>> ---
>>  drivers/net/wireless/ath/ath9k/hif_usb.c | 12 ++--
>>  1 file changed, 2 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c 
>> b/drivers/net/wireless/ath/ath9k/hif_usb.c
>> index 10c02f5..0bc35a8 100644
>> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
>> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
>> @@ -986,30 +986,22 @@ static int ath9k_hif_usb_download_fw(struct 
>> hif_device_usb *hif_dev)
>>  const void *data = hif_dev->fw_data;
> 
> Here data can be vmalloc() backed.
> 
>>  size_t len = hif_dev->fw_size;
>>  u32 addr = AR9271_FIRMWARE;
>> -u8 *buf = kzalloc(4096, GFP_KERNEL);
> 
> Here buf is kmalloc() backed.
> 
>>  u32 firm_offset;
>>  
>> -if (!buf)
>> -return -ENOMEM;
>> -
>>  while (len) {
>>  transfer = min_t(size_t, len, 4096);
>> -memcpy(buf, data, transfer);
>>  
>>  err = usb_control_msg(hif_dev->udev,
>>usb_sndctrlpipe(hif_dev->udev, 0),
>>FIRMWARE_DOWNLOAD, 0x40 | USB_DIR_OUT,
>> -  addr >> 8, 0, buf, transfer, HZ);
> 
> 
> Are you sure usb_control_msg() accepts vmalloc()ed buffers ?
> 
> My guess is the answer is no.
> 
> 

I agree, and I would like to drop the patch. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ath9k_htc: avoid memcpy when downloading firmware

2015-03-02 Thread Fred Chou
From: Fred Chou 

The temporary buffer to hold firmware data is not really needed,
and memcpy can be avoided by using data pointer instead.

Signed-off-by: Fred Chou 
---
 drivers/net/wireless/ath/ath9k/hif_usb.c | 12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c 
b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 10c02f5..0bc35a8 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -986,30 +986,22 @@ static int ath9k_hif_usb_download_fw(struct 
hif_device_usb *hif_dev)
const void *data = hif_dev->fw_data;
size_t len = hif_dev->fw_size;
u32 addr = AR9271_FIRMWARE;
-   u8 *buf = kzalloc(4096, GFP_KERNEL);
u32 firm_offset;
 
-   if (!buf)
-   return -ENOMEM;
-
while (len) {
transfer = min_t(size_t, len, 4096);
-   memcpy(buf, data, transfer);
 
err = usb_control_msg(hif_dev->udev,
  usb_sndctrlpipe(hif_dev->udev, 0),
  FIRMWARE_DOWNLOAD, 0x40 | USB_DIR_OUT,
- addr >> 8, 0, buf, transfer, HZ);
-   if (err < 0) {
-   kfree(buf);
+ addr >> 8, 0, data, transfer, HZ);
+   if (err < 0)
return err;
-   }
 
len -= transfer;
data += transfer;
addr += transfer;
}
-   kfree(buf);
 
if (IS_AR7010_DEVICE(hif_dev->usb_device_id->driver_info))
firm_offset = AR7010_FIRMWARE_TEXT;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: wireless: rt2x00: use helper to check capability/requirement

2014-12-26 Thread Fred Chou
From: Fred Chou 

Use rt2x00_has_cap_flag macro to check rt2x00dev->cap_flags. 

Signed-off-by: Fred Chou 
---
 drivers/net/wireless/rt2x00/rt2x00config.c   |  4 ++--
 drivers/net/wireless/rt2x00/rt2x00dev.c  | 18 +-
 drivers/net/wireless/rt2x00/rt2x00firmware.c |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c  |  2 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c| 18 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c  |  8 
 6 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c 
b/drivers/net/wireless/rt2x00/rt2x00config.c
index 1122dc4..48a2cad 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -240,7 +240,7 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
rt2x00dev->rf_channel = libconf.rf.channel;
}
 
-   if (test_bit(REQUIRE_PS_AUTOWAKE, &rt2x00dev->cap_flags) &&
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_PS_AUTOWAKE) &&
(ieee80211_flags & IEEE80211_CONF_CHANGE_PS))
cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
 
@@ -257,7 +257,7 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
rt2x00link_reset_tuner(rt2x00dev, false);
 
if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
-   test_bit(REQUIRE_PS_AUTOWAKE, &rt2x00dev->cap_flags) &&
+   rt2x00_has_cap_flag(rt2x00dev, REQUIRE_PS_AUTOWAKE) &&
(ieee80211_flags & IEEE80211_CONF_CHANGE_PS) &&
(conf->flags & IEEE80211_CONF_PS)) {
beacon_diff = (long)jiffies - (long)rt2x00dev->last_beacon;
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c 
b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 9967a1d..5639ed8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -351,7 +351,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
/*
 * Remove L2 padding which was added during
 */
-   if (test_bit(REQUIRE_L2PAD, &rt2x00dev->cap_flags))
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_L2PAD))
rt2x00queue_remove_l2pad(entry->skb, header_length);
 
/*
@@ -460,7 +460,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
 * send the status report back.
 */
if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) {
-   if (test_bit(REQUIRE_TASKLET_CONTEXT, &rt2x00dev->cap_flags))
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_TASKLET_CONTEXT))
ieee80211_tx_status(rt2x00dev->hw, entry->skb);
else
ieee80211_tx_status_ni(rt2x00dev->hw, entry->skb);
@@ -1056,9 +1056,9 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev 
*rt2x00dev)
/*
 * Take TX headroom required for alignment into account.
 */
-   if (test_bit(REQUIRE_L2PAD, &rt2x00dev->cap_flags))
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_L2PAD))
rt2x00dev->hw->extra_tx_headroom += RT2X00_L2PAD_SIZE;
-   else if (test_bit(REQUIRE_DMA, &rt2x00dev->cap_flags))
+   else if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_DMA))
rt2x00dev->hw->extra_tx_headroom += RT2X00_ALIGN_SIZE;
 
/*
@@ -1069,7 +1069,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev 
*rt2x00dev)
/*
 * Allocate tx status FIFO for driver use.
 */
-   if (test_bit(REQUIRE_TXSTATUS_FIFO, &rt2x00dev->cap_flags)) {
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_TXSTATUS_FIFO)) {
/*
 * Allocate the txstatus fifo. In the worst case the tx
 * status fifo has to hold the tx status of all entries
@@ -1131,7 +1131,7 @@ static void rt2x00lib_uninitialize(struct rt2x00_dev 
*rt2x00dev)
/*
 * Stop rfkill polling.
 */
-   if (test_bit(REQUIRE_DELAYED_RFKILL, &rt2x00dev->cap_flags))
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_DELAYED_RFKILL))
rt2x00rfkill_unregister(rt2x00dev);
 
/*
@@ -1173,7 +1173,7 @@ static int rt2x00lib_initialize(struct rt2x00_dev 
*rt2x00dev)
/*
 * Start rfkill polling.
 */
-   if (test_bit(REQUIRE_DELAYED_RFKILL, &rt2x00dev->cap_flags))
+   if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_DELAYED_RFKILL))
rt2x00rfkill_register(rt2x00dev);
 
return 0;
@@ -1389,7 +1389,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
/*
 * Start rfkill polling.
 */
-   if (!test_bit(REQUIRE_DELAYED_RFKILL, &rt2x00dev->cap_flags))
+   if (!rt2x00_has_cap_flag(rt2x00dev, REQUIRE_DELAYED_RFKILL))
rt2x00rfkill_register(rt2x00dev);
 

[PATCH] fs: fat: use MSDOS_SB macro to get msdos_sb_info

2014-12-25 Thread Fred Chou
From: Fred Chou 

Use the MSDOS_SB macro to get msdos_sb_info, instead of coding it
directly.

Signed-off-by: Fred Chou 
---
 fs/fat/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 1956dae..0f52d5f 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -640,7 +640,7 @@ static void fat_set_state(struct super_block *sb,
 {
struct buffer_head *bh;
struct fat_boot_sector *b;
-   struct msdos_sb_info *sbi = sb->s_fs_info;
+   struct msdos_sb_info *sbi = MSDOS_SB(sb);
 
/* do not change any thing if mounted read only */
if ((sb->s_flags & MS_RDONLY) && !force)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: vt6655: remove unused function in mac.c

2014-12-09 Thread Fred Chou
From: Fred Chou 

Removed the unused function MACvGetShortRetryLimit, which also
fixed the following sparse warning:
drivers/staging/vt6655/mac.c:162:6: warning: 
symbol 'MACvGetShortRetryLimit' was not declared. Should it be static?

Signed-off-by: Fred Chou 
---
 drivers/staging/vt6655/mac.c | 19 ---
 1 file changed, 19 deletions(-)

diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 8f0d652..09a91d1 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -30,7 +30,6 @@
  *  MACbIsRegBitsOff - Test if All test Bits Off
  *  MACbIsIntDisable - Test if MAC interrupt disable
  *  MACvSetShortRetryLimit - Set 802.11 Short Retry limit
- *  MACvGetShortRetryLimit - Get 802.11 Short Retry limit
  *  MACvSetLongRetryLimit - Set 802.11 Long Retry limit
  *  MACvSetLoopbackMode - Set MAC Loopback Mode
  *  MACvSaveContext - Save Context of MAC Registers
@@ -146,24 +145,6 @@ void MACvSetShortRetryLimit(void __iomem *dwIoBase, 
unsigned char byRetryLimit)
VNSvOutPortB(dwIoBase + MAC_REG_SRT, byRetryLimit);
 }
 
-/*
- * Description:
- *  Get 802.11 Short Retry Limit
- *
- * Parameters:
- *  In:
- *  dwIoBase- Base Address for MAC
- *  Out:
- *  pbyRetryLimit   - Retry Limit Get
- *
- * Return Value: none
- *
- */
-void MACvGetShortRetryLimit(void __iomem *dwIoBase, unsigned char 
*pbyRetryLimit)
-{
-   // get SRT
-   VNSvInPortB(dwIoBase + MAC_REG_SRT, pbyRetryLimit);
-}
 
 /*
  * Description:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging:lustre:lustre:ptlrpc: fix sparse warnings in lproc_ptlrpc.c

2014-12-08 Thread Fred Chou
From: Fred Chou 

Fixed the below warning in sparse:

drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:184:6: 
warning: symbol 'ptlrpc_lprocfs_register' was not declared. 
Should it be static?

Signed-off-by: Fred Chou 
---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c 
b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index 4011e00..4c0d48e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
@@ -181,9 +181,10 @@ const char *ll_eopcode2str(__u32 opcode)
return ll_eopcode_table[opcode].opname;
 }
 #if defined (CONFIG_PROC_FS)
-void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir,
-char *name, struct proc_dir_entry **procroot_ret,
-struct lprocfs_stats **stats_ret)
+static void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir,
+   char *name,
+   struct proc_dir_entry **procroot_ret,
+   struct lprocfs_stats **stats_ret)
 {
struct proc_dir_entry *svc_procroot;
struct lprocfs_stats *svc_stats;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3] staging: rtl8192u: fix sparse warnings

2014-12-04 Thread Fred Chou


On 4/12/2014 4:30 PM, Sudip Mukherjee wrote:
> On Thu, Dec 04, 2014 at 04:12:47PM +0800, Fred Chou wrote:
>>
>>
>> On 4/12/2014 3:34 PM, Sudip Mukherjee wrote:
>>> On Thu, Dec 04, 2014 at 10:50:43AM +0800, Fred Chou wrote:
>>>> From: Fred Chou 
>>>>
>>>> Fixed the following warnings in sparse:
>>>>
>>>> drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
>>>>symbol 'dump_eprom' was not declared.
>>>>Should it be static?
>>>> drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
>>>>symbol 'ComputeTxTime' was not declared.
>>>>Should it be static?
>>>> drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
>>>>symbol 'txqueue2outpipe' was not declared.
>>>>Should it be static?
>>>> drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
>>>>symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
>>>>Should it be static?
>>>>
>>>> Signed-off-by: Fred Chou 
>>>>
>>>> ---
>>>> change in v3: fixed alignment to match open parenthesis 
>>> have u fixed?
>>> your v2 was having one problem of alignment, but v3 is again having 3 
>>> problems.
>>> and your patch doesnot apply to next-20141203
>>>
>>
>> The alignment issue is fixed when I apply the patch against my local
>> kernel source tree. Wondering why there are still alignment problems.
>> Let me test with next-20141203 and send v4 again. My apologies...
> 
> i think you have created your v3 on top of your v2.
> reset the source before doing this one. and check the patch with checkpatch 
> before sending.
> 
> thanks
> sudip

v3 is created from scratch. I removed the v2 patch when formatting the
patch. checkpatch.pl does not report any zeros or warnings for both v2
and v3, and the alignment looks all right to me. That makes me very
confused.


>>
>> Fred
>>
>>> sudip
>>>
>>>>
>>>>  drivers/staging/rtl8192u/r8192U_core.c | 12 +++-
>>>>  1 file changed, 7 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
>>>> b/drivers/staging/rtl8192u/r8192U_core.c
>>>> index 7640386..2c61801 100644
>>>> --- a/drivers/staging/rtl8192u/r8192U_core.c
>>>> +++ b/drivers/staging/rtl8192u/r8192U_core.c
>>>> @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
>>>>  
>>>>  
>>>>  /* this is only for debug */
>>>> -void dump_eprom(struct net_device *dev)
>>>> +static void dump_eprom(struct net_device *dev)
>>>>  {
>>>>int i;
>>>>for (i = 0; i < 63; i++)
>>>> @@ -1486,8 +1486,8 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
>>>>  
>>>>  u16 N_DBPSOfRate(u16 DataRate);
>>>>  
>>>> -u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
>>>> -u8 bShortPreamble)
>>>> +static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 
>>>> bManagementFrame,
>>>> +u8 bShortPreamble)
>>>>  {
>>>>u16 FrameTime;
>>>>u16 N_DBPS;
>>>> @@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
>>>>return N_DBPS;
>>>>  }
>>>>  
>>>> -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int 
>>>> tx_queue)
>>>> +static unsigned int txqueue2outpipe(struct r8192_priv *priv,
>>>> +   unsigned int tx_queue)
>>>>  {
>>>>if (tx_queue >= 9) {
>>>>RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
>>>> @@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
>>>>  
>>>>  }
>>>>  
>>>> -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
>>>> bIsRxAggrSubframe)
>>>> +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  
>>>> *Status,
>>>> +   bool bIsRxAggrSubframe)
>>>>  {
>>>>  #ifdef USB_RX_AGGREGATION_SUPPORT
>>>>if (bIsRxAggrSubframe)
>>>> -- 
>>>> 1.9.1
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>>> the body of a message to majord...@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3] staging: rtl8192u: fix sparse warnings

2014-12-04 Thread Fred Chou


On 4/12/2014 3:34 PM, Sudip Mukherjee wrote:
> On Thu, Dec 04, 2014 at 10:50:43AM +0800, Fred Chou wrote:
>> From: Fred Chou 
>>
>> Fixed the following warnings in sparse:
>>
>> drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
>>  symbol 'dump_eprom' was not declared.
>>  Should it be static?
>> drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
>>  symbol 'ComputeTxTime' was not declared.
>>  Should it be static?
>> drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
>>  symbol 'txqueue2outpipe' was not declared.
>>  Should it be static?
>> drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
>>  symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
>>  Should it be static?
>>
>> Signed-off-by: Fred Chou 
>>
>> ---
>> change in v3: fixed alignment to match open parenthesis 
> have u fixed?
> your v2 was having one problem of alignment, but v3 is again having 3 
> problems.
> and your patch doesnot apply to next-20141203
> 

The alignment issue is fixed when I apply the patch against my local
kernel source tree. Wondering why there are still alignment problems.
Let me test with next-20141203 and send v4 again. My apologies...

Fred

> sudip
> 
>>
>>  drivers/staging/rtl8192u/r8192U_core.c | 12 +++-
>>  1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
>> b/drivers/staging/rtl8192u/r8192U_core.c
>> index 7640386..2c61801 100644
>> --- a/drivers/staging/rtl8192u/r8192U_core.c
>> +++ b/drivers/staging/rtl8192u/r8192U_core.c
>> @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
>>  
>>  
>>  /* this is only for debug */
>> -void dump_eprom(struct net_device *dev)
>> +static void dump_eprom(struct net_device *dev)
>>  {
>>  int i;
>>  for (i = 0; i < 63; i++)
>> @@ -1486,8 +1486,8 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
>>  
>>  u16 N_DBPSOfRate(u16 DataRate);
>>  
>> -u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
>> -  u8 bShortPreamble)
>> +static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
>> +  u8 bShortPreamble)
>>  {
>>  u16 FrameTime;
>>  u16 N_DBPS;
>> @@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
>>  return N_DBPS;
>>  }
>>  
>> -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
>> +static unsigned int txqueue2outpipe(struct r8192_priv *priv,
>> + unsigned int tx_queue)
>>  {
>>  if (tx_queue >= 9) {
>>  RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
>> @@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
>>  
>>  }
>>  
>> -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
>> bIsRxAggrSubframe)
>> +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
>> + bool bIsRxAggrSubframe)
>>  {
>>  #ifdef USB_RX_AGGREGATION_SUPPORT
>>  if (bIsRxAggrSubframe)
>> -- 
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3] staging: rtl8192u: fix sparse warnings

2014-12-03 Thread Fred Chou
From: Fred Chou 

Fixed the following warnings in sparse:

drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
symbol 'dump_eprom' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
symbol 'ComputeTxTime' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
symbol 'txqueue2outpipe' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
    Should it be static?

Signed-off-by: Fred Chou 

---
change in v3: fixed alignment to match open parenthesis 

 drivers/staging/rtl8192u/r8192U_core.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..2c61801 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+static void dump_eprom(struct net_device *dev)
 {
int i;
for (i = 0; i < 63; i++)
@@ -1486,8 +1486,8 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 
 u16 N_DBPSOfRate(u16 DataRate);
 
-u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
- u8 bShortPreamble)
+static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
+ u8 bShortPreamble)
 {
u16 FrameTime;
u16 N_DBPS;
@@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+unsigned int tx_queue)
 {
if (tx_queue >= 9) {
RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
bIsRxAggrSubframe)
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
if (bIsRxAggrSubframe)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] staging: rt8192u: fix sparse warnings in r8192U_core.c

2014-12-02 Thread Fred Chou
From: Fred Chou 

v2: alignment to match open parenthesis

Fixed the following warnings in sparse:
drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
symbol 'dump_eprom' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
symbol 'ComputeTxTime' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
symbol 'txqueue2outpipe' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
    Should it be static?

Signed-off-by: Fred Chou 
---
 drivers/staging/rtl8192u/r8192U_core.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..6b647ad 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+static void dump_eprom(struct net_device *dev)
 {
int i;
for (i = 0; i < 63; i++)
@@ -1486,7 +1486,7 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 
 u16 N_DBPSOfRate(u16 DataRate);
 
-u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
+static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
  u8 bShortPreamble)
 {
u16 FrameTime;
@@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+unsigned int tx_queue)
 {
if (tx_queue >= 9) {
RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
bIsRxAggrSubframe)
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
if (bIsRxAggrSubframe)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: rt8192u: fix sparse warnings in r8192U_core.c

2014-12-02 Thread Fred Chou
From: Fred Chou 

Fixed the following warnings in sparse:
drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
symbol 'dump_eprom' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
symbol 'ComputeTxTime' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
symbol 'txqueue2outpipe' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
    Should it be static?

Signed-off-by: Fred Chou 
---
 drivers/staging/rtl8192u/r8192U_core.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..6b647ad 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+static void dump_eprom(struct net_device *dev)
 {
int i;
for (i = 0; i < 63; i++)
@@ -1486,7 +1486,7 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 
 u16 N_DBPSOfRate(u16 DataRate);
 
-u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
+static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
  u8 bShortPreamble)
 {
u16 FrameTime;
@@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+   unsigned int tx_queue)
 {
if (tx_queue >= 9) {
RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
bIsRxAggrSubframe)
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+   bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
if (bIsRxAggrSubframe)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: rt8192u: fix sparse warnings in r8192U_core.c

2014-12-02 Thread Fred Chou
From: Fred 

Fixed the following warnings in sparse:
drivers/staging/rtl8192u/r8192U_core.c:670:6: warning:
symbol 'dump_eprom' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1489:5: warning:
symbol 'ComputeTxTime' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:1556:14: warning:
symbol 'txqueue2outpipe' was not declared.
Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4876:5: warning:
symbol 'GetRxPacketShiftBytes819xUsb' was not declared.
    Should it be static?

Signed-off-by: Fred Chou 
---
 drivers/staging/rtl8192u/r8192U_core.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
b/drivers/staging/rtl8192u/r8192U_core.c
index 7640386..6b647ad 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev)
 
 
 /* this is only for debug */
-void dump_eprom(struct net_device *dev)
+static void dump_eprom(struct net_device *dev)
 {
int i;
for (i = 0; i < 63; i++)
@@ -1486,7 +1486,7 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 
 u16 N_DBPSOfRate(u16 DataRate);
 
-u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
+static u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
  u8 bShortPreamble)
 {
u16 FrameTime;
@@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
 }
 
-unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue)
+static unsigned int txqueue2outpipe(struct r8192_priv *priv,
+   unsigned int tx_queue)
 {
if (tx_queue >= 9) {
RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__);
@@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool 
bIsRxAggrSubframe)
+static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+   bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
if (bIsRxAggrSubframe)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] vme: remove redundant else condition

2014-08-27 Thread Fred Chou
The else condition is redundant after a return. Remove these redundant else 
conditions.

Signed-off-by: Fred Chou 
---
 drivers/staging/vme/devices/vme_pio2_gpio.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vme/devices/vme_pio2_gpio.c 
b/drivers/staging/vme/devices/vme_pio2_gpio.c
index f00af07..d8a118d 100644
--- a/drivers/staging/vme/devices/vme_pio2_gpio.c
+++ b/drivers/staging/vme/devices/vme_pio2_gpio.c
@@ -58,14 +58,14 @@ static int pio2_gpio_get(struct gpio_chip *chip, unsigned 
int offset)
if (reg & PIO2_CHANNEL_BIT[offset]) {
if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
return 0;
-   else
-   return 1;
-   } else {
-   if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
-   return 1;
-   else
-   return 0;
+
+   return 1;
}
+
+   if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
+   return 1;
+
+   return 0;
 }
 
 static void pio2_gpio_set(struct gpio_chip *chip, unsigned int offset,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/