[patch] staging: rtl8192u: fix a macro expansion bug

2012-10-02 Thread Dan Carpenter
Clang detected this macro expansion bug:
drivers/staging/rtl8192u/r8192U_core.c:2384:76: warning: operator '?:'
has lower precedence than '+'; '+' will be evaluated first
[-Wparentheses]

The line from the .c file looks like this:
u1bAIFS = qos_parameters-aifs[i] * ((mode(IEEE_G|IEEE_N_24G)) ?9:20) 
+ aSifsTime;

We need to put parenthesis around the entire macro to fix the bug.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h 
b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 13f45c3..502bfdb 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -235,7 +235,10 @@ enum   _ReasonCode{
 
 
 
-#define aSifsTime   ((priv-ieee80211-current_network.mode == 
IEEE_A)||(priv-ieee80211-current_network.mode == 
IEEE_N_24G)||(priv-ieee80211-current_network.mode == IEEE_N_5G))? 16 : 10
+#define aSifsTime ((priv-ieee80211-current_network.mode == IEEE_A || \
+   priv-ieee80211-current_network.mode == IEEE_N_24G || \
+   priv-ieee80211-current_network.mode == IEEE_N_5G) ? \
+  16 : 10)
 
 #define MGMT_QUEUE_NUM 5
 
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net, 3/3] hyperv: Fix page buffer handling in rndis_filter_send_request()

2012-10-02 Thread Dan Carpenter
On Mon, Oct 01, 2012 at 03:30:57PM -0700, Haiyang Zhang wrote:
 Add another page buffer if the request message crossed page boundary.
 

What are the user visible effects of this bug fix?  Please put that
in the commit message.

regards,
dan carpenter

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH] staging: comedi: ni_daq_700: fix dio subdevice regression

2012-10-02 Thread Ian Abbott
From: Fred Brooks nsasp...@nsaspook.com

Here is a small patch to fix a problem caused by a previous patch that
removed the  callback function.  The callback remove patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a

I finally booted my dev machine on the latest kernel (running Debian
here so it's still on 3.2 normally) to test the ni_daq_700 driver with
my test program and noticed this bug.

Shift the DIO_R read result to bits 8..15 Digital direction
configuration: channels 0-7 output, 8-15 input (8225 device emu as port
A output, port B input, port C N/A).

Cc: sta...@vger.kernel.org # 3.6.x
Signed-off-by: Fred Brooks nsasp...@nsaspook.com
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c 
b/drivers/staging/comedi/drivers/ni_daq_700.c
index 2ba0ade..68d7c6a 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -95,7 +95,7 @@ static int daq700_dio_insn_bits(struct comedi_device *dev,
}
 
data[1] = s-state  0xff;
-   data[1] |= inb(dev-iobase + DIO_R);
+   data[1] |= inb(dev-iobase + DIO_R)  8;
 
return insn-n;
 }
-- 
1.7.12

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH RESEND] staging: comedi: ni_daq_700: fix dio subdevice regression

2012-10-02 Thread Ian Abbott
From: Fred Brooks nsasp...@nsaspook.com

Here is a small patch to fix a problem caused by a previous patch that
removed the  callback function.  The callback remove patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a

I finally booted my dev machine on the latest kernel (running Debian
here so it's still on 3.2 normally) to test the ni_daq_700 driver with
my test program and noticed this bug.

Shift the DIO_R read result to bits 8..15 Digital direction
configuration: channels 0-7 output, 8-15 input (8225 device emu as port
A output, port B input, port C N/A).

Cc: sta...@vger.kernel.org # 3.6.x
Signed-off-by: Fred Brooks nsasp...@nsaspook.com
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
I messed up the Cc: sta...@vger.kernel.org line so I'm resending.  Sorry.
---
 drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c 
b/drivers/staging/comedi/drivers/ni_daq_700.c
index 2ba0ade..68d7c6a 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -95,7 +95,7 @@ static int daq700_dio_insn_bits(struct comedi_device *dev,
}
 
data[1] = s-state  0xff;
-   data[1] |= inb(dev-iobase + DIO_R);
+   data[1] |= inb(dev-iobase + DIO_R)  8;
 
return insn-n;
 }
-- 
1.7.12

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[driver-core:driver-core-next 4/11] include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used

2012-10-02 Thread Fengguang Wu
Hi Joe,

FYI, kernel build failed on

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
driver-core-next
head:   e0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2
commit: 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 [4/11] dev: Add 
dev_vprintk_emit and dev_printk_emit
config: sh-allnoconfig

All error/warnings:

include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used 
[-Werror=unused-function]
cc1: all warnings being treated as errors

vim +925 include/linux/device.h

b9075fa9 (Joe Perches 2011-10-31  919) int dev_notice(const struct device *dev, 
const char *fmt, ...);
b9075fa9 (Joe Perches 2011-10-31  920) extern __printf(2, 3)
b9075fa9 (Joe Perches 2011-10-31  921) int _dev_info(const struct device *dev, 
const char *fmt, ...);
99bcf217 (Joe Perches 2010-06-27  922) 
99bcf217 (Joe Perches 2010-06-27  923) #else
99bcf217 (Joe Perches 2010-06-27  924) 
05e4e5b8 (Joe Perches 2012-09-12 @925) static int dev_vprintk_emit(int level, 
const struct device *dev,
05e4e5b8 (Joe Perches 2012-09-12  926)  const char *fmt, 
va_list args)
05e4e5b8 (Joe Perches 2012-09-12  927) { return 0; }
05e4e5b8 (Joe Perches 2012-09-12  928) static inline __printf(3, 4)

---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu, Yuanhan Liu  Intel Corporation
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH 1/3] Fix trailing whitespace in trace.h

2012-10-02 Thread YAMANE Toshiaki
fixed below checkpatch error.

-ERROR: trailing whitespace

Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
---
 drivers/staging/rts_pstor/trace.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts_pstor/trace.h 
b/drivers/staging/rts_pstor/trace.h
index cf60a1b..740999c 100644
--- a/drivers/staging/rts_pstor/trace.h
+++ b/drivers/staging/rts_pstor/trace.h
@@ -39,7 +39,7 @@ static inline char *filename(char *path)
while (*ptr != '\0') {
if ((*ptr == '\\') || (*ptr == '/'))
path = ptr + 1;
-   
+
ptr++;
}
 
-- 
1.7.9.5

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH 2/3] Add parenthesis to macros with complex values in trace.h

2012-10-02 Thread YAMANE Toshiaki
fixed some checkpatch below error.
-ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
---
 drivers/staging/rts_pstor/trace.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts_pstor/trace.h 
b/drivers/staging/rts_pstor/trace.h
index 740999c..a34493c 100644
--- a/drivers/staging/rts_pstor/trace.h
+++ b/drivers/staging/rts_pstor/trace.h
@@ -78,8 +78,8 @@ do {  
\
goto label; 
\
 } while (0)
 #else
-#define TRACE_RET(chip, ret)   return ret
-#define TRACE_GOTO(chip, label)goto label
+#define TRACE_RET(chip, ret)   return(ret)
+#define TRACE_GOTO(chip, label)goto(label)
 #endif
 
 #ifdef CONFIG_RTS_PSTOR_DEBUG
-- 
1.7.9.5

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH 3/3] Fix line over 80 character issue and space before tabs issue in trace.h

2012-10-02 Thread YAMANE Toshiaki
fixed some checkpatch warnings.

-WARNING: line over 80 characters
-WARNING: please, no space before tabs

Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
---
 drivers/staging/rts_pstor/trace.h |   62 -
 1 file changed, 34 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/rts_pstor/trace.h 
b/drivers/staging/rts_pstor/trace.h
index a34493c..fdc48cc 100644
--- a/drivers/staging/rts_pstor/trace.h
+++ b/drivers/staging/rts_pstor/trace.h
@@ -46,36 +46,42 @@ static inline char *filename(char *path)
return path;
 }
 
-#define TRACE_RET(chip, ret)   
\
-do {   
\
-   char *_file = filename(__FILE__);   
\
-   RTSX_DEBUGP([%s][%s]:[%d]\n, _file, __func__, __LINE__);  
\
-   (chip)-trace_msg[(chip)-msg_idx].line = (u16)(__LINE__);  
\
-   strncpy((chip)-trace_msg[(chip)-msg_idx].func, __func__, 
MSG_FUNC_LEN-1); \
-   strncpy((chip)-trace_msg[(chip)-msg_idx].file, _file, 
MSG_FILE_LEN-1);\
-   get_current_time((chip)-trace_msg[(chip)-msg_idx].timeval_buf, 
TIME_VAL_LEN); \
-   (chip)-trace_msg[(chip)-msg_idx].valid = 1;   
\
-   (chip)-msg_idx++;  
\
-   if ((chip)-msg_idx = TRACE_ITEM_CNT) {
\
-   (chip)-msg_idx = 0;
\
-   }   
\
-   return ret; 
\
+#define TRACE_RET(chip, ret) \
+do { \
+   char *_file = filename(__FILE__); \
+   RTSX_DEBUGP([%s][%s]:[%d]\n, _file, __func__, __LINE__); \
+   (chip)-trace_msg[(chip)-msg_idx].line = (u16)(__LINE__); \
+   strncpy((chip)-trace_msg[(chip)-msg_idx].func, \
+   __func__, MSG_FUNC_LEN-1); \
+   strncpy((chip)-trace_msg[(chip)-msg_idx].file, \
+   _file, MSG_FILE_LEN-1); \
+   get_current_time((chip)-trace_msg[(chip)-msg_idx].timeval_buf, \
+TIME_VAL_LEN); \
+   (chip)-trace_msg[(chip)-msg_idx].valid = 1; \
+   (chip)-msg_idx++; \
+   if ((chip)-msg_idx = TRACE_ITEM_CNT) { \
+   (chip)-msg_idx = 0; \
+   } \
+   return ret; \
 } while (0)
 
-#define TRACE_GOTO(chip, label)
\
-do {   
\
-   char *_file = filename(__FILE__);   
\
-   RTSX_DEBUGP([%s][%s]:[%d]\n, _file, __func__, __LINE__);  
\
-   (chip)-trace_msg[(chip)-msg_idx].line = (u16)(__LINE__);  
\
-   strncpy((chip)-trace_msg[(chip)-msg_idx].func, __func__, 
MSG_FUNC_LEN-1); \
-   strncpy((chip)-trace_msg[(chip)-msg_idx].file, _file, 
MSG_FILE_LEN-1);\
-   get_current_time((chip)-trace_msg[(chip)-msg_idx].timeval_buf, 
TIME_VAL_LEN); \
-   (chip)-trace_msg[(chip)-msg_idx].valid = 1;   
\
-   (chip)-msg_idx++;  
\
-   if ((chip)-msg_idx = TRACE_ITEM_CNT) {
\
-   (chip)-msg_idx = 0;
\
-   }   
\
-   goto label; 
\
+#define TRACE_GOTO(chip, label) \
+do { \
+   char *_file = filename(__FILE__); \
+   RTSX_DEBUGP([%s][%s]:[%d]\n, _file, __func__, __LINE__); \
+   (chip)-trace_msg[(chip)-msg_idx].line = (u16)(__LINE__); \
+   strncpy((chip)-trace_msg[(chip)-msg_idx].func, \
+   __func__, MSG_FUNC_LEN-1); \
+   strncpy((chip)-trace_msg[(chip)-msg_idx].file, \
+   _file, MSG_FILE_LEN-1); \
+   get_current_time((chip)-trace_msg[(chip)-msg_idx].timeval_buf, \
+TIME_VAL_LEN); \
+   (chip)-trace_msg[(chip)-msg_idx].valid = 1; \
+   (chip)-msg_idx++; \
+   if ((chip)-msg_idx = TRACE_ITEM_CNT) { \
+   

Re: [PATCH 1/3] Fix trailing whitespace in trace.h

2012-10-02 Thread Andy Shevchenko
On Tue, 2012-10-02 at 20:53 +0900, YAMANE Toshiaki wrote: 
 fixed below checkpatch error.
 
 -ERROR: trailing whitespace
 
 Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
 ---
  drivers/staging/rts_pstor/trace.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/staging/rts_pstor/trace.h 
 b/drivers/staging/rts_pstor/trace.h
 index cf60a1b..740999c 100644
 --- a/drivers/staging/rts_pstor/trace.h
 +++ b/drivers/staging/rts_pstor/trace.h
 @@ -39,7 +39,7 @@ static inline char *filename(char *path)
   while (*ptr != '\0') {
   if ((*ptr == '\\') || (*ptr == '/'))
   path = ptr + 1;
 - 
 +
   ptr++;
   }

For me it seems total filename() function could be squeezed to just 
strrchr(path, '/') + 1;
Moreover there is already basename() in the lib/dynamic_debug.c you
could rename, export and reuse.


-- 
Andy Shevchenko andriy.shevche...@linux.intel.com
Intel Finland Oy
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 2/3] Add parenthesis to macros with complex values in trace.h

2012-10-02 Thread Andy Shevchenko
On Tue, 2012-10-02 at 20:54 +0900, YAMANE Toshiaki wrote: 
 fixed some checkpatch below error.
 -ERROR: Macros with complex values should be enclosed in parenthesis
 
 Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
 ---
  drivers/staging/rts_pstor/trace.h |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/staging/rts_pstor/trace.h 
 b/drivers/staging/rts_pstor/trace.h
 index 740999c..a34493c 100644
 --- a/drivers/staging/rts_pstor/trace.h
 +++ b/drivers/staging/rts_pstor/trace.h
 @@ -78,8 +78,8 @@ do {
 \
   goto label; 
 \
  } while (0)
  #else
 -#define TRACE_RET(chip, ret) return ret
 -#define TRACE_GOTO(chip, label)  goto label
 +#define TRACE_RET(chip, ret) return(ret)
 +#define TRACE_GOTO(chip, label)  goto(label)
  #endif
In this specific case I think checkpatch.pl wants more than needed.


-- 
Andy Shevchenko andriy.shevche...@linux.intel.com
Intel Finland Oy
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 2/3] Add parenthesis to macros with complex values in trace.h

2012-10-02 Thread Dan Carpenter
On Tue, Oct 02, 2012 at 08:54:28PM +0900, YAMANE Toshiaki wrote:
 fixed some checkpatch below error.
 -ERROR: Macros with complex values should be enclosed in parenthesis
 
 Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
 ---
  drivers/staging/rts_pstor/trace.h |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/staging/rts_pstor/trace.h 
 b/drivers/staging/rts_pstor/trace.h
 index 740999c..a34493c 100644
 --- a/drivers/staging/rts_pstor/trace.h
 +++ b/drivers/staging/rts_pstor/trace.h
 @@ -78,8 +78,8 @@ do {
 \
   goto label; 
 \
  } while (0)
  #else
 -#define TRACE_RET(chip, ret) return ret
 -#define TRACE_GOTO(chip, label)  goto label
 +#define TRACE_RET(chip, ret) return(ret)
 +#define TRACE_GOTO(chip, label)  goto(label)

This will cause a compile error.

There is no need to do this, checkpatch.pl is wrong here.

regards,
dan carpenter

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 3/3] Fix line over 80 character issue and space before tabs issue in trace.h

2012-10-02 Thread Dan Carpenter
On Tue, Oct 02, 2012 at 08:54:48PM +0900, YAMANE Toshiaki wrote:
 fixed some checkpatch warnings.
 
 -WARNING: line over 80 characters
 -WARNING: please, no space before tabs
 

These looked nicer in the original, sorry.

regards,
dan carpenter

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [driver-core:driver-core-next 4/11] include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used

2012-10-02 Thread Greg Kroah-Hartman
On Tue, Oct 02, 2012 at 06:41:27PM +0800, Fengguang Wu wrote:
 Hi Joe,
 
 FYI, kernel build failed on
 
 tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
 driver-core-next
 head:   e0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2
 commit: 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 [4/11] dev: Add 
 dev_vprintk_emit and dev_printk_emit
 config: sh-allnoconfig
 
 All error/warnings:
 
 include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used 
 [-Werror=unused-function]
 cc1: all warnings being treated as errors

I can't duplicate this here, what is your .config?

And treating warnings as errors?  Good luck :)

greg k-h
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [driver-core:driver-core-next 4/11] include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used

2012-10-02 Thread Joe Perches
On Tue, 2012-10-02 at 18:41 +0800, Fengguang Wu wrote:
 Hi Joe,

Hi Fengguang.

 FYI, kernel build failed on
 
 tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
 driver-core-next
 head:   e0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2
 commit: 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 [4/11] dev: Add 
 dev_vprintk_emit and dev_printk_emit
 config: sh-allnoconfig
 
 All error/warnings:
 
 include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used 
 [-Werror=unused-function]
 cc1: all warnings being treated as errors

My fault, sorry.  It was fixed in a later commit.

commit 0a18b05043acc01d1d6a4bac459e62c79628881c
Author: Joe Perches j...@perches.com
Date:   Tue Sep 25 18:19:57 2012 -0700

device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit



___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [driver-core:driver-core-next 4/11] include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not used

2012-10-02 Thread Fengguang Wu
On Tue, Oct 02, 2012 at 06:46:33AM -0700, Greg KH wrote:
 On Tue, Oct 02, 2012 at 06:41:27PM +0800, Fengguang Wu wrote:
  Hi Joe,
  
  FYI, kernel build failed on
  
  tree:   
  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
  driver-core-next
  head:   e0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2
  commit: 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 [4/11] dev: Add 
  dev_vprintk_emit and dev_printk_emit
  config: sh-allnoconfig
  
  All error/warnings:
  
  include/linux/device.h:925:12: error: 'dev_vprintk_emit' defined but not 
  used [-Werror=unused-function]
  cc1: all warnings being treated as errors
 
 I can't duplicate this here, what is your .config?

make ARCH=sh allnoconfig

Sorry, but it's a bit complicated: driver-core-next HEAD is actually
fine.  The commit 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09 is broken.

Since I'm not doing bisectibility tests on driver-core, I checked the
log and find that the error is actually first found when testing the
HEAD commit of 

git://git.linaro.org/people/shawnguo/linux-2.6.git for-3.8

It seems to be based on linux-next, which includes an older version of
your tree. The build system bisected down the error to the first bad
commit 05e4e5b87aab74f994acf9dd4bed4a8f1367cd09, and then find that
it's not really in shawnguo's tree, but part of your tree. So it ends
up reporting against driver-core rather than shawnguo's tree.

Everything is working fine above, except that your tree HEAD has
advanced to a new point that the error already get fixed.

 And treating warnings as errors?  Good luck :)

I guess some dir in ARCH sh does that -Werror thing.

Thanks,
Fengguang
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


RE: [PATCH net, 3/3] hyperv: Fix page buffer handling in rndis_filter_send_request()

2012-10-02 Thread Haiyang Zhang


 -Original Message-
 From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
 Sent: Tuesday, October 02, 2012 4:39 AM
 To: Haiyang Zhang
 Cc: da...@davemloft.net; net...@vger.kernel.org; o...@aepfle.de;
 jasow...@redhat.com; linux-ker...@vger.kernel.org;
 devel@linuxdriverproject.org
 Subject: Re: [PATCH net, 3/3] hyperv: Fix page buffer handling in
 rndis_filter_send_request()
 
 On Mon, Oct 01, 2012 at 03:30:57PM -0700, Haiyang Zhang wrote:
  Add another page buffer if the request message crossed page boundary.
 
 
 What are the user visible effects of this bug fix?  Please put that
 in the commit message.

Will do.

Thanks,
- Haiyang


___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH net-next, 1/6] hyperv: Fix the max_xfer_size in RNDIS initialization

2012-10-02 Thread Haiyang Zhang
According to RNDIS specs, Windows sets this size to
0x4000. I use the same value here.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/rndis_filter.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index 06f8601..1337b64 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -684,8 +684,7 @@ static int rndis_filter_init_device(struct rndis_device 
*dev)
init = request-request_msg.msg.init_req;
init-major_ver = RNDIS_MAJOR_VERSION;
init-minor_ver = RNDIS_MINOR_VERSION;
-   /* FIXME: Use 1536 - rounded ethernet frame size */
-   init-max_xfer_size = 2048;
+   init-max_xfer_size = 0x4000;
 
dev-state = RNDIS_DEV_INITIALIZING;
 
-- 
1.7.4.1

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH net-next, 2/6] hyperv: Fix the missing return value in rndis_filter_set_packet_filter()

2012-10-02 Thread Haiyang Zhang
Return ETIMEDOUT when the reply message is not received in time.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/rndis_filter.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index 1337b64..617eb2e 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -647,6 +647,7 @@ int rndis_filter_set_packet_filter(struct rndis_device 
*dev, u32 new_filter)
if (t == 0) {
netdev_err(ndev,
timeout before we got a set response...\n);
+   ret = -ETIMEDOUT;
/*
 * We can't deallocate the request since we may still receive a
 * send completion for it.
-- 
1.7.4.1

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH net-next, 3/6] hyperv: Fix page buffer handling in rndis_filter_send_request()

2012-10-02 Thread Haiyang Zhang
To prevent possible data corruption in RNDIS requests, add another
page buffer if the request message crossed page boundary.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/rndis_filter.c |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index 617eb2e..f25f41e 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -45,7 +45,8 @@ struct rndis_request {
 
/* Simplify allocation by having a netvsc packet inline */
struct hv_netvsc_packet pkt;
-   struct hv_page_buffer buf;
+   /* Set 2 pages for rndis requests crossing page boundary */
+   struct hv_page_buffer buf[2];
 
struct rndis_message request_msg;
/*
@@ -227,6 +228,18 @@ static int rndis_filter_send_request(struct rndis_device 
*dev,
packet-page_buf[0].offset =
(unsigned long)req-request_msg  (PAGE_SIZE - 1);
 
+   /* Add one page_buf when request_msg crossing page boundary */
+   if (packet-page_buf[0].offset + packet-page_buf[0].len  PAGE_SIZE) {
+   packet-page_buf_cnt++;
+   packet-page_buf[0].len = PAGE_SIZE -
+   packet-page_buf[0].offset;
+   packet-page_buf[1].pfn = virt_to_phys((void *)req-request_msg
+   + packet-page_buf[0].len)  PAGE_SHIFT;
+   packet-page_buf[1].offset = 0;
+   packet-page_buf[1].len = req-request_msg.msg_len -
+   packet-page_buf[0].len;
+   }
+
packet-completion.send.send_completion_ctx = req;/* packet; */
packet-completion.send.send_completion =
rndis_filter_send_request_completion;
-- 
1.7.4.1

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH net-next, 4/6] hyperv: Remove extra allocated space for recv_pkt_list elements

2012-10-02 Thread Haiyang Zhang
The receive code path doesn't use the page buffer, so remove the
extra allocated space here.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/hyperv_net.h |2 --
 drivers/net/hyperv/netvsc.c |4 +---
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 95ceb35..d58f28c 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -465,8 +465,6 @@ struct nvsp_message {
 
 #define NETVSC_RECEIVE_BUFFER_ID   0xcafe
 
-#define NETVSC_RECEIVE_SG_COUNT1
-
 /* Preallocated receive packets */
 #define NETVSC_RECEIVE_PACKETLIST_COUNT256
 
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 4a1a5f5..d9c4c03 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -904,9 +904,7 @@ int netvsc_device_add(struct hv_device *device, void 
*additional_info)
INIT_LIST_HEAD(net_device-recv_pkt_list);
 
for (i = 0; i  NETVSC_RECEIVE_PACKETLIST_COUNT; i++) {
-   packet = kzalloc(sizeof(struct hv_netvsc_packet) +
-(NETVSC_RECEIVE_SG_COUNT *
- sizeof(struct hv_page_buffer)), GFP_KERNEL);
+   packet = kzalloc(sizeof(struct hv_netvsc_packet), GFP_KERNEL);
if (!packet)
break;
 
-- 
1.7.4.1

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH net-next, 5/6] hyperv: Report actual status in receive completion packet

2012-10-02 Thread Haiyang Zhang
The existing code always reports NVSP_STAT_SUCCESS. This patch adds the
mechanism to report failure when it happens.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/hyperv_net.h   |2 ++
 drivers/net/hyperv/netvsc.c   |   18 --
 drivers/net/hyperv/netvsc_drv.c   |2 ++
 drivers/net/hyperv/rndis_filter.c |   19 ++-
 4 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index d58f28c..5fd6f46 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -35,6 +35,7 @@ struct hv_netvsc_packet;
 /* Represent the xfer page packet which contains 1 or more netvsc packet */
 struct xferpage_packet {
struct list_head list_ent;
+   u32 status;
 
/* # of netvsc packets this xfer packet contains */
u32 count;
@@ -47,6 +48,7 @@ struct xferpage_packet {
 struct hv_netvsc_packet {
/* Bookkeeping stuff */
struct list_head list_ent;
+   u32 status;
 
struct hv_device *device;
bool is_data_pkt;
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index d9c4c03..1cd7748 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -558,7 +558,7 @@ int netvsc_send(struct hv_device *device,
 }
 
 static void netvsc_send_recv_completion(struct hv_device *device,
-   u64 transaction_id)
+   u64 transaction_id, u32 status)
 {
struct nvsp_message recvcompMessage;
int retries = 0;
@@ -571,9 +571,7 @@ static void netvsc_send_recv_completion(struct hv_device 
*device,
recvcompMessage.hdr.msg_type =
NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE;
 
-   /* FIXME: Pass in the status */
-   recvcompMessage.msg.v1_msg.send_rndis_pkt_complete.status =
-   NVSP_STAT_SUCCESS;
+   recvcompMessage.msg.v1_msg.send_rndis_pkt_complete.status = status;
 
 retry_send_cmplt:
/* Send the completion */
@@ -613,6 +611,7 @@ static void netvsc_receive_completion(void *context)
bool fsend_receive_comp = false;
unsigned long flags;
struct net_device *ndev;
+   u32 status = NVSP_STAT_NONE;
 
/*
 * Even though it seems logical to do a GetOutboundNetDevice() here to
@@ -627,6 +626,9 @@ static void netvsc_receive_completion(void *context)
/* Overloading use of the lock. */
spin_lock_irqsave(net_device-recv_pkt_list_lock, flags);
 
+   if (packet-status != NVSP_STAT_SUCCESS)
+   packet-xfer_page_pkt-status = NVSP_STAT_FAIL;
+
packet-xfer_page_pkt-count--;
 
/*
@@ -636,6 +638,7 @@ static void netvsc_receive_completion(void *context)
if (packet-xfer_page_pkt-count == 0) {
fsend_receive_comp = true;
transaction_id = packet-completion.recv.recv_completion_tid;
+   status = packet-xfer_page_pkt-status;
list_add_tail(packet-xfer_page_pkt-list_ent,
  net_device-recv_pkt_list);
 
@@ -647,7 +650,7 @@ static void netvsc_receive_completion(void *context)
 
/* Send a receive completion for the xfer page packet */
if (fsend_receive_comp)
-   netvsc_send_recv_completion(device, transaction_id);
+   netvsc_send_recv_completion(device, transaction_id, status);
 
 }
 
@@ -736,7 +739,8 @@ static void netvsc_receive(struct hv_device *device,
   flags);
 
netvsc_send_recv_completion(device,
-   vmxferpage_packet-d.trans_id);
+   vmxferpage_packet-d.trans_id,
+   NVSP_STAT_FAIL);
 
return;
}
@@ -744,6 +748,7 @@ static void netvsc_receive(struct hv_device *device,
/* Remove the 1st packet to represent the xfer page packet itself */
xferpage_packet = (struct xferpage_packet *)listHead.next;
list_del(xferpage_packet-list_ent);
+   xferpage_packet-status = NVSP_STAT_SUCCESS;
 
/* This is how much we can satisfy */
xferpage_packet-count = count - 1;
@@ -760,6 +765,7 @@ static void netvsc_receive(struct hv_device *device,
list_del(netvsc_packet-list_ent);
 
/* Initialize the netvsc packet */
+   netvsc_packet-status = NVSP_STAT_SUCCESS;
netvsc_packet-xfer_page_pkt = xferpage_packet;
netvsc_packet-completion.recv.recv_completion =
netvsc_receive_completion;
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index e9a..f825a62 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -265,6 

[PATCH net-next, 6/6] hyperv: Add buffer for extended info after the RNDIS response message.

2012-10-02 Thread Haiyang Zhang
In some response messages, there may be some extended info after the
message.

Signed-off-by: Haiyang Zhang haiya...@microsoft.com
Reviewed-by: K. Y. Srinivasan k...@microsoft.com

---
 drivers/net/hyperv/rndis_filter.c |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index e7e12cf..928148c 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -32,16 +32,19 @@
 #include hyperv_net.h
 
 
+#define RNDIS_EXT_LEN 100
 struct rndis_request {
struct list_head list_ent;
struct completion  wait_event;
 
+   struct rndis_message response_msg;
/*
-* FIXME: We assumed a fixed size response here. If we do ever need to
-* handle a bigger response, we can either define a max response
-* message or add a response buffer variable above this field
+* The buffer for extended info after the RNDIS response message. It's
+* referenced based on the data offset in the RNDIS message. Its size
+* is enough for current needs, and should be sufficient for the near
+* future.
 */
-   struct rndis_message response_msg;
+   u8 response_ext[RNDIS_EXT_LEN];
 
/* Simplify allocation by having a netvsc packet inline */
struct hv_netvsc_packet pkt;
@@ -50,12 +53,10 @@ struct rndis_request {
 
struct rndis_message request_msg;
/*
-* The buffer for the extended info after the RNDIS message. It's
-* referenced based on the data offset in the RNDIS message. Its size
-* is enough for current needs, and should be sufficient for the near
-* future.
+* The buffer for the extended info after the RNDIS request message.
+* It is referenced and sized in a similar way as response_ext.
 */
-   u8 ext[100];
+   u8 request_ext[RNDIS_EXT_LEN];
 };
 
 static void rndis_filter_send_completion(void *ctx);
@@ -274,7 +275,8 @@ static void rndis_filter_receive_response(struct 
rndis_device *dev,
spin_unlock_irqrestore(dev-request_lock, flags);
 
if (found) {
-   if (resp-msg_len = sizeof(struct rndis_message)) {
+   if (resp-msg_len =
+   sizeof(struct rndis_message) + RNDIS_EXT_LEN) {
memcpy(request-response_msg, resp,
   resp-msg_len);
} else {
-- 
1.7.4.1

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


RE: [PATCH RESEND] staging: comedi: ni_daq_700: fix dio subdevice regression

2012-10-02 Thread H Hartley Sweeten
On Tuesday, October 02, 2012 3:10 AM, Ian Abbott wrote:
 From: Fred Brooks nsasp...@nsaspook.com

 Here is a small patch to fix a problem caused by a previous patch that
 removed the  callback function.  The callback remove patch:
 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a

 I finally booted my dev machine on the latest kernel (running Debian
 here so it's still on 3.2 normally) to test the ni_daq_700 driver with
 my test program and noticed this bug.

 Shift the DIO_R read result to bits 8..15 Digital direction
 configuration: channels 0-7 output, 8-15 input (8225 device emu as port
 A output, port B input, port C N/A).

 Cc: sta...@vger.kernel.org # 3.6.x
 Signed-off-by: Fred Brooks nsasp...@nsaspook.com
 Signed-off-by: Ian Abbott abbo...@mev.co.uk
 ---
 I messed up the Cc: sta...@vger.kernel.org line so I'm resending.  Sorry.
 ---
  drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c 
 b/drivers/staging/comedi/drivers/ni_daq_700.c
 index 2ba0ade..68d7c6a 100644
 --- a/drivers/staging/comedi/drivers/ni_daq_700.c
 +++ b/drivers/staging/comedi/drivers/ni_daq_700.c
 @@ -95,7 +95,7 @@ static int daq700_dio_insn_bits(struct comedi_device *dev,
   }
  
   data[1] = s-state  0xff;
 - data[1] |= inb(dev-iobase + DIO_R);
 + data[1] |= inb(dev-iobase + DIO_R)  8;
  
   return insn-n;
  }

Oops, sorry about that...

Reviewed-by: H Hartley Sweeten hswee...@visionengravers.com

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache)

2012-10-02 Thread Seth Jennings
On 09/28/2012 08:31 AM, Mel Gorman wrote:
 On Tue, Sep 25, 2012 at 04:31:01PM -0700, Dan Magenheimer wrote:
 Attached patch applies to staging-next and I _think_ should
 fix the reported problem where zbud in zcache2 does not
 work on a PPC64 with PAGE_SIZE!=12.  I do not have a machine
 to test this so testing by others would be appreciated.

 
 Seth, can you verify?

Yes, this patch does prevent the crash on PPC64.

Seth

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


RE: [PATCH RESEND] staging: comedi: ni_daq_700: fix dio subdevice regression

2012-10-02 Thread H Hartley Sweeten
On Tuesday, October 02, 2012 3:10 AM, Ian Abbott wrote:
 From: Fred Brooks nsasp...@nsaspook.com

 Here is a small patch to fix a problem caused by a previous patch that
 removed the  callback function.  The callback remove patch:
 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a

 I finally booted my dev machine on the latest kernel (running Debian
 here so it's still on 3.2 normally) to test the ni_daq_700 driver with
 my test program and noticed this bug.

 Shift the DIO_R read result to bits 8..15 Digital direction
 configuration: channels 0-7 output, 8-15 input (8225 device emu as port
 A output, port B input, port C N/A).

 Cc: sta...@vger.kernel.org # 3.6.x
 Signed-off-by: Fred Brooks nsasp...@nsaspook.com
 Signed-off-by: Ian Abbott abbo...@mev.co.uk

Ian,

The DIO is not really configurable on this board. I wonder if it
would be cleaner to split it into two subdevices, a DI and a DO
subdevice. This would allow getting rid of the insn_config
function and might better represent the actual hardware.

Regards,
Hartley

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [RFC] mm: add support for zsmalloc and zcache

2012-10-02 Thread Seth Jennings
On 09/27/2012 05:07 PM, Dan Magenheimer wrote:
 Of course, I'm of the opinion that neither zcache1 nor
 zcache2 would be likely to be promoted for at least another
 cycle or two, so if you go with zcache2+zsmalloc as the compromise
 and it still takes six months for promotion, I hope you don't
 blame that on the rewrite. ;-)
 
 Anyway, looking forward (hopefully) to working with you on
 a good compromise.  It would be nice to get back to coding
 and working together on a single path forward for zcache
 as there is a lot of work to do!

We want to see zcache moving forward so that it can get out of staging
and into the hands of end users.  From the direction the discussion
has taken, replacing zcache with the new code appears to be the right
compromise for the situation.  Moving to the new zcache code resets
the clock so I would like to know that we're all on the same track...

1- Promotion must be the top priority, focus needs to be on making the
code production ready rather than adding more features.

2- The code is in the community and development must be done in
public, no further large private rewrites.

3- Benchmarks need to be agreed on, Mel has suggested some of the
MMTests. We need a way to talk about performance so we can make
comparisions, avoid regressions, and talk about promotion criteria.
They should be something any developer can run.

4- Let's investigate breaking ramster out of zcache so that zcache
remains a separately testable building block; Konrad was looking at
this I believe.  RAMSTer adds another functional mode for zcache and
adds to the difficulty of validating patches.  Not every developer
has a cluster of machines to validate RAMSter.

Seth

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


RE: [RFC] mm: add support for zsmalloc and zcache

2012-10-02 Thread Dan Magenheimer
 From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com]
 Subject: Re: [RFC] mm: add support for zsmalloc and zcache
 
 On 09/27/2012 05:07 PM, Dan Magenheimer wrote:
  Of course, I'm of the opinion that neither zcache1 nor
  zcache2 would be likely to be promoted for at least another
  cycle or two, so if you go with zcache2+zsmalloc as the compromise
  and it still takes six months for promotion, I hope you don't
  blame that on the rewrite. ;-)
 
  Anyway, looking forward (hopefully) to working with you on
  a good compromise.  It would be nice to get back to coding
  and working together on a single path forward for zcache
  as there is a lot of work to do!
 
 We want to see zcache moving forward so that it can get out of staging
 and into the hands of end users.  From the direction the discussion
 has taken, replacing zcache with the new code appears to be the right
 compromise for the situation.  Moving to the new zcache code resets
 the clock so I would like to know that we're all on the same track...
 
 1- Promotion must be the top priority, focus needs to be on making the
 code production ready rather than adding more features.

Agreed.

 2- The code is in the community and development must be done in
 public, no further large private rewrites.

Agreed.

 3- Benchmarks need to be agreed on, Mel has suggested some of the
 MMTests. We need a way to talk about performance so we can make
 comparisions, avoid regressions, and talk about promotion criteria.
 They should be something any developer can run.

Agreed.

 4- Let's investigate breaking ramster out of zcache so that zcache
 remains a separately testable building block; Konrad was looking at
 this I believe.  RAMSTer adds another functional mode for zcache and
 adds to the difficulty of validating patches.  Not every developer
 has a cluster of machines to validate RAMSter.

In zcache2 (which is now in Linus' 3.7-rc0 tree in the ramster directory),
ramster is already broken out.  It can be disabled either at compile-time
(simply by not specifying CONFIG_RAMSTER) or at run-time (by using
zcache as the kernel boot parameter instead of ramster).

So... also agreed.  RAMster will not be allowed to get in the
way of promotion or performance as long as any reasonable attempt
is made to avoid breaking the existing hooks to RAMster.
(This only because I expect future functionality to also
use these hooks so would like to avoid breaking them, if possible.)

Does this last clarification work for you, Seth?

If so, shake hands and move forward?  What do you see as next steps?

Dan
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,1/6] hyperv: Fix the max_xfer_size in RNDIS initialization

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:19 -0700

 According to RNDIS specs, Windows sets this size to
 0x4000. I use the same value here.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,2/6] hyperv: Fix the missing return value in rndis_filter_set_packet_filter()

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:20 -0700

 Return ETIMEDOUT when the reply message is not received in time.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,3/6] hyperv: Fix page buffer handling in rndis_filter_send_request()

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:21 -0700

 To prevent possible data corruption in RNDIS requests, add another
 page buffer if the request message crossed page boundary.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,5/6] hyperv: Report actual status in receive completion packet

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:23 -0700

 The existing code always reports NVSP_STAT_SUCCESS. This patch adds the
 mechanism to report failure when it happens.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,4/6] hyperv: Remove extra allocated space for recv_pkt_list elements

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:22 -0700

 The receive code path doesn't use the page buffer, so remove the
 extra allocated space here.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH net-next,6/6] hyperv: Add buffer for extended info after the RNDIS response message.

2012-10-02 Thread David Miller
From: Haiyang Zhang haiya...@microsoft.com
Date: Tue,  2 Oct 2012 08:30:24 -0700

 In some response messages, there may be some extended info after the
 message.
 
 Signed-off-by: Haiyang Zhang haiya...@microsoft.com
 Reviewed-by: K. Y. Srinivasan k...@microsoft.com

Applied.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH] staging: nvec: remove include of mach/iomap.h

2012-10-02 Thread Stephen Warren
From: Stephen Warren swar...@nvidia.com

Nothing from this file is used, and the file will hopefully be deleted
soon.

Signed-off-by: Stephen Warren swar...@nvidia.com
---
Greg, if this patch can get into 3.7 (it's late, I know) then that
would be great. If not, may I please request an ack so I can take the
change through the Tegra tree in 3.8, since I will probably have cleanup
patches that depend on this change. Thanks.

Signed-off-by: Stephen Warren swar...@nvidia.com
---
 drivers/staging/nvec/nvec.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 094fdc3..97cdf08 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -39,7 +39,6 @@
 #include linux/workqueue.h
 
 #include mach/clk.h
-#include mach/iomap.h
 
 #include nvec.h
 
-- 
1.7.0.4

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH] staging: nvec: remove include of mach/iomap.h

2012-10-02 Thread Greg Kroah-Hartman
On Tue, Oct 02, 2012 at 04:18:56PM -0600, Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com
 
 Nothing from this file is used, and the file will hopefully be deleted
 soon.
 
 Signed-off-by: Stephen Warren swar...@nvidia.com
 ---
 Greg, if this patch can get into 3.7 (it's late, I know) then that
 would be great. If not, may I please request an ack so I can take the
 change through the Tegra tree in 3.8, since I will probably have cleanup
 patches that depend on this change. Thanks.

I can apply this after 3.7-rc1 is out, so that it will be in the final
3.7, is that ok for you?  If not, feel free to take it in your tree as
well:

Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org

thanks,

greg k-h
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH] staging: nvec: remove include of mach/iomap.h

2012-10-02 Thread Marc Dietrich
On Tuesday 02 October 2012 16:18:56 Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com
 
 Nothing from this file is used, and the file will hopefully be deleted
 soon.
 
 Signed-off-by: Stephen Warren swar...@nvidia.com

Right.

Acked-By: Marc Dietrich marvi...@gmx.de

 ---
 Greg, if this patch can get into 3.7 (it's late, I know) then that
 would be great. If not, may I please request an ack so I can take the
 change through the Tegra tree in 3.8, since I will probably have cleanup
 patches that depend on this change. Thanks.
 
 Signed-off-by: Stephen Warren swar...@nvidia.com
 ---
  drivers/staging/nvec/nvec.c |1 -
  1 files changed, 0 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
 index 094fdc3..97cdf08 100644
 --- a/drivers/staging/nvec/nvec.c
 +++ b/drivers/staging/nvec/nvec.c
 @@ -39,7 +39,6 @@
  #include linux/workqueue.h
 
  #include mach/clk.h
 -#include mach/iomap.h
 
  #include nvec.h
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH] staging: nvec: remove include of mach/iomap.h

2012-10-02 Thread Stephen Warren
On 10/02/2012 04:24 PM, Greg Kroah-Hartman wrote:
 On Tue, Oct 02, 2012 at 04:18:56PM -0600, Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com

 Nothing from this file is used, and the file will hopefully be deleted
 soon.

 Signed-off-by: Stephen Warren swar...@nvidia.com
 ---
 Greg, if this patch can get into 3.7 (it's late, I know) then that
 would be great. If not, may I please request an ack so I can take the
 change through the Tegra tree in 3.8, since I will probably have cleanup
 patches that depend on this change. Thanks.
 
 I can apply this after 3.7-rc1 is out, so that it will be in the final
 3.7, is that ok for you?  If not, feel free to take it in your tree as
 well:
 
 Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org

Thanks. I may as well take it through my tree so I can start building on
top of it as soon as rc1 is out rather than waiting for rc2 or later.
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 1/3] Fix trailing whitespace in trace.h

2012-10-02 Thread Toshiaki Yamane
On Tue, Oct 2, 2012 at 9:12 PM, Andy Shevchenko
andriy.shevche...@linux.intel.com wrote:
 On Tue, 2012-10-02 at 20:53 +0900, YAMANE Toshiaki wrote:
 fixed below checkpatch error.

 -ERROR: trailing whitespace

 Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
 ---
  drivers/staging/rts_pstor/trace.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/staging/rts_pstor/trace.h 
 b/drivers/staging/rts_pstor/trace.h
 index cf60a1b..740999c 100644
 --- a/drivers/staging/rts_pstor/trace.h
 +++ b/drivers/staging/rts_pstor/trace.h
 @@ -39,7 +39,7 @@ static inline char *filename(char *path)
   while (*ptr != '\0') {
   if ((*ptr == '\\') || (*ptr == '/'))
   path = ptr + 1;
 -
 +
   ptr++;
   }

 For me it seems total filename() function could be squeezed to just 
 strrchr(path, '/') + 1;
 Moreover there is already basename() in the lib/dynamic_debug.c you
 could rename, export and reuse.

I will destroy this patch series.
thanks.


YAMANE Toshiaki
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 2/3] Add parenthesis to macros with complex values in trace.h

2012-10-02 Thread Toshiaki Yamane
On Tue, Oct 2, 2012 at 9:21 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
 On Tue, Oct 02, 2012 at 08:54:28PM +0900, YAMANE Toshiaki wrote:
 fixed some checkpatch below error.
 -ERROR: Macros with complex values should be enclosed in parenthesis

 Signed-off-by: Toshiaki Yamane yamaneto...@gmail.com
 ---
  drivers/staging/rts_pstor/trace.h |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/drivers/staging/rts_pstor/trace.h 
 b/drivers/staging/rts_pstor/trace.h
 index 740999c..a34493c 100644
 --- a/drivers/staging/rts_pstor/trace.h
 +++ b/drivers/staging/rts_pstor/trace.h
 @@ -78,8 +78,8 @@ do {   
  \
   goto label;
  \
  } while (0)
  #else
 -#define TRACE_RET(chip, ret) return ret
 -#define TRACE_GOTO(chip, label)  goto label
 +#define TRACE_RET(chip, ret) return(ret)
 +#define TRACE_GOTO(chip, label)  goto(label)

 This will cause a compile error.

 There is no need to do this, checkpatch.pl is wrong here.

I will destroy this patch series.
thanks.


YAMANE Toshiaki
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


Re: [PATCH 3/3] Fix line over 80 character issue and space before tabs issue in trace.h

2012-10-02 Thread Toshiaki Yamane
On Tue, Oct 2, 2012 at 9:23 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
 On Tue, Oct 02, 2012 at 08:54:48PM +0900, YAMANE Toshiaki wrote:
 fixed some checkpatch warnings.

 -WARNING: line over 80 characters
 -WARNING: please, no space before tabs


 These looked nicer in the original, sorry.

I will destroy this patch series.
thanks.


YAMANE Toshiaki
___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[PATCH]staging xgifb Fix typos.

2012-10-02 Thread Justin P. Mattock
From: Justin P. Mattock justinmatt...@gmail.com

Signed-off-by: Justin P. Mattock justinmatt...@gmail.com

---

The patch below fixes typos while reading through staging xgifb.

 drivers/staging/xgifb/TODO |2 +-
 drivers/staging/xgifb/vb_setmode.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/xgifb/TODO b/drivers/staging/xgifb/TODO
index 13d9bc2..392b29d 100644
--- a/drivers/staging/xgifb/TODO
+++ b/drivers/staging/xgifb/TODO
@@ -1,4 +1,4 @@
-This drivers still need a lot of work. I can list all cleanups to do but it's
+This drivers still needs a lot of work. I can list all cleanups to do but it's
 going to be long. So, I'm writing cleanups and not the list.
 
 Arnaud
diff --git a/drivers/staging/xgifb/vb_setmode.c 
b/drivers/staging/xgifb/vb_setmode.c
index e95a165..c8561a0 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -2501,7 +2501,7 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned 
short ModeIdIndex,
} else {
temp = 0x017C;
}
-   } else { /* 3nd party chip */
+   } else { /* 3rd party chip */
temp = SetCRT2ToLCD;
}
 
@@ -4390,7 +4390,7 @@ static void XGI_SetLCDRegs(unsigned short ModeNo, 
unsigned short ModeIdIndex,
xgifb_reg_and_or(pVBInfo-Part2Port, 0x17, 0xFB, 0x00);
xgifb_reg_and_or(pVBInfo-Part2Port, 0x18, 0xDF, 0x00);
 
-   /* Customized LCDB Des no add */
+   /* Customized LCDB Does not add */
tempbx = 5;
LCDBDesPtr = XGI_GetLcdPtr(tempbx, ModeNo, ModeIdIndex,
   RefreshRateTableIndex, pVBInfo);
-- 
1.7.9.5

___
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel