Re: [ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-11-08 Thread Arend van Spriel
On 11/07/14 20:05, Greg Kroah-Hartman wrote:
 On Tue, Oct 28, 2014 at 01:19:11PM +0100, Arend van Spriel wrote:
 The debugfs files that are defined in debug.c which are read-only
 and using a simple_open as .open file operation have been modified
 to use the single_open seq_file API. This simplifies the read
 functions defining the file contents.

 Signed-off-by: Arend van Sprielar...@broadcom.com
 Acked-by: John W. Linvillelinvi...@tuxdriver.com
 ---
   drivers/net/wireless/ath/ath9k/debug.c | 425 
 +
   drivers/net/wireless/ath/ath9k/debug.h |   3 +-
   2 files changed, 173 insertions(+), 255 deletions(-)

 I can't take patch 1/3 right now, but even if I could, this one doesn't
 apply to 3.18-rc3 :(

Yep, I noticed some patches going in hitting the same area. As patch 1 
needs rework I will rebase all.

Thanks,
Arend
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-11-08 Thread Arend van Spriel
On 11/08/14 14:44, Arend van Spriel wrote:
 On 11/07/14 20:05, Greg Kroah-Hartman wrote:
 On Tue, Oct 28, 2014 at 01:19:11PM +0100, Arend van Spriel wrote:
 The debugfs files that are defined in debug.c which are read-only
 and using a simple_open as .open file operation have been modified
 to use the single_open seq_file API. This simplifies the read
 functions defining the file contents.

 Signed-off-by: Arend van Sprielar...@broadcom.com
 Acked-by: John W. Linvillelinvi...@tuxdriver.com
 ---
 drivers/net/wireless/ath/ath9k/debug.c | 425
 +
 drivers/net/wireless/ath/ath9k/debug.h | 3 +-
 2 files changed, 173 insertions(+), 255 deletions(-)

 I can't take patch 1/3 right now, but even if I could, this one doesn't
 apply to 3.18-rc3 :(

driver-core/driver-core-next branch is not on 3.18-rc3. Should I rebase 
the series on driver-core/master? As this is for 3.19 I figured it 
needed to go on some -next branch.

Regards,
Arend

 Yep, I noticed some patches going in hitting the same area. As patch 1
 needs rework I will rebase all.

 Thanks,
 Arend
 --
 To unsubscribe from this list: send the line unsubscribe
 linux-wireless in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at http://vger.kernel.org/majordomo-info.html

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-11-08 Thread Greg Kroah-Hartman
On Sat, Nov 08, 2014 at 03:07:50PM +0100, Arend van Spriel wrote:
 On 11/08/14 14:44, Arend van Spriel wrote:
 On 11/07/14 20:05, Greg Kroah-Hartman wrote:
 On Tue, Oct 28, 2014 at 01:19:11PM +0100, Arend van Spriel wrote:
 The debugfs files that are defined in debug.c which are read-only
 and using a simple_open as .open file operation have been modified
 to use the single_open seq_file API. This simplifies the read
 functions defining the file contents.
 
 Signed-off-by: Arend van Sprielar...@broadcom.com
 Acked-by: John W. Linvillelinvi...@tuxdriver.com
 ---
 drivers/net/wireless/ath/ath9k/debug.c | 425
 +
 drivers/net/wireless/ath/ath9k/debug.h | 3 +-
 2 files changed, 173 insertions(+), 255 deletions(-)
 
 I can't take patch 1/3 right now, but even if I could, this one doesn't
 apply to 3.18-rc3 :(
 
 driver-core/driver-core-next branch is not on 3.18-rc3.

Yes it is based on that branch.  Why do you think it isn't?

 Should I rebase the series on driver-core/master?

No, that's a clean 3.18-rc3, which doesn't include any patches that
I've accepted so far for 3.19.

 As this is for 3.19 I figured it needed to go on some -next branch.

Yes, if you make it against driver-core-next that is fine, please do so.

thanks,

greg k-h
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-11-07 Thread Greg Kroah-Hartman
On Tue, Oct 28, 2014 at 01:19:11PM +0100, Arend van Spriel wrote:
 The debugfs files that are defined in debug.c which are read-only
 and using a simple_open as .open file operation have been modified
 to use the single_open seq_file API. This simplifies the read
 functions defining the file contents.
 
 Signed-off-by: Arend van Spriel ar...@broadcom.com
 Acked-by: John W. Linville linvi...@tuxdriver.com
 ---
  drivers/net/wireless/ath/ath9k/debug.c | 425 
 +
  drivers/net/wireless/ath/ath9k/debug.h |   3 +-
  2 files changed, 173 insertions(+), 255 deletions(-)

I can't take patch 1/3 right now, but even if I could, this one doesn't
apply to 3.18-rc3 :(
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-10-31 Thread John W. Linville
On Tue, Oct 28, 2014 at 01:19:11PM +0100, Arend van Spriel wrote:
 The debugfs files that are defined in debug.c which are read-only
 and using a simple_open as .open file operation have been modified
 to use the single_open seq_file API. This simplifies the read
 functions defining the file contents.
 
 Signed-off-by: Arend van Spriel ar...@broadcom.com

Acked-by: John W. Linville linvi...@tuxdriver.com

-- 
John W. LinvilleSomeday the world will need a hero, and you
linvi...@tuxdriver.com  might be all we have.  Be ready.
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


[ath9k-devel] [PATCH 2/3] ath: use seq_file api for ath9k debugfs files

2014-10-28 Thread Arend van Spriel
The debugfs files that are defined in debug.c which are read-only
and using a simple_open as .open file operation have been modified
to use the single_open seq_file API. This simplifies the read
functions defining the file contents.

Signed-off-by: Arend van Spriel ar...@broadcom.com
---
 drivers/net/wireless/ath/ath9k/debug.c | 425 +
 drivers/net/wireless/ath/ath9k/debug.h |   3 +-
 2 files changed, 173 insertions(+), 255 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/debug.c 
b/drivers/net/wireless/ath/ath9k/debug.c
index 46f20a3..1d6bfda 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -401,22 +401,14 @@ static const struct file_operations 
fops_antenna_diversity = {
.llseek = default_llseek,
 };
 
-static ssize_t read_file_dma(struct file *file, char __user *user_buf,
-size_t count, loff_t *ppos)
+static int read_file_dma(struct seq_file *file, void *data)
 {
-   struct ath_softc *sc = file-private_data;
+   struct ath_softc *sc = file-private;
struct ath_hw *ah = sc-sc_ah;
-   char *buf;
-   int retval;
-   unsigned int len = 0;
u32 val[ATH9K_NUM_DMA_DEBUG_REGS];
int i, qcuOffset = 0, dcuOffset = 0;
u32 *qcuBase = val[0], *dcuBase = val[4];
 
-   buf = kmalloc(DMA_BUF_LEN, GFP_KERNEL);
-   if (!buf)
-   return -ENOMEM;
-
ath9k_ps_wakeup(sc);
 
REG_WRITE_D(ah, AR_MACMISC,
@@ -424,21 +416,18 @@ static ssize_t read_file_dma(struct file *file, char 
__user *user_buf,
   (AR_MACMISC_MISC_OBS_BUS_1 
AR_MACMISC_MISC_OBS_BUS_MSB_S)));
 
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-Raw DMA Debug values:\n);
+   seq_printf(file, Raw DMA Debug values:\n);
 
for (i = 0; i  ATH9K_NUM_DMA_DEBUG_REGS; i++) {
if (i % 4 == 0)
-   len += scnprintf(buf + len, DMA_BUF_LEN - len, \n);
+   seq_printf(file, \n);
 
val[i] = REG_READ_D(ah, AR_DMADBG_0 + (i * sizeof(u32)));
-   len += scnprintf(buf + len, DMA_BUF_LEN - len, %d: %08x ,
-i, val[i]);
+   seq_printf(file, %d: %08x , i, val[i]);
}
 
-   len += scnprintf(buf + len, DMA_BUF_LEN - len, \n\n);
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-Num QCU: chain_st fsp_ok fsp_st DCU: chain_st\n);
+   seq_printf(file, \n\n);
+   seq_printf(file, Num QCU: chain_st fsp_ok fsp_st DCU: chain_st\n);
 
for (i = 0; i  ATH9K_NUM_QUEUES; i++, qcuOffset += 4, dcuOffset += 5) {
if (i == 8) {
@@ -451,55 +440,47 @@ static ssize_t read_file_dma(struct file *file, char 
__user *user_buf,
dcuBase++;
}
 
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-%2d  %2x  %1x %2x   %2x\n,
+   seq_printf(file, %2d  %2x  %1x %2x   
%2x\n,
 i, (*qcuBase  (0x7  qcuOffset))  qcuOffset,
 (*qcuBase  (0x8  qcuOffset))  (qcuOffset + 3),
 val[2]  (0x7  (i * 3))  (i * 3),
 (*dcuBase  (0x1f  dcuOffset))  dcuOffset);
}
 
-   len += scnprintf(buf + len, DMA_BUF_LEN - len, \n);
+   seq_printf(file, \n);
 
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   qcu_stitch state:   %2xqcu_fetch state:%2x\n,
+   seq_printf(file, qcu_stitch state:   %2xqcu_fetch state:
%2x\n,
(val[3]  0x003c)  18, (val[3]  0x03c0)  22);
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   qcu_complete state: %2xdcu_complete state: %2x\n,
+   seq_printf(file, qcu_complete state: %2xdcu_complete state: 
%2x\n,
(val[3]  0x1c00)  26, (val[6]  0x3));
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   dcu_arb state:  %2xdcu_fp state:   %2x\n,
+   seq_printf(file, dcu_arb state:  %2xdcu_fp state:   
%2x\n,
(val[5]  0x0600)  25, (val[5]  0x3800)  27);
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   chan_idle_dur: %3dchan_idle_dur_valid: %1d\n,
+   seq_printf(file, chan_idle_dur: %3dchan_idle_dur_valid: 
%1d\n,
(val[6]  0x03fc)  2, (val[6]  0x0400)  10);
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   txfifo_valid_0:  %1dtxfifo_valid_1:  %1d\n,
+   seq_printf(file, txfifo_valid_0:  %1dtxfifo_valid_1:  
%1d\n,
(val[6]  0x0800)  11, (val[6]  0x1000)  12);
-   len += scnprintf(buf + len, DMA_BUF_LEN - len,
-   txfifo_dcu_num_0:   %2d