Re: [PATCH v4 0/2] mfd: rtsx: decrease driver size and add new device

2013-12-18 Thread Lee Jones
On Wed, 18 Dec 2013, micky_ch...@realsil.com.cn wrote:

> From: Micky Ching 
> 
> we add a macro to simplify setting pull control, and use a common init
> function to init the common params for 8411-like chips. at last we add
> support for rtl8402 chip.
> 
> Micky Ching (2):
>   mfd: rtsx: add set pull control macro and simplify rtl8411
>   mfd: rtsx: add support for card reader rtl8402
> 
>  drivers/mfd/rtl8411.c  |   95 
> ++--
>  drivers/mfd/rtsx_pcr.c |5 +++
>  drivers/mfd/rtsx_pcr.h |9 +
>  3 files changed, 66 insertions(+), 43 deletions(-)

Nice.

Applied with Dan's Reviewed-by.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: bcm: DDRInit: fixed issues w/ commenting.

2013-12-18 Thread Dan Carpenter
Gary emailed me privately that fixing my comments would be a problem.

1)  Greg complained about your earlier patch where you moved the
comments from this:
/* comment */
code();

To this:
code(); /* comment */

Greg's complaint was not about that you were doing more than one thing
per patch it was that the comment style was better in the original.

2) A lot of newbies have problems with understanding where the line
between doing one thing per patch and doing two things in a patch is.
You are allowed to make *tiny* changes if they are closely related to
the central thrust of the patch.

So in this case the patch would be:

Staging: bcm: DDRInit: fix up some comments

I have removed the C99 comments.  Some comments were bogus so instead of
fixing them, I just deleted them.  I made a few minor grammar, spelling
and white space fixes as well.

It's still one thing which is "fixing comments".

regards,
dan carpenter

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


Re: [PATCH] Staging: bcm: DDRInit: fixed issues w/ commenting.

2013-12-18 Thread GaryRookard

On Wed, 18 Dec 2013, Dan Carpenter wrote:


Date: Wed, 18 Dec 2013 17:00:16 +0300
From: Dan Carpenter 
To: Gary Rookard 
Cc: de...@driverdev.osuosl.org, gre...@linuxfoundation.org,
l...@xenapiadmin.com, j...@joshtriplett.org, nandu.hgo...@gmail.com
Subject: Re: [PATCH] Staging: bcm: DDRInit: fixed issues w/ commenting.

Gary emailed me privately that fixing my comments would be a problem.

1)  Greg complained about your earlier patch where you moved the
comments from this:
/* comment */
code();

To this:
code(); /* comment */

Greg's complaint was not about that you were doing more than one thing
per patch it was that the comment style was better in the original.

2) A lot of newbies have problems with understanding where the line
between doing one thing per patch and doing two things in a patch is.
You are allowed to make *tiny* changes if they are closely related to
the central thrust of the patch.

So in this case the patch would be:

Staging: bcm: DDRInit: fix up some comments

I have removed the C99 comments.  Some comments were bogus so instead of
fixing them, I just deleted them.  I made a few minor grammar, spelling
and white space fixes as well.

It's still one thing which is "fixing comments".

regards,
dan carpenter



--
Understood, and trying to comply to that principal.

Thanks,
Gary Rookard
--
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] vme_user: Update API to work in mixed environments

2013-12-18 Thread Aaron Sierra
- Original Message -
> From: "Greg KH" 
> To: "Aaron Sierra" 
> Cc: "martyn welch" , de...@driverdev.osuosl.org, 
> "manohar vanga" , "dan
> carpenter" 
> Sent: Tuesday, December 17, 2013 7:06:06 PM
> Subject: Re: [PATCH v2] vme_user: Update API to work in mixed environments
> 
> On Mon, Dec 09, 2013 at 10:05:40AM -0600, Aaron Sierra wrote:
> > This patch updates the vme_master and vme_slave structures to use
> > types with well defined size and to prevent the compiler from
> > inserting padding (between enable and vme_addr for one).
> > 
> > The original vme_master and vme_slave structs would be different
> > sizes and have different layouts depending on whether they were built
> > for a 32-bit or 64-bit system.
> > 
> > On x86 it is possible to have a 32-bit userspace and a 64-bit kernel.
> > In this type of environment, the userspace and kernel vme_user APIs
> > would disagree and prevent ioctls from executing (based on ioctl
> > signatures from _IOR and _IOW).
> > 
> > Signed-off-by: Aaron Sierra 
> > Acked-by: Martyn Welch 
> > ---
> >  drivers/staging/vme/devices/vme_user.h |   20 ++--
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/staging/vme/devices/vme_user.h
> > b/drivers/staging/vme/devices/vme_user.h
> > index 280ccc7..c3b4964 100644
> > --- a/drivers/staging/vme/devices/vme_user.h
> > +++ b/drivers/staging/vme/devices/vme_user.h
> > @@ -7,10 +7,10 @@
> >   * VMEbus Master Window Configuration Structure
> >   */
> >  struct vme_master {
> > -   int enable; /* State of Window */
> > -   unsigned long long vme_addr;/* Starting Address on the VMEbus */
> > -   unsigned long long size;/* Window Size */
> > -   u32 aspace; /* Address Space */
> > +   u32 enable; /* State of Window */
> > +   u64 vme_addr;   /* Starting Address on the VMEbus */
> > +   u64 size;   /* Window Size */
> > +   u32 aspace; /* Address Space */
> 
> Variable types that cross the user/kernel boundry need to have "__" in
> the front of them.  SO these need to be "__u32", "__u64" and the like.
> Care to send a patch that fixes this as an add-on to this one (I'll take
> this one as it's good on it's own.)
> 
> thanks,
> 
> greg k-h
> 

Sure thing. Thanks, Greg.

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


[PATCH ver2, 07/8] stating: dgap: Fixed trailing white space in dgap_sysfs.c

2013-12-18 Thread Masanari Iida
This patch fixes "ERROR: trailing whitespace" found by
checkpatch.pl, within dgap_sysfs.c

Signed-off-by: Masanari Iida 

---
 drivers/staging/dgap/dgap_sysfs.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/dgap/dgap_sysfs.c 
b/drivers/staging/dgap/dgap_sysfs.c
index 7f4ec9a..aa7e36f 100644
--- a/drivers/staging/dgap/dgap_sysfs.c
+++ b/drivers/staging/dgap/dgap_sysfs.c
@@ -1,7 +1,7 @@
 /*
  * Copyright 2004 Digi International (www.digi.com)
  *  Scott H Kilau 
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
@@ -9,14 +9,14 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE.  See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * 
+ *
  *  NOTE TO LINUX KERNEL HACKERS:  DO NOT REFORMAT THIS CODE!
  *
  *  This is shared code between Digi's CVS archive and the
@@ -28,8 +28,8 @@
  *  Thank you.
  *
  *
- * 
- * $Id: dgap_sysfs.c,v 1.1 2009/10/23 14:01:57 markh Exp $   
+ *
+ * $Id: dgap_sysfs.c,v 1.1 2009/10/23 14:01:57 markh Exp $
  */
 
 
@@ -41,7 +41,7 @@
 #include 
 #include 
 #include 
-  
+
 #include "dgap_driver.h"
 #include "dgap_conf.h"
 #include "dgap_parse.h"
@@ -130,7 +130,7 @@ void dgap_create_driver_sysfiles(struct pci_driver 
*dgap_driver)
rc |= driver_create_file(driverfs, &driver_attr_boards);
rc |= driver_create_file(driverfs, &driver_attr_maxboards);
rc |= driver_create_file(driverfs, &driver_attr_debug);
-   rc |= driver_create_file(driverfs, &driver_attr_rawreadok); 
+   rc |= driver_create_file(driverfs, &driver_attr_rawreadok);
rc |= driver_create_file(driverfs, &driver_attr_pollrate);
rc |= driver_create_file(driverfs, &driver_attr_pollcounter);
rc |= driver_create_file(driverfs, &driver_attr_state);
-- 
1.8.5.1.163.gd7aced9

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


[PATCH 1/2] vme_user: Enable compat_ioctl for mixed environment

2013-12-18 Thread Aaron Sierra
Now that the VME userspace API structures compile to a consistent size
in mixed environments (32-bit userspace and 64-bit kernel), enable the
.compat_ioctl to allow ioctls to execute in this environment.

Signed-off-by: Aaron Sierra 
---
 drivers/staging/vme/devices/vme_user.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vme/devices/vme_user.c 
b/drivers/staging/vme/devices/vme_user.c
index daec155..1933133 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -147,6 +147,7 @@ static const struct file_operations vme_user_fops = {
.write = vme_user_write,
.llseek = vme_user_llseek,
.unlocked_ioctl = vme_user_unlocked_ioctl,
+   .compat_ioctl = vme_user_unlocked_ioctl,
 };
 
 
-- 
1.7.9.5

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


[PATCH 2/2] vme_user: Use __u64 and __u32 in userspace structs

2013-12-18 Thread Aaron Sierra

Signed-off-by: Aaron Sierra 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/vme/devices/vme_user.h |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/vme/devices/vme_user.h 
b/drivers/staging/vme/devices/vme_user.h
index c3b4964..b8cc7bc 100644
--- a/drivers/staging/vme/devices/vme_user.h
+++ b/drivers/staging/vme/devices/vme_user.h
@@ -7,12 +7,12 @@
  * VMEbus Master Window Configuration Structure
  */
 struct vme_master {
-   u32 enable; /* State of Window */
-   u64 vme_addr;   /* Starting Address on the VMEbus */
-   u64 size;   /* Window Size */
-   u32 aspace; /* Address Space */
-   u32 cycle;  /* Cycle properties */
-   u32 dwidth; /* Maximum Data Width */
+   __u32 enable;   /* State of Window */
+   __u64 vme_addr; /* Starting Address on the VMEbus */
+   __u64 size; /* Window Size */
+   __u32 aspace;   /* Address Space */
+   __u32 cycle;/* Cycle properties */
+   __u32 dwidth;   /* Maximum Data Width */
 #if 0
char prefetchenable;/* Prefetch Read Enable State */
int prefetchsize;   /* Prefetch Read Size (Cache Lines) */
@@ -31,11 +31,11 @@ struct vme_master {
 
 /* VMEbus Slave Window Configuration Structure */
 struct vme_slave {
-   u32 enable; /* State of Window */
-   u64 vme_addr;   /* Starting Address on the VMEbus */
-   u64 size;   /* Window Size */
-   u32 aspace; /* Address Space */
-   u32 cycle;  /* Cycle properties */
+   __u32 enable;   /* State of Window */
+   __u64 vme_addr; /* Starting Address on the VMEbus */
+   __u64 size; /* Window Size */
+   __u32 aspace;   /* Address Space */
+   __u32 cycle;/* Cycle properties */
 #if 0
char wrpostenable;  /* Write Post State */
char rmwlock;   /* Lock PCI during RMW Cycles */
-- 
1.7.9.5
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH ver2 2/8] stating: dgap: Fixed trailing white space in dgap_driver.h

2013-12-18 Thread Masanari Iida
This patch fixes "ERROR: trailing whitespace" found by
checkpatch.pl, within dgap_driver.h

Signed-off-by: Masanari Iida 
---
 drivers/staging/dgap/dgap_driver.h | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/dgap/dgap_driver.h 
b/drivers/staging/dgap/dgap_driver.h
index 7d631e8..4b34bd7 100644
--- a/drivers/staging/dgap/dgap_driver.h
+++ b/drivers/staging/dgap/dgap_driver.h
@@ -58,7 +58,7 @@
 
 #definePROCSTR "dgap"  /* /proc entries
 */
 #defineDEVSTR  "/dev/dg/dgap"  /* /dev entries 
 */
-#defineDRVSTR  "dgap"  /* Driver name string 
+#defineDRVSTR  "dgap"  /* Driver name string
 * displayed by APR  */
 #defineAPR(args)   do { PRINTF_TO_KMEM(args); printk(DRVSTR": "); 
printk args; \
   } while (0)
@@ -112,7 +112,7 @@
 #endif
 
 #if defined TRC_TO_KMEM
-#define PRINTF_TO_KMEM(args) dgap_tracef args 
+#define PRINTF_TO_KMEM(args) dgap_tracef args
 #else //!defined TRC_TO_KMEM
 #define PRINTF_TO_KMEM(args)
 #endif
@@ -192,7 +192,7 @@
  * Our major for the mgmt devices.
  *
  * We can use 22, because Digi was allocated 22 and 23 for the epca driver.
- * 22 has now become obsolete now that the "cu" devices have 
+ * 22 has now become obsolete now that the "cu" devices have
  * been removed from 2.6.
  * Also, this *IS* the epca driver, just PCI only now.
  */
@@ -290,7 +290,7 @@ extern char *dgap_state_text[];
 extern char *dgap_driver_state_text[];
 
 
-/* 
+/*
  * Modem line constants are defined as macros because DSR and
  * DCD are swapable using the ditty altpin option.
  */
@@ -322,7 +322,7 @@ struct macounter
 };
 
 
-/ 
+/
  * Device flag definitions for bd_flags.
  /
 #defineBD_FEP5PLUS 0x0001  /* Supports FEP5 Plus commands 
*/
@@ -340,7 +340,7 @@ struct board_t
 
int type;   /* Type of board */
char*name;  /* Product Name */
-   struct pci_dev  *pdev;  /* Pointer to the pci_dev struct */ 
+   struct pci_dev  *pdev;  /* Pointer to the pci_dev struct */
u16 vendor; /* PCI vendor ID */
u16 device; /* PCI device ID */
u16 subvendor;  /* PCI subsystem vendor ID */
@@ -419,7 +419,7 @@ struct board_t
 
 
 
-/ 
+/
  * Unit flag definitions for un_flags.
  /
 #define UN_ISOPEN  0x0001  /* Device is open   */
@@ -439,7 +439,7 @@ struct board_t
 struct device;
 
 /
- * Structure for terminal or printer unit. 
+ * Structure for terminal or printer unit.
  /
 struct un_t {
int magic;  /* Unit Magic Number.   */
@@ -457,7 +457,7 @@ struct un_t {
 };
 
 
-/ 
+/
  * Device flag definitions for ch_flags.
  /
 #define CH_PRON 0x0001  /* Printer on string*/
@@ -484,7 +484,7 @@ struct un_t {
 #define SNIFF_WAIT_SPACE 0x4
 
 
-/ 
+/
  * Channel information structure.
  /
 struct channel_t {
@@ -609,7 +609,7 @@ extern int  dgap_registerttyswithsysfs; /* Should 
we register the   */
  * Global functions declared in dgap_fep5.c, but must be hidden from
  * user space programs.
  */
-extern voiddgap_poll_tasklet(unsigned long data); 
+extern voiddgap_poll_tasklet(unsigned long data);
 extern voiddgap_cmdb(struct channel_t *ch, uchar cmd, uchar byte1, uchar 
byte2, uint ncmds);
 extern voiddgap_cmdw(struct channel_t *ch, uchar cmd, u16 word, uint 
ncmds);
 extern voiddgap_wmove(struct channel_t *ch, char *buf, uint cnt);
-- 
1.8.5.1.163.gd7aced9

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


[PATCH ver2 1/8] staging: dgap: Fixed trailing white space in dgap_downld.h and dgap_sysfs.h

2013-12-18 Thread Masanari Iida
This patch fixes "ERROR: trailing whitespace" found by
checkpatch.pl, within dgap_downld.h and dgap_sysfs.h.

Signed-off-by: Masanari Iida 
---
 drivers/staging/dgap/dgap_downld.h | 4 ++--
 drivers/staging/dgap/dgap_sysfs.h  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgap/dgap_downld.h 
b/drivers/staging/dgap/dgap_downld.h
index 271ac19..910a45d 100644
--- a/drivers/staging/dgap/dgap_downld.h
+++ b/drivers/staging/dgap/dgap_downld.h
@@ -23,7 +23,7 @@
  */
 
 /*
-** downld.h 
+** downld.h
 **  - describes the interface between the user level download process
 **and the concentrator download driver.
 */
@@ -57,7 +57,7 @@ struct downldio {
 #define DIGI_NUKE_RESET_ALL (1 << 31)
 #define DIGI_NUKE_INHIBIT_POLLER (1 << 30)
 #define DIGI_NUKE_BRD_NUMB0x0f
-   
+
 
 
 #defineDLREQ_BIOS  0
diff --git a/drivers/staging/dgap/dgap_sysfs.h 
b/drivers/staging/dgap/dgap_sysfs.h
index dde690e..151f1b3 100644
--- a/drivers/staging/dgap/dgap_sysfs.h
+++ b/drivers/staging/dgap/dgap_sysfs.h
@@ -32,7 +32,7 @@ struct un_t;
 struct pci_driver;
 struct class_device;
 
-extern void dgap_create_ports_sysfiles(struct board_t *bd); 
+extern void dgap_create_ports_sysfiles(struct board_t *bd);
 extern void dgap_remove_ports_sysfiles(struct board_t *bd);
 
 extern void dgap_create_driver_sysfiles(struct pci_driver *);
-- 
1.8.5.1.163.gd7aced9

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


[PATCH ver2 3/8] staging: dgap: Fixed trailing white space in dgap_fep5.h

2013-12-18 Thread Masanari Iida
This patch fixes "ERROR: trailing whitespace" found by
checkpatch.pl, within dgap_fep5.h

Signed-off-by: Masanari Iida 
---
 drivers/staging/dgap/dgap_fep5.h | 45 
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/dgap/dgap_fep5.h b/drivers/staging/dgap/dgap_fep5.h
index c9abc40..1fa0881 100644
--- a/drivers/staging/dgap/dgap_fep5.h
+++ b/drivers/staging/dgap/dgap_fep5.h
@@ -18,7 +18,7 @@
  *
  * NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
  *
-  
+ 
  ***   FEP Version 5 dependent definitions
  /
 
@@ -31,7 +31,7 @@
 #define START   0x0004L /* Execution start address  */
 
 #define CMDBUF  0x0d10L /* Command (cm_t) structure offset */
-#define CMDSTART0x0400L /* Start of command buffer  */   
+#define CMDSTART0x0400L /* Start of command buffer  */
 #define CMDMAX  0x0800L /* End of command buffer*/
 
 #define EVBUF   0x0d18L /* Event (ev_t) structure   */
@@ -51,7 +51,7 @@
 #define FEPSTAT POSTAREA/* OS here when FEP comes up*/
 #define NCHAN   0x0C02L /* number of ports FEP sees */
 #define PANIC   0x0C10L /* PANIC area for FEP   */
-#define KMEMEM  0x0C30L /* Memory for KME use   */   
+#define KMEMEM  0x0C30L /* Memory for KME use   */
 #define CONFIG  0x0CD0L /* Concentrator configuration info */
 #define CONFIGSIZE  0x0030  /* configuration info size  */
 #define DOWNREQ 0x0D00  /* Download request buffer pointer */
@@ -67,8 +67,8 @@
 */
 
 #define FEPCLR  0x00
-#define FEPMEM  0x02 
-#define FEPRST  0x04 
+#define FEPMEM  0x02
+#define FEPRST  0x04
 #define FEPINT  0x08
 #define FEPMASK 0x0e
 #define FEPWIN  0x80
@@ -79,13 +79,13 @@
 #define FEPTIMEOUT 20
 
 #define ENABLE_INTR0x0e04  /* Enable interrupts flag */
-#define FEPPOLL_MIN1   /* minimum of 1 millisecond */  
+#define FEPPOLL_MIN1   /* minimum of 1 millisecond */
 #define FEPPOLL_MAX20  /* maximum of 20 milliseconds */
-#define FEPPOLL0x0c26  /* Fep event poll 
interval */   
+#define FEPPOLL0x0c26  /* Fep event poll 
interval */
 
 #defineIALTPIN 0x0080  /* Input flag to swap 
DSR <-> DCD */
 
-/ 
+/
  * Command structure definition.
  /
 struct cm_t {
@@ -119,13 +119,13 @@ struct downld_t {
uchar   dl_data[1024];  /* Download data*/
 };
 
-/ 
+/
  * Per channel buffer structure
  
- *  Base Structure Entries Usage Meanings to Host   * 
- *  * 
- *W = read writeR = read only   * 
- *C = changed by commands only  * 
+ *  Base Structure Entries Usage Meanings to Host   *
+ *  *
+ *W = read writeR = read only   *
+ *C = changed by commands only  *
  *U = unknown (may be changed w/o notice)   *
  /
 struct bs_t {
@@ -138,7 +138,6 @@ struct bs_t {
volatile unsigned short  tx_head;   /* W  Tx buffer head offset 
*/
volatile unsigned short  tx_tail;   /* R  Tx buffer tail offset 
*/
volatile unsigned short  tx_max;/* W  Tx buffer size - 1
 */
- 
volatile unsigned short  rx_seg;/* W  Rx segment
*/
volatile unsigned short  rx_head;   /* W  Rx buffer head offset 
*/
volatile unsigned short  rx_tail;   /* R  Rx buffer tail offset 
*/
@@ -179,7 +178,7 @@ struct bs_t {
 
volatile unsigned char   mtran; /* C   Unreported modem trans   
*/
volatile unsigned char   orun;  /* C   Buffer overrun o

[PATCH] staging: dgap: Fix trailing whitespace in dgap_tty.c

2013-12-18 Thread Masanari Iida
This patch fixed "ERROR:trailing whitespace
found by checkpatch.pl within dgap_tty.c

Signed-off-by: Masanari Iida 
---
 drivers/staging/dgap/dgap_tty.c | 174 
 1 file changed, 87 insertions(+), 87 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..c64296f 100644
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -17,22 +17,22 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * NOTE TO LINUX KERNEL HACKERS:  DO NOT REFORMAT THIS CODE! 
+ * NOTE TO LINUX KERNEL HACKERS:  DO NOT REFORMAT THIS CODE!
  *
  * This is shared code between Digi's CVS archive and the
  * Linux Kernel sources.
  * Changing the source just for reformatting needlessly breaks
  * our CVS diff history.
  *
- * Send any bug fixes/changes to:  Eng.Linux at digi dot com. 
- * Thank you. 
+ * Send any bug fixes/changes to:  Eng.Linux at digi dot com.
+ * Thank you.
  */
 
 /
- * 
+ *
  * This file implements the tty driver functionality for the
  * FEP5 based product lines.
- * 
+ *
  
  *
  * $Id: dgap_tty.c,v 1.3 2011/06/23 12:11:31 markh Exp $
@@ -155,7 +155,7 @@ static const struct tty_operations dgap_tty_ops = {
.flush_chars = dgap_tty_flush_chars,
.ioctl = dgap_tty_ioctl,
.set_termios = dgap_tty_set_termios,
-   .stop = dgap_tty_stop, 
+   .stop = dgap_tty_stop,
.start = dgap_tty_start,
.throttle = dgap_tty_throttle,
.unthrottle = dgap_tty_unthrottle,
@@ -173,11 +173,11 @@ static const struct tty_operations dgap_tty_ops = {
 
 
 /
- *  
+ *
  * TTY Initialization/Cleanup Functions
- *  
+ *
  /
- 
+
 /*
  * dgap_tty_preinit()
  *
@@ -187,7 +187,7 @@ int dgap_tty_preinit(void)
 {
unsigned long flags;
 
-   DGAP_LOCK(dgap_global_lock, flags);  
+   DGAP_LOCK(dgap_global_lock, flags);
 
/*
 * Allocate a buffer for doing the copy from user space to
@@ -202,7 +202,7 @@ int dgap_tty_preinit(void)
DPR_INIT(("unable to allocate tmp write buf"));
return (-ENOMEM);
}
- 
+
 DGAP_UNLOCK(dgap_global_lock, flags);
 return(0);
 }
@@ -226,8 +226,8 @@ int dgap_tty_register(struct board_t *brd)
brd->SerialDriver->name_base = 0;
brd->SerialDriver->major = 0;
brd->SerialDriver->minor_start = 0;
-   brd->SerialDriver->type = TTY_DRIVER_TYPE_SERIAL; 
-   brd->SerialDriver->subtype = SERIAL_TYPE_NORMAL;   
+   brd->SerialDriver->type = TTY_DRIVER_TYPE_SERIAL;
+   brd->SerialDriver->subtype = SERIAL_TYPE_NORMAL;
brd->SerialDriver->init_termios = DgapDefaultTermios;
brd->SerialDriver->driver_name = DRVSTR;
brd->SerialDriver->flags = (TTY_DRIVER_REAL_RAW | 
TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK);
@@ -259,7 +259,7 @@ int dgap_tty_register(struct board_t *brd)
brd->PrintDriver->name_base = 0;
brd->PrintDriver->major = 0;
brd->PrintDriver->minor_start = 0;
-   brd->PrintDriver->type = TTY_DRIVER_TYPE_SERIAL;   
+   brd->PrintDriver->type = TTY_DRIVER_TYPE_SERIAL;
brd->PrintDriver->subtype = SERIAL_TYPE_NORMAL;
brd->PrintDriver->init_termios = DgapDefaultTermios;
brd->PrintDriver->driver_name = DRVSTR;
@@ -450,7 +450,7 @@ int dgap_tty_init(struct board_t *brd)
 
/*
 * Set queue water marks, interrupt mask,
-* and general tty parameters. 
+* and general tty parameters.
 */
ch->ch_tlw = tlw = ch->ch_tsize >= 2000 ? ((ch->ch_tsize * 5) / 
8) : ch->ch_tsize / 2;
 
@@ -479,7 +479,7 @@ int dgap_tty_init(struct board_t *brd)
writew(0, &(ch->ch_bs->edelay));
else
writew(100, &(ch->ch_bs->edelay));
-   
+
writeb(1, &(ch->ch_bs->idata));
}
 
@@ -506,7 +506,7 @@ void dgap_tty_post_uninit(void)
  * dgap_tty_uninit()
  *
  * Uninitialize the TTY portion of this driver.  Free all memory and
- * resources. 
+ * resources.
  */
 void dgap_tty_uninit(struct board_t *brd)
 {
@@ -611,7 +611,7 @@ static void dgap_sniff_nowait_nolock(struct channel_t *ch, 
uchar *text, uchar *b
if (n == 0) {
return;
}
-   
+
/*
 * Copy as much data as will fit.
 */
@@ -661,9 +661,9 @@ static void dgap_sniff_nowait_nolock(struct channel_t *ch, 
uchar *text, uchar *b
 /*

[PATCH] staging: dgap: Fix trailing whitespace in downld.c

2013-12-18 Thread Masanari Iida
This patch fix "ERROR: trailing whitespace found by
checkpatch.pl, whithin downld.c

Signed-off-by: Masanari Iida 
---
 drivers/staging/dgap/downld.c | 168 +-
 1 file changed, 84 insertions(+), 84 deletions(-)

diff --git a/drivers/staging/dgap/downld.c b/drivers/staging/dgap/downld.c
index 638c5da..1f4aa2e 100644
--- a/drivers/staging/dgap/downld.c
+++ b/drivers/staging/dgap/downld.c
@@ -24,7 +24,7 @@
 **
 **  This is the daemon that sends the fep, bios, and concentrator images
 **  from user space to the driver.
-** BUGS: 
+** BUGS:
 **  If the file changes in the middle of the download, you probably
 ** will get what you deserve.
 **
@@ -121,7 +121,7 @@ struct downld_t *dp;/* conc. download */
 
 
 /*
- * The same for either the FEP or the BIOS. 
+ * The same for either the FEP or the BIOS.
  *  Append the downldio header, issue the ioctl, then free
  *  the buffer.  Not horribly CPU efficient, but quite RAM efficient.
  */
@@ -136,7 +136,7 @@ void squirt(int req_type, int bdid, struct image_info *ii)
/*
 * If this binary comes from a file, stat it to see how
 * large it is. Yes, we intentionally do this each
-* time for the binary may change between loads. 
+* time for the binary may change between loads.
 */
 
if (ii->pathname) {
@@ -144,7 +144,7 @@ void squirt(int req_type, int bdid, struct image_info *ii)
 
if (sfd < 0 ) {
myperror(ii->pathname);
-   goto squirt_end; 
+   goto squirt_end;
}
 
if (fstat(sfd, &sb) == -1 ) {
@@ -152,7 +152,7 @@ void squirt(int req_type, int bdid, struct image_info *ii)
goto squirt_end;
}
 
-   ii->len = sb.st_size ; 
+   ii->len = sb.st_size;
}
 
size_buf = ii->len + sizeof(struct downldio);
@@ -165,7 +165,7 @@ void squirt(int req_type, int bdid, struct image_info *ii)
dliop = (struct downldio *) malloc(size_buf);
 
if (dliop == NULL) {
-   fprintf(stderr,"%s: can't get %d bytes of memory; aborting\n", 
+   fprintf(stderr,"%s: can't get %d bytes of memory; aborting\n",
pgm, size_buf);
exit (1);
}
@@ -185,7 +185,7 @@ void squirt(int req_type, int bdid, struct image_info *ii)
 
if (debugflag)
printf("sending %d bytes of %s %s from %s\n",
-   ii->len, 
+   ii->len,
(ii->type == IFEP) ? "FEP" : (ii->type == IBIOS) ? 
"BIOS" : "CONFIG",
ii->name ? ii->name : "",
(ii->pathname) ? ii->pathname : "internal image" );
@@ -209,13 +209,13 @@ squirt_end:
 
 
 /*
- *  See if we need to reload the download image in core 
- * 
+ *  See if we need to reload the download image in core
+ *
  */
 void consider_file_rescan(struct image_info *ii)
 {
-   int sfd ; 
-   int len ; 
+   int sfd;
+   int len;
struct stat sb;
 
/* This operation only makes sense when we're working from a file */
@@ -232,14 +232,14 @@ void consider_file_rescan(struct image_info *ii)
myperror(ii->pathname);
exit(1);
}
-   
-   /* If the file hasn't changed since we last did this, 
-* and we have not done a free() on the image, bail  
+
+   /* If the file hasn't changed since we last did this,
+* and we have not done a free() on the image, bail
 */
if (ii->image && (sb.st_mtime == ii->mtime))
goto end_rescan;
 
-   ii->len = len = sb.st_size ; 
+   ii->len = len = sb.st_size;
 
/* Record the timestamp of the file */
ii->mtime = sb.st_mtime;
@@ -249,12 +249,12 @@ void consider_file_rescan(struct image_info *ii)
 * have a memory leak.
 */
if ( ii->image ) {
-   free( ii->image ); 
+   free( ii->image );
/* ii->image = NULL; */ /* not necessary */
}
 
-   /* This image will be kept only long enough for the 
-* download to happen.  After sending the last block, 
+   /* This image will be kept only long enough for the
+* download to happen.  After sending the last block,
 * it will be freed
 */
ii->image = malloc(len) ;
@@ -267,14 +267,14 @@ void consider_file_rescan(struct image_info *ii)
}
 
if (read(sfd, ii->image, len) < len) {
-   fprintf(stderr,"%s: read error on %s; aborting\n", 
+   fprintf(stderr,"%s: read error on %s; aborti

[PATCH] Staging: bcm: DDRInit: fixed up some commenting issues.

2013-12-18 Thread Gary Rookard
I have deleated some unintelligible comments, and made a
few minor white space corrections.

Signed-off-by: Gary Alan Rookard
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 149 +-
 1 file changed, 74 insertions(+), 75 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index d1aaa53..0f03d7e 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,9 +5,9 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-/* DDR INIT-133Mhz */
+/* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
@@ -29,17 +29,17 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* 
DPLL Clock Setting *
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},/* POP - 0x00020001 Normal 0x01020001 */
-   {0x0F007020, 0x04030107}, /* Normal - 0x04030107 POP - 0x05030107 */
+   {0x0F00701c, 0x01020001},
+   {0x0F007020, 0x04030107},
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},/* ROB- 0x0205050a,//0x0206060a */
+   {0x0F00702c, 0x0206060a},
{0x0F007030, 0x0500},
{0x0F007034, 0x0003},
-   {0x0F007038, 0x110a0200},/* ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200 
*/
-   {0x0F00703C, 0x02101010},/* ROB - 0x02101010,//0x02101018}, */
-   {0x0F007040, 0x45751200},/* ROB - 0x45751200,//0x450f1200}, */
-   {0x0F007044, 0x110a0d00},/* ROB - 0x110a0d00//0x111f0d00 */
+   {0x0F007038, 0x110a0200},
+   {0x0F00703C, 0x02101010},
+   {0x0F007040, 0x45751200},
+   {0x0F007044, 0x110a0d00},
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -65,7 +65,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* 
DPLL Clock Setting *
 };
 /* 80Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -117,14 +117,13 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = 
{/* DPLL Clock Setting */
 };
 /* 100Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7008},
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F13E3F},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
/* Changed source for X-bar and MIPS clock to APLL */
-   /* 0x0f000840,0x0FFF1800, */
{0x0f000840, 0x0FFF1B00},
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
@@ -142,8 +141,8 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* 
DPLL Clock Setting *
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001}, /* POP - 0x0002 Normal 0x0102 */
-   {0x0F007020, 0x04020107},/* Normal - 0x04030107 POP - 0x05030107 */
+   {0x0F00701c, 0x01020001},
+   {0x0F007020, 0x04020107},
{0x0F007024, 0x0007},
{0x0F007028, 0x01020201},
{0x0F00702c, 0x0204040A},
@@ -153,7 +152,7 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* 
DPLL Clock Setting *
{0x0F00703C, 0x02030320},
{0x0F007040, 0x6E7F1200},
{0x0F007044, 0x01190A00},
-   {0x0F007048, 0x06120305},/* 0x02690204 // 0x06120305 */
+   {0x0F007048, 0x06120305},
{0x0F00704c, 0x},
{0x0F007050, 0x001C},
{0x0F007054, 0x},
@@ -190,7 +189,7 @@ static struct bcm_ddr_setting asDPLL_266MHZ[] = {
 };
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {/* DPLL Clock 
Setting */
+static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000810, 0x0F95},
{0x0f000810, 0x0F95},
@@ -214,17 +213,17 @@ static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = 
{/* DPLL Clock Setting
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},/* POP - 0x00020001 Normal 0x01020001 */
-

[GIT PULL] Staging driver fixes for 3.13-rc5

2013-12-18 Thread Greg KH
The following changes since commit 319e2e3f63c348a9b66db4667efa73178e18b17d:

  Linux 3.13-rc4 (2013-12-15 12:31:33 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-3.13-rc5

for you to fetch changes up to fd6040ed57d8f200ab0cc2abf706c54995a48370:

  imx-drm: imx-drm-core: improve safety of imx_drm_add_crtc() (2013-12-17 
17:12:55 -0800)


Staging driver fixes for 3.13-rc5

Here are a number of staging, and iio, fixes for 3.13-rc5 that resolve
some reported issues.

Signed-off-by: Greg Kroah-Hartman 


Beomho Seo (1):
  iio: cm36651: Changed return value of read function

Greg Kroah-Hartman (1):
  Merge tag 'iio-fixes-for-3.13c' of git://git.kernel.org/.../jic23/iio 
into staging-linus

H Hartley Sweeten (1):
  staging: comedi: drivers: fix return value of comedi_load_firmware()

Ian Abbott (1):
  staging: comedi: 8255_pci: fix for newer PCI-DIO48H

Jonathan Cameron (3):
  staging:iio:mag:hmc5843 fix incorrect endianness of channel as a result 
of missuse of the IIO_ST macro.
  iio:imu:adis16400 fix pressure channel scan type
  iio:adc:ad7887 Fix channel reported endianness from cpu to big endian

Russell King (7):
  imx-drm: imx-drm-core: fix error cleanup path for imx_drm_add_crtc()
  imx-drm: imx-drm-core: fix DRM cleanup paths
  imx-drm: ipu-v3: fix potential CRTC device registration race
  imx-drm: imx-tve: don't call sleeping functions beneath enable_lock 
spinlock
  imx-drm: imx-drm-core: use defined constant for number of CRTCs.
  imx-drm: imx-drm-core: make imx_drm_crtc_register() safer
  imx-drm: imx-drm-core: improve safety of imx_drm_add_crtc()

 drivers/iio/adc/ad7887.c| 16 ++--
 drivers/iio/imu/adis16400_core.c|  7 +-
 drivers/iio/light/cm36651.c |  2 +-
 drivers/staging/comedi/drivers.c|  2 +-
 drivers/staging/comedi/drivers/8255_pci.c   | 15 ---
 drivers/staging/iio/magnetometer/hmc5843.c  |  7 +-
 drivers/staging/imx-drm/imx-drm-core.c  | 39 +
 drivers/staging/imx-drm/imx-tve.c   |  9 ---
 drivers/staging/imx-drm/ipu-v3/ipu-common.c | 32 +++
 9 files changed, 85 insertions(+), 44 deletions(-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 1/2] staging:bcm: Removed developer debug prints in InterfaceDld.c

2013-12-18 Thread Gokulnath A
Removed the developer debug prints BCM_DEBUG_PRINT()
as per the TODO list, also removed braces for the
if-statement to match coding style

Signed-off-by: Gokulnath A 
---
 drivers/staging/bcm/InterfaceDld.c | 70 --
 1 file changed, 14 insertions(+), 56 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceDld.c 
b/drivers/staging/bcm/InterfaceDld.c
index 463bdee..04c57c6 100644
--- a/drivers/staging/bcm/InterfaceDld.c
+++ b/drivers/staging/bcm/InterfaceDld.c
@@ -20,18 +20,10 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, 
unsigned int on_chip_loc)
MAX_TRANSFER_CTRL_BYTE_USB, &pos);
set_fs(oldfs);
if (len <= 0) {
-   if (len < 0) {
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-   DBG_TYPE_INITEXIT, MP_INIT,
-   DBG_LVL_ALL, "len < 0");
+   if (len < 0)
errno = len;
-   } else {
+   else
errno = 0;
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-   DBG_TYPE_INITEXIT, MP_INIT,
-   DBG_LVL_ALL,
-   "Got end of file!");
-   }
break;
}
/* BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_INITEXIT, MP_INIT,
@@ -39,12 +31,8 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, 
unsigned int on_chip_loc)
 *MAX_TRANSFER_CTRL_BYTE_USB);
 */
errno = InterfaceWRM(psIntfAdapter, on_chip_loc, buff, len);
-   if (errno) {
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-   DBG_TYPE_PRINTK, 0, 0,
-   "WRM Failed! status: %d", errno);
+   if (errno)
break;
-   }
on_chip_loc += MAX_TRANSFER_CTRL_BYTE_USB;
}
 
@@ -85,27 +73,21 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
fw_down++;
 
if (len <= 0) {
-   if (len < 0) {
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, 
DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "len < 0");
+   if (len < 0)
errno = len;
-   } else {
+   else
errno = 0;
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, 
DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Got end of file!");
-   }
break;
}
 
bytes = InterfaceRDM(psIntfAdapter, on_chip_loc, buff_readback, 
len);
if (bytes < 0) {
Status = bytes;
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, 
DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "RDM of len %d Failed! %d", len, reg);
goto exit;
}
reg++;
if ((len-sizeof(unsigned int)) < 4) {
if (memcmp(buff_readback, buff, len)) {
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, 
DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Firmware Download is not proper %d", 
fw_down);
-   BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, 
DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Length is: %d", len);
Status = -EIO;
goto exit;
}
@@ -114,9 +96,6 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
 
while (len) {
if (*(unsigned int *)&buff_readback[len] != 
*(unsigned int *)&buff[len]) {
-   
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, MP_INIT, 
DBG_LVL_ALL, "Firmware Download is not proper %d", fw_down);
-   
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, MP_INIT, 
DBG_LVL_ALL, "Val from Binary %x, Val From Read Back %x ", *(unsigned int 
*)&buff[len], *(unsigned int*)&buff_readback[len]);
-   
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, MP_INIT, 
DBG_LVL_ALL, "len =%x!!!", len);
Status = -EIO;
goto exit;
}
@@ -160,10 +139,8 @@ static int bcm_download_config_file(struct 
bcm_mini_adapter *Adapter, struct bcm
BcmInitNVM(Adapter);
retval

[PATCH v3 0/2] staging: bcm: Fixing coding style in InterfaceDld.c

2013-12-18 Thread Gokulnath A
As per comments from Greg KH and Dan Carpenter updated and
split the patch series.

Gokulnath A (2):
  staging:bcm: Removed developer debug prints in InterfaceDld.c
  staging: bcm: line over 80 characters in InterfaceDld.c

 drivers/staging/bcm/InterfaceDld.c | 140 +
 1 file changed, 63 insertions(+), 77 deletions(-)

-- 
1.8.1.2

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


[PATCH v3 2/2] staging: bcm: line over 80 characters in InterfaceDld.c

2013-12-18 Thread Gokulnath A
Fixed all the line over 80 characters warning found by
checkpatch.pl script.

Signed-off-by: Gokulnath A 
---
 drivers/staging/bcm/InterfaceDld.c | 70 ++
 1 file changed, 49 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceDld.c 
b/drivers/staging/bcm/InterfaceDld.c
index 04c57c6..005e460 100644
--- a/drivers/staging/bcm/InterfaceDld.c
+++ b/drivers/staging/bcm/InterfaceDld.c
@@ -40,7 +40,8 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, 
unsigned int on_chip_loc)
return errno;
 }
 
-int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int 
on_chip_loc)
+int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp,
+   unsigned int on_chip_loc)
 {
char *buff, *buff_readback;
unsigned int reg = 0;
@@ -68,7 +69,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
while (1) {
oldfs = get_fs();
set_fs(get_ds());
-   len = vfs_read(flp, (void __force __user *)buff, 
MAX_TRANSFER_CTRL_BYTE_USB, &pos);
+   len = vfs_read(flp, (void __force __user *)buff,
+   MAX_TRANSFER_CTRL_BYTE_USB, &pos);
set_fs(oldfs);
fw_down++;
 
@@ -80,7 +82,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
break;
}
 
-   bytes = InterfaceRDM(psIntfAdapter, on_chip_loc, buff_readback, 
len);
+   bytes = InterfaceRDM(psIntfAdapter, on_chip_loc,
+   buff_readback, len);
if (bytes < 0) {
Status = bytes;
goto exit;
@@ -95,7 +98,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file 
*flp, unsigned int on_c
len -= 4;
 
while (len) {
-   if (*(unsigned int *)&buff_readback[len] != 
*(unsigned int *)&buff[len]) {
+   if (*(unsigned int *)&buff_readback[len] !=
+*(unsigned int *)&buff[len]) {
Status = -EIO;
goto exit;
}
@@ -111,13 +115,15 @@ exit:
return Status;
 }
 
-static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct 
bcm_firmware_info *psFwInfo)
+static int bcm_download_config_file(struct bcm_mini_adapter *Adapter,
+   struct bcm_firmware_info *psFwInfo)
 {
int retval = STATUS_SUCCESS;
B_UINT32 value = 0;
 
if (Adapter->pstargetparams == NULL) {
-   Adapter->pstargetparams = kmalloc(sizeof(struct 
bcm_target_params), GFP_KERNEL);
+   Adapter->pstargetparams =
+   kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL);
if (Adapter->pstargetparams == NULL)
return -ENOMEM;
}
@@ -125,7 +131,9 @@ static int bcm_download_config_file(struct bcm_mini_adapter 
*Adapter, struct bcm
if (psFwInfo->u32FirmwareLength != sizeof(struct bcm_target_params))
return -EIO;
 
-   retval = copy_from_user(Adapter->pstargetparams, 
psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength);
+   retval = copy_from_user(Adapter->pstargetparams,
+   psFwInfo->pvMappedFirmwareAddress,
+   psFwInfo->u32FirmwareLength);
if (retval) {
kfree(Adapter->pstargetparams);
Adapter->pstargetparams = NULL;
@@ -142,13 +150,15 @@ static int bcm_download_config_file(struct 
bcm_mini_adapter *Adapter, struct bcm
if (retval)
return retval;
 
-   if (Adapter->LEDInfo.led_thread_running & 
BCM_LED_THREAD_RUNNING_ACTIVELY) {
+   if (Adapter->LEDInfo.led_thread_running &
+   BCM_LED_THREAD_RUNNING_ACTIVELY) {
Adapter->LEDInfo.bLedInitDone = false;
Adapter->DriverState = DRIVER_INIT;
wake_up(&Adapter->LEDInfo.notify_led_event);
}
 
-   if (Adapter->LEDInfo.led_thread_running & 
BCM_LED_THREAD_RUNNING_ACTIVELY) {
+   if (Adapter->LEDInfo.led_thread_running &
+   BCM_LED_THREAD_RUNNING_ACTIVELY) {
Adapter->DriverState = FW_DOWNLOAD;
wake_up(&Adapter->LEDInfo.notify_led_event);
}
@@ -159,8 +169,10 @@ static int bcm_download_config_file(struct 
bcm_mini_adapter *Adapter, struct bcm
return retval;
 
value = 0;
-   wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, 
sizeof(value));
-   wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, 
sizeof(value));
+   wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4,
+  

[PATCH net-next] hyperv: Add support for Virtual Receive Side Scaling (vRSS)

2013-12-18 Thread Haiyang Zhang
This feature allows multiple channels to be used by each virtual NIC.
It is available on Hyper-V host 2012 R2.

Signed-off-by: Haiyang Zhang 
Reviewed-by: K. Y. Srinivasan 
---
 drivers/net/hyperv/hyperv_net.h   |  159 ++
 drivers/net/hyperv/netvsc.c   |  120 --
 drivers/net/hyperv/netvsc_drv.c   |   94 +++-
 drivers/net/hyperv/rndis_filter.c |  171 -
 4 files changed, 511 insertions(+), 33 deletions(-)

diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index a26eecb..055ab94 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -28,6 +28,98 @@
 #include 
 #include 
 
+/* RSS related */
+#define OID_GEN_RECEIVE_SCALE_CAPABILITIES 0x00010203  /* query only */
+#define OID_GEN_RECEIVE_SCALE_PARAMETERS 0x00010204  /* query and set */
+
+#define NDIS_OBJECT_TYPE_RSS_CAPABILITIES 0x88
+#define NDIS_OBJECT_TYPE_RSS_PARAMETERS 0x89
+
+#define NDIS_RECEIVE_SCALE_CAPABILITIES_REVISION_2 2
+#define NDIS_RECEIVE_SCALE_PARAMETERS_REVISION_2 2
+
+struct ndis_obj_header {
+   u8 type;
+   u8 rev;
+   u16 size;
+} __packed;
+
+
+/* ndis_recv_scale_cap/cap_flag */
+#define NDIS_RSS_CAPS_MESSAGE_SIGNALED_INTERRUPTS 0x0100
+#define NDIS_RSS_CAPS_CLASSIFICATION_AT_ISR   0x0200
+#define NDIS_RSS_CAPS_CLASSIFICATION_AT_DPC   0x0400
+#define NDIS_RSS_CAPS_USING_MSI_X 0x0800
+#define NDIS_RSS_CAPS_RSS_AVAILABLE_ON_PORTS  0x1000
+#define NDIS_RSS_CAPS_SUPPORTS_MSI_X  0x2000
+#define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV4  0x0100
+#define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV6  0x0200
+#define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV6_EX   0x0400
+
+struct ndis_recv_scale_cap { /* NDIS_RECEIVE_SCALE_CAPABILITIES */
+   struct ndis_obj_header hdr;
+   u32 cap_flag;
+   u32 num_int_msg;
+   u32 num_recv_que;
+   u16 num_indirect_tabent;
+} __packed;
+
+
+/* ndis_recv_scale_param flags */
+#define NDIS_RSS_PARAM_FLAG_BASE_CPU_UNCHANGED 0x0001
+#define NDIS_RSS_PARAM_FLAG_HASH_INFO_UNCHANGED0x0002
+#define NDIS_RSS_PARAM_FLAG_ITABLE_UNCHANGED   0x0004
+#define NDIS_RSS_PARAM_FLAG_HASH_KEY_UNCHANGED 0x0008
+#define NDIS_RSS_PARAM_FLAG_DISABLE_RSS0x0010
+
+/* Hash info bits */
+#define NDIS_HASH_FUNC_TOEPLITZ 0x0001
+#define NDIS_HASH_IPV4  0x0100
+#define NDIS_HASH_TCP_IPV4  0x0200
+#define NDIS_HASH_IPV6  0x0400
+#define NDIS_HASH_IPV6_EX   0x0800
+#define NDIS_HASH_TCP_IPV6  0x1000
+#define NDIS_HASH_TCP_IPV6_EX   0x2000
+
+#define NDIS_RSS_INDIRECTION_TABLE_MAX_SIZE_REVISION_2 (128 * 4)
+#define NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2   40
+
+#define ITAB_NUM 128
+#define HASH_KEYLEN NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2
+extern u8 hash_key[];
+
+struct ndis_recv_scale_param { /* NDIS_RECEIVE_SCALE_PARAMETERS */
+   struct ndis_obj_header hdr;
+
+   /* Qualifies the rest of the information */
+   u16 flag;
+
+   /* The base CPU number to do receive processing. not used */
+   u16 base_cpu_number;
+
+   /* This describes the hash function and type being enabled */
+   u32 hashinfo;
+
+   /* The size of indirection table array */
+   u16 indirect_tabsize;
+
+   /* The offset of the indirection table from the beginning of this
+* structure
+*/
+   u32 indirect_taboffset;
+
+   /* The size of the hash secret key */
+   u16 hashkey_size;
+
+   /* The offset of the secret key from the beginning of this structure */
+   u32 kashkey_offset;
+
+   u32 processor_masks_offset;
+   u32 num_processor_masks;
+   u32 processor_masks_entry_size;
+};
+
+
 /* Fwd declaration */
 struct hv_netvsc_packet;
 
@@ -38,6 +130,8 @@ struct xferpage_packet {
 
/* # of netvsc packets this xfer packet contains */
u32 count;
+
+   struct vmbus_channel *channel;
 };
 
 /*
@@ -53,6 +147,9 @@ struct hv_netvsc_packet {
bool is_data_pkt;
u16 vlan_tci;
 
+   bool is_hash;
+   u32 hash;
+
/*
 * Valid only for receives when we break a xfer page packet
 * into multiple netvsc packets
@@ -118,6 +215,7 @@ void netvsc_linkstatus_callback(struct hv_device 
*device_obj,
unsigned int status);
 int netvsc_recv_callback(struct hv_device *device_obj,
struct hv_netvsc_packet *packet);
+extern void netvsc_channel_cb(void *context);
 int rndis_filter_open(struct hv_device *dev);
 int rndis_filter_close(struct hv_device *dev);
 int rndis_filter_device_add(struct hv_device *dev,
@@ -134,11 +232,15 @@ int rndis_filter_send(struct hv_device *dev,
 int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter);
 int rndis_filter_set_device_mac(struct hv_device *hdev, char *mac);
 
+extern int ring_

Re: [PATCH ver2, 07/8] stating: dgap: Fixed trailing white space in dgap_sysfs.c

2013-12-18 Thread Greg KH
On Thu, Dec 19, 2013 at 01:05:27AM +0900, Masanari Iida wrote:
> This patch fixes "ERROR: trailing whitespace" found by
> checkpatch.pl, within dgap_sysfs.c
> 
> Signed-off-by: Masanari Iida 

I see a bunch of patches missing in this series, can you please resend
the whole series, as a new one, so that I can apply them that way?

thanks,

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


[PATCH] silicom: fixed checkpatch issues in bypass.c

2013-12-18 Thread Michael Hoefler
This patch cleans up bypass.c of the silicom driver in the staging area. All
errors and most warnings according to checkpatch.pl should be fixed.

There are still two warnings left related to too many leading tabs at nested
blocks. I did not touch this issue because the code needs really some
refactoring and since i don't have the hardware to test the code. So this patch
does not change the business logic in any way.

But we address different types of problems.
For example:
 - missing braces
 - lines over 80 characters
 - unnecessary forward declarations
 - assignment in if condition
 - whitespace stuff
 - a C++ one line comment
 - parenthesis at return statements
 - missing __init and __exit macros

Signed-off-by: Michael Hoefler 
Signed-off-by: Christoph Kohl 
---
 drivers/staging/silicom/bypasslib/bypass.c | 168 +++--
 1 file changed, 90 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bypass.c 
b/drivers/staging/silicom/bypasslib/bypass.c
index ba0d23a..99c1b50 100644
--- a/drivers/staging/silicom/bypasslib/bypass.c
+++ b/drivers/staging/silicom/bypasslib/bypass.c
@@ -7,11 +7,11 @@
 /* the Free Software Foundation, located in the file LICENSE. 
*/
 /*
*/
 /*
*/
-/* bypass.c
*/
+/* bypass.c   
*/
 /*
*/
 
/**/
 
-#if defined(CONFIG_SMP) && ! defined(__SMP__)
+#if defined(CONFIG_SMP) && !defined(__SMP__)
 #define __SMP__
 #endif
 
@@ -22,7 +22,7 @@
 #include 
 #include 
 
-#include// struct device, and other headers
+#include/* struct device, and other headers */
 #include 
 #include 
 #include 
@@ -40,9 +40,6 @@ MODULE_AUTHOR("www.silicom.co.il");
 
 MODULE_LICENSE("GPL");
 
-int init_lib_module(void);
-void cleanup_lib_module(void);
-
 static int do_cmd(struct net_device *dev, struct ifreq *ifr, int cmd, int 
*data)
 {
int ret = -1;
@@ -52,9 +49,12 @@ static int do_cmd(struct net_device *dev, struct ifreq *ifr, 
int cmd, int *data)
bypass_cb = (struct if_bypass *)ifr;
bypass_cb->cmd = cmd;
bypass_cb->data = *data;
-   if ((dev->netdev_ops) && (ioctl = dev->netdev_ops->ndo_do_ioctl)) {
-   ret = ioctl(dev, ifr, SIOCGIFBYPASS);
-   *data = bypass_cb->data;
+   if (dev->netdev_ops) {
+   ioctl = dev->netdev_ops->ndo_do_ioctl;
+   if (ioctl) {
+   ret = ioctl(dev, ifr, SIOCGIFBYPASS);
+   *data = bypass_cb->data;
+   }
}
 
return ret;
@@ -66,8 +66,8 @@ static int doit(int cmd, int if_index, int *data)
int ret = -1;
struct net_device *dev;
struct net_device *n;
-   for_each_netdev_safe(&init_net, dev, n) {
 
+   for_each_netdev_safe(&init_net, dev, n) {
if (dev->ifindex == if_index) {
ret = do_cmd(dev, &ifr, cmd, data);
if (ret < 0)
@@ -82,56 +82,65 @@ static int doit(int cmd, int if_index, int *data)
 #define bp_symbol_get(fn_name) symbol_get(fn_name)
 #define bp_symbol_put(fn_name) symbol_put(fn_name)
 
-#define SET_BPLIB_INT_FN(fn_name, arg_type, arg, ret) \
-({ int (* fn_ex)(arg_type)=NULL; \
-fn_ex=bp_symbol_get(fn_name##_sd); \
-   if(fn_ex) {  \
-ret= fn_ex(arg); \
-   bp_symbol_put(fn_name##_sd); \
-   } else ret=-1; \
-})
-
-#define  SET_BPLIB_INT_FN2(fn_name, arg_type, arg, arg_type1, arg1, ret) \
-({ int (* fn_ex)(arg_type,arg_type1)=NULL; \
-fn_ex=bp_symbol_get(fn_name##_sd); \
-   if(fn_ex) {  \
-ret= fn_ex(arg,arg1); \
-bp_symbol_put(fn_name##_sd); \
-   } else ret=-1; \
-})
-#define SET_BPLIB_INT_FN3(fn_name, arg_type, arg, arg_type1, arg1,arg_type2, 
arg2, ret) \
-({ int (* fn_ex)(arg_type,arg_type1, arg_type2)=NULL; \
-fn_ex=bp_symbol_get(fn_name##_sd); \
-   if(fn_ex) {  \
-ret= fn_ex(arg,arg1,arg2); \
-bp_symbol_put(fn_name##_sd); \
-   } else ret=-1; \
-})
-
-#define DO_BPLIB_GET_ARG_FN(fn_name,ioctl_val, if_index) \
-({int data, ret=0; \
-if(is_dev_sd(if_index)){ \
-SET_BPLIB_INT_FN(fn_name, int, if_index, ret); \
-return ret; \
-}  \
-return doit(ioctl_val,if_index, &data); \
-})
-
-#define DO_BPLIB_SET_ARG_FN(fn_name,ioctl_val,if_index,arg) \
-({int data, ret=0; \
-if(is_dev_sd(if_index)){ \
-SET_BPLIB_INT_FN2(fn_name, int, if_index, int, arg, ret); \
-return ret; \
-}  \
-   data=arg; \
- 

Re: [patch v2] [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()

2013-12-18 Thread Laurent Pinchart
Hi Dan,

Thank you for the patch.

On Wednesday 18 December 2013 10:29:24 Dan Carpenter wrote:
> The spin_lock_irqsave() macro is not nestable.  The second call will
> overwrite the first record of "flags" so the IRQs will not be enabled
> correctly at the end of the function.
> 
> In the current code, this function is always called from the IRQ handler
> so everything works fine and this fix doesn't change anything.
> 
> Signed-off-by: Dan Carpenter 

Acked-by: Laurent Pinchart 

and applied to my tree. I'll send a pull request shortly.

> ---
> v2:  Updated the change log
> 
> diff --git a/drivers/staging/media/omap4iss/iss_video.c
> b/drivers/staging/media/omap4iss/iss_video.c index
> 766491e6a8d0..c9b71c750b15 100644
> --- a/drivers/staging/media/omap4iss/iss_video.c
> +++ b/drivers/staging/media/omap4iss/iss_video.c
> @@ -451,9 +451,9 @@ struct iss_buffer *omap4iss_video_buffer_next(struct
> iss_video *video) }
> 
>   if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input != NULL) {
> - spin_lock_irqsave(&pipe->lock, flags);
> + spin_lock(&pipe->lock);
>   pipe->state &= ~ISS_PIPELINE_STREAM;
> - spin_unlock_irqrestore(&pipe->lock, flags);
> + spin_unlock(&pipe->lock);
>   }
> 
>   buf = list_first_entry(&video->dmaqueue, struct iss_buffer,

-- 
Regards,

Laurent Pinchart

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


Re: [PATCH] silicom: fixed checkpatch issues in bypass.c

2013-12-18 Thread Joe Perches
On Thu, 2013-12-19 at 00:45 +0100, Michael Hoefler wrote:
> This patch cleans up bypass.c of the silicom driver in the staging area. All
> errors and most warnings according to checkpatch.pl should be fixed.

When you make patch against staging, please use the
latest staging-next branch of the staging tree.

https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/

This tree is also available part of the -next tree.
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/


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


Re: [PATCH] silicom: fixed checkpatch issues in bypass.c

2013-12-18 Thread Greg Kroah-Hartman
On Thu, Dec 19, 2013 at 12:45:09AM +0100, Michael Hoefler wrote:
> This patch cleans up bypass.c of the silicom driver in the staging area. All
> errors and most warnings according to checkpatch.pl should be fixed.
> 
> There are still two warnings left related to too many leading tabs at nested
> blocks. I did not touch this issue because the code needs really some
> refactoring and since i don't have the hardware to test the code. So this 
> patch
> does not change the business logic in any way.
> 
> But we address different types of problems.
> For example:
>  - missing braces
>  - lines over 80 characters
>  - unnecessary forward declarations
>  - assignment in if condition
>  - whitespace stuff
>  - a C++ one line comment
>  - parenthesis at return statements
>  - missing __init and __exit macros

You are doing a lot of different things here, making this hard to
review.

How about splitting this up into at least two different patches, one
that does the code formatting cleanups, and the other the "logical"
changes needed to make codingstyle happy?

Remember, one patch should only do one thing, if you have to list a
series of things a single patch does, that's not good, it should be
split up.

thanks,

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