[PATCH] Block: rsxx: core: Removed depricated flag IRQF_DISABLED

2014-07-02 Thread Kumar Gaurav
IRQF_DISABLED flag is depricated and should be removed.

Signed-off-by: Kumar Gaurav 
---
 drivers/block/rsxx/core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index a8de2ee..ddb6b2b 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -886,7 +886,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
"Failed to enable MSI\n");
}
 
-   st = request_irq(dev->irq, rsxx_isr, IRQF_DISABLED | IRQF_SHARED,
+   st = request_irq(dev->irq, rsxx_isr, IRQF_SHARED,
 DRIVER_NAME, card);
if (st) {
dev_err(CARD_TO_DEV(card),
-- 
1.7.9.5

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


[PATCH] Block: rsxx: core: Removed depricated flag IRQF_DISABLED

2014-07-02 Thread Kumar Gaurav
IRQF_DISABLED flag is depricated and should be removed.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/block/rsxx/core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index a8de2ee..ddb6b2b 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -886,7 +886,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
Failed to enable MSI\n);
}
 
-   st = request_irq(dev-irq, rsxx_isr, IRQF_DISABLED | IRQF_SHARED,
+   st = request_irq(dev-irq, rsxx_isr, IRQF_SHARED,
 DRIVER_NAME, card);
if (st) {
dev_err(CARD_TO_DEV(card),
-- 
1.7.9.5

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


Clarification needed on use of put_user inside a loop

2014-04-25 Thread Kumar Gaurav

Hi All,

function put_user() is used to transfer small bytes of data (1-8 byte) 
from kernel space to user space and before transferring, it checks for 
the user's access over that memory area (in user space of-course) using 
function access_ok(). function __put_user() is used for same purpose but 
it skips checking permission part.


Hence when transferring data involves loops then checking permission 
(using access_ok()) once should be good to go then after we can simply 
transfer data using __put_user(), instead of using put_user() itself in 
loop.


I have  found some codes in the driver which use put_user() in loop. Can 
we avoid the overhead of checking the same memory area( where put_user() 
writes) again n again using __put_user() in side loop and checking 
permission using access_ok before entering the loop?


Below is one of the codes I found.
File Name:sound/pci/hda/patch_hdmi.c

Code
---
for (i = 0; i < ARRAY_SIZE(channel_allocations); i++, cap++) { //line 
number 1928

int chs_bytes = chs * 4;
int type = 
spec->ops.chmap_cea_alloc_validate_get_type(cap, chs);

unsigned int tlv_chmap[8];

if (type < 0)
continue;
if (size < 8)
return -ENOMEM;
if (put_user(type, dst) ||
put_user(chs_bytes, dst + 1))
return -EFAULT;
dst += 2;
size -= 8;
count += 8;
if (size < chs_bytes)
return -ENOMEM;
size -= chs_bytes;
count += chs_bytes;
spec->ops.cea_alloc_to_tlv_chmap(cap, 
tlv_chmap, chs);

if (copy_to_user(dst, tlv_chmap, chs_bytes))
return -EFAULT;
dst += chs;
}
---
Please revert with comment on whether I am correct or not. If yes, I'll 
submit the patches for upgrading codes to skip the overhead of checking 
memory area for permission.


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


Clarification needed on use of put_user inside a loop

2014-04-25 Thread Kumar Gaurav

Hi All,

function put_user() is used to transfer small bytes of data (1-8 byte) 
from kernel space to user space and before transferring, it checks for 
the user's access over that memory area (in user space of-course) using 
function access_ok(). function __put_user() is used for same purpose but 
it skips checking permission part.


Hence when transferring data involves loops then checking permission 
(using access_ok()) once should be good to go then after we can simply 
transfer data using __put_user(), instead of using put_user() itself in 
loop.


I have  found some codes in the driver which use put_user() in loop. Can 
we avoid the overhead of checking the same memory area( where put_user() 
writes) again n again using __put_user() in side loop and checking 
permission using access_ok before entering the loop?


Below is one of the codes I found.
File Name:sound/pci/hda/patch_hdmi.c

Code
---
for (i = 0; i  ARRAY_SIZE(channel_allocations); i++, cap++) { //line 
number 1928

int chs_bytes = chs * 4;
int type = 
spec-ops.chmap_cea_alloc_validate_get_type(cap, chs);

unsigned int tlv_chmap[8];

if (type  0)
continue;
if (size  8)
return -ENOMEM;
if (put_user(type, dst) ||
put_user(chs_bytes, dst + 1))
return -EFAULT;
dst += 2;
size -= 8;
count += 8;
if (size  chs_bytes)
return -ENOMEM;
size -= chs_bytes;
count += chs_bytes;
spec-ops.cea_alloc_to_tlv_chmap(cap, 
tlv_chmap, chs);

if (copy_to_user(dst, tlv_chmap, chs_bytes))
return -EFAULT;
dst += chs;
}
---
Please revert with comment on whether I am correct or not. If yes, I'll 
submit the patches for upgrading codes to skip the overhead of checking 
memory area for permission.


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


Re: [PATCH] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-19 Thread Kumar Gaurav

Hi All,

Any update on below patch. Do i need to make any modification?

On Thursday 17 April 2014 09:25 PM, Kumar Gaurav wrote:

dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav 
---
  drivers/staging/dgap/dgap_tty.c |   17 +
  1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
  #include /* For copy_from_user/copy_to_user */
  #include  /* For read[bwl]/write[bwl] */
  #include 
-
+#include
  #include "dgap_driver.h"
  #include "dgap_tty.h"
  #include "dgap_types.h"
@@ -61,18 +61,12 @@
  #include "dgap_conf.h"
  #include "dgap_sysfs.h"
  
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)

-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
  /*
   * internal variables
   */
  static struct board_t *dgap_BoardsByMajor[256];
  static uchar  *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
  
  /*

   * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(_TmpWriteSem)) {
+   if (mutex_lock_interruptible(_TmpWriteSem))
return (-EINTR);
-   }
  
  		if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) buf, count)) {

-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
printk("Write: Copy from user failed!\n");
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
  
  	if (from_user) {

DGAP_UNLOCK(ch->ch_lock, lock_flags);
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
}
else {
DGAP_UNLOCK(ch->ch_lock, lock_flags);


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


Re: [PATCH] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-19 Thread Kumar Gaurav

Hi All,

Any update on below patch. Do i need to make any modification?

On Thursday 17 April 2014 09:25 PM, Kumar Gaurav wrote:

dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/staging/dgap/dgap_tty.c |   17 +
  1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
  #include asm/uaccess.h/* For copy_from_user/copy_to_user */
  #include asm/io.h /* For read[bwl]/write[bwl] */
  #include linux/pci.h
-
+#includelinux/mutex.h
  #include dgap_driver.h
  #include dgap_tty.h
  #include dgap_types.h
@@ -61,18 +61,12 @@
  #include dgap_conf.h
  #include dgap_sysfs.h
  
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37)

-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
  /*
   * internal variables
   */
  static struct board_t *dgap_BoardsByMajor[256];
  static uchar  *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
  
  /*

   * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(dgap_TmpWriteSem)) {
+   if (mutex_lock_interruptible(dgap_TmpWriteSem))
return (-EINTR);
-   }
  
  		if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) buf, count)) {

-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
printk(Write: Copy from user failed!\n);
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
  
  	if (from_user) {

DGAP_UNLOCK(ch-ch_lock, lock_flags);
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
}
else {
DGAP_UNLOCK(ch-ch_lock, lock_flags);


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


[PATCH] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav
dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav 
---
 drivers/staging/dgap/dgap_tty.c |   17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
 #include/* For copy_from_user/copy_to_user */
 #include /* For read[bwl]/write[bwl] */
 #include 
-
+#include
 #include "dgap_driver.h"
 #include "dgap_tty.h"
 #include "dgap_types.h"
@@ -61,18 +61,12 @@
 #include "dgap_conf.h"
 #include "dgap_sysfs.h"
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
 /*
  * internal variables
  */
 static struct board_t  *dgap_BoardsByMajor[256];
 static uchar   *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
 
 /*
  * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(_TmpWriteSem)) {
+   if (mutex_lock_interruptible(_TmpWriteSem))
return (-EINTR);
-   }
 
if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) 
buf, count)) {
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
printk("Write: Copy from user failed!\n");
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 
if (from_user) {
DGAP_UNLOCK(ch->ch_lock, lock_flags);
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
} 
else {
DGAP_UNLOCK(ch->ch_lock, lock_flags);
-- 
1.7.9.5

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


Re: [PATCH 35/35] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav

Hi All,

Please ignore this patch. I'm sending with correct Subject Line
On Thursday 17 April 2014 09:21 PM, Kumar Gaurav wrote:

dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav 
---
  drivers/staging/dgap/dgap_tty.c |   17 +
  1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
  #include /* For copy_from_user/copy_to_user */
  #include  /* For read[bwl]/write[bwl] */
  #include 
-
+#include
  #include "dgap_driver.h"
  #include "dgap_tty.h"
  #include "dgap_types.h"
@@ -61,18 +61,12 @@
  #include "dgap_conf.h"
  #include "dgap_sysfs.h"
  
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)

-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
  /*
   * internal variables
   */
  static struct board_t *dgap_BoardsByMajor[256];
  static uchar  *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
  
  /*

   * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(_TmpWriteSem)) {
+   if (mutex_lock_interruptible(_TmpWriteSem))
return (-EINTR);
-   }
  
  		if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) buf, count)) {

-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
printk("Write: Copy from user failed!\n");
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
  
  	if (from_user) {

DGAP_UNLOCK(ch->ch_lock, lock_flags);
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
}
else {
DGAP_UNLOCK(ch->ch_lock, lock_flags);


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


[PATCH 35/35] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav
dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav 
---
 drivers/staging/dgap/dgap_tty.c |   17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
 #include/* For copy_from_user/copy_to_user */
 #include /* For read[bwl]/write[bwl] */
 #include 
-
+#include
 #include "dgap_driver.h"
 #include "dgap_tty.h"
 #include "dgap_types.h"
@@ -61,18 +61,12 @@
 #include "dgap_conf.h"
 #include "dgap_sysfs.h"
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
 /*
  * internal variables
  */
 static struct board_t  *dgap_BoardsByMajor[256];
 static uchar   *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
 
 /*
  * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(_TmpWriteSem)) {
+   if (mutex_lock_interruptible(_TmpWriteSem))
return (-EINTR);
-   }
 
if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) 
buf, count)) {
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
printk("Write: Copy from user failed!\n");
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 
if (from_user) {
DGAP_UNLOCK(ch->ch_lock, lock_flags);
-   up(_TmpWriteSem);
+   mutex_unlock(_TmpWriteSem);
} 
else {
DGAP_UNLOCK(ch->ch_lock, lock_flags);
-- 
1.7.9.5

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


[PATCH 35/35] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav
dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/staging/dgap/dgap_tty.c |   17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
 #include asm/io.h/* For read[bwl]/write[bwl] */
 #include linux/pci.h
-
+#includelinux/mutex.h
 #include dgap_driver.h
 #include dgap_tty.h
 #include dgap_types.h
@@ -61,18 +61,12 @@
 #include dgap_conf.h
 #include dgap_sysfs.h
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37)
-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
 /*
  * internal variables
  */
 static struct board_t  *dgap_BoardsByMajor[256];
 static uchar   *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
 
 /*
  * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(dgap_TmpWriteSem)) {
+   if (mutex_lock_interruptible(dgap_TmpWriteSem))
return (-EINTR);
-   }
 
if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) 
buf, count)) {
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
printk(Write: Copy from user failed!\n);
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 
if (from_user) {
DGAP_UNLOCK(ch-ch_lock, lock_flags);
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
} 
else {
DGAP_UNLOCK(ch-ch_lock, lock_flags);
-- 
1.7.9.5

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


Re: [PATCH 35/35] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav

Hi All,

Please ignore this patch. I'm sending with correct Subject Line
On Thursday 17 April 2014 09:21 PM, Kumar Gaurav wrote:

dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/staging/dgap/dgap_tty.c |   17 +
  1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
  #include asm/uaccess.h/* For copy_from_user/copy_to_user */
  #include asm/io.h /* For read[bwl]/write[bwl] */
  #include linux/pci.h
-
+#includelinux/mutex.h
  #include dgap_driver.h
  #include dgap_tty.h
  #include dgap_types.h
@@ -61,18 +61,12 @@
  #include dgap_conf.h
  #include dgap_sysfs.h
  
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37)

-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
  /*
   * internal variables
   */
  static struct board_t *dgap_BoardsByMajor[256];
  static uchar  *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
  
  /*

   * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(dgap_TmpWriteSem)) {
+   if (mutex_lock_interruptible(dgap_TmpWriteSem))
return (-EINTR);
-   }
  
  		if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) buf, count)) {

-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
printk(Write: Copy from user failed!\n);
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
  
  	if (from_user) {

DGAP_UNLOCK(ch-ch_lock, lock_flags);
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
}
else {
DGAP_UNLOCK(ch-ch_lock, lock_flags);


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


[PATCH] Staging:dgap:dgap_tty.c: Upgraded driver to use Mutex instead of semaphore

2014-04-17 Thread Kumar Gaurav
dgap driver uses semaphore for obtaining lock. I upgraded it to use MUTEX.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/staging/dgap/dgap_tty.c |   17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2a7a372..0ca72a2 100755
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -52,7 +52,7 @@
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
 #include asm/io.h/* For read[bwl]/write[bwl] */
 #include linux/pci.h
-
+#includelinux/mutex.h
 #include dgap_driver.h
 #include dgap_tty.h
 #include dgap_types.h
@@ -61,18 +61,12 @@
 #include dgap_conf.h
 #include dgap_sysfs.h
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37)
-#define init_MUTEX(sem) sema_init(sem, 1)
-#define DECLARE_MUTEX(name) \
-struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
-#endif
-
 /*
  * internal variables
  */
 static struct board_t  *dgap_BoardsByMajor[256];
 static uchar   *dgap_TmpWriteBuf = NULL;
-static DECLARE_MUTEX(dgap_TmpWriteSem);
+static DEFINE_MUTEX(dgap_TmpWriteSem);
 
 /*
  * Default transparent print information.
@@ -2004,12 +1998,11 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 * the board.
 */
/* we're allowed to block if it's from_user */
-   if (down_interruptible(dgap_TmpWriteSem)) {
+   if (mutex_lock_interruptible(dgap_TmpWriteSem))
return (-EINTR);
-   }
 
if (copy_from_user(dgap_TmpWriteBuf, (const uchar __user *) 
buf, count)) {
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
printk(Write: Copy from user failed!\n);
return -EFAULT;
}
@@ -2093,7 +2086,7 @@ static int dgap_tty_write(struct tty_struct *tty, const 
unsigned char *buf, int
 
if (from_user) {
DGAP_UNLOCK(ch-ch_lock, lock_flags);
-   up(dgap_TmpWriteSem);
+   mutex_unlock(dgap_TmpWriteSem);
} 
else {
DGAP_UNLOCK(ch-ch_lock, lock_flags);
-- 
1.7.9.5

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


Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-11 Thread Kumar Gaurav

On Thursday 12 September 2013 04:44 AM, Sarah Sharp wrote:

Hi Kumar,

I was waiting until after the 3.12 merge window to queue this patch, but
Xenia noticed that the xhci_readl functions can completely go away and
be replaced by standard readl/writel operations.  She's posted a
patchset to do that:

http://marc.info/?l=linux-usb=137874983529708=2

I hate to do this to you, but her patch is a better improvement, so I'll
be taking that series instead of your patch.  I hope you can still find
other clean up work to do in the xHCI driver and USB core. :)

Sarah Sharp

Sure sarah, Thanks


On Wed, Sep 04, 2013 at 11:42:33AM +0530, Kumar Gaurav wrote:

On Tuesday 03 September 2013 09:34 PM, Sarah Sharp wrote:

I'm confused.  I said the last version of this patch didn't apply
against usb-next, and you should rebase it.  Why did you put "No Change"
in the subject prefix?

I miss understood what Dan said. he said me to add no change if
there's no change from previous patch, but he didn't meant in
subject (my bad).

On Sat, Aug 31, 2013 at 11:02:45PM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav 
---

You didn't describe why you're resending this, or what changed.  If you
did rebase this against usb-next, you should have left the subject
prefix as "PATCH v4" and said here:

v4:
  - rebased against usb-next

You can do this by generating the patch with `git format-patch`, edit
the patch manually (in whatever directory it was created it), and then
send it by passing the file to `git send-email`.

Sarah Sharp

I rebased it against linux-next and i'll send the same patch as you
discribed but please do let me know if i need to mark that as "patch
v5"
as this patch won't have any change in changelog

  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
-   temp = xhci_readl(xhci, >cap_regs->db_off);
+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
-   temp = xhci_readl(xhci, >cap_regs->hcs_params1);
+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
  

Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-11 Thread Kumar Gaurav

On Thursday 12 September 2013 04:44 AM, Sarah Sharp wrote:

Hi Kumar,

I was waiting until after the 3.12 merge window to queue this patch, but
Xenia noticed that the xhci_readl functions can completely go away and
be replaced by standard readl/writel operations.  She's posted a
patchset to do that:

http://marc.info/?l=linux-usbm=137874983529708w=2

I hate to do this to you, but her patch is a better improvement, so I'll
be taking that series instead of your patch.  I hope you can still find
other clean up work to do in the xHCI driver and USB core. :)

Sarah Sharp

Sure sarah, Thanks


On Wed, Sep 04, 2013 at 11:42:33AM +0530, Kumar Gaurav wrote:

On Tuesday 03 September 2013 09:34 PM, Sarah Sharp wrote:

I'm confused.  I said the last version of this patch didn't apply
against usb-next, and you should rebase it.  Why did you put No Change
in the subject prefix?

I miss understood what Dan said. he said me to add no change if
there's no change from previous patch, but he didn't meant in
subject (my bad).

On Sat, Aug 31, 2013 at 11:02:45PM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---

You didn't describe why you're resending this, or what changed.  If you
did rebase this against usb-next, you should have left the subject
prefix as PATCH v4 and said here:

v4:
  - rebased against usb-next

You can do this by generating the patch with `git format-patch`, edit
the patch manually (in whatever directory it was created it), and then
send it by passing the file to `git send-email`.

Sarah Sharp

I rebased it against linux-next and i'll send the same patch as you
discribed but please do let me know if i need to mark that as patch
v5
as this patch won't have any change in changelog

  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, // xHCI capability registers at %p:\n,
xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-db_off);
+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);
+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);
+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp

Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-04 Thread Kumar Gaurav

On Tuesday 03 September 2013 09:34 PM, Sarah Sharp wrote:

I'm confused.  I said the last version of this patch didn't apply
against usb-next, and you should rebase it.  Why did you put "No Change"
in the subject prefix?
I miss understood what Dan said. he said me to add no change if there's 
no change from previous patch, but he didn't meant in subject (my bad).


On Sat, Aug 31, 2013 at 11:02:45PM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav 
---

You didn't describe why you're resending this, or what changed.  If you
did rebase this against usb-next, you should have left the subject
prefix as "PATCH v4" and said here:

v4:
  - rebased against usb-next

You can do this by generating the patch with `git format-patch`, edit
the patch manually (in whatever directory it was created it), and then
send it by passing the file to `git send-email`.

Sarah Sharp
I rebased it against linux-next and i'll send the same patch as you 
discribed but please do let me know if i need to mark that as "patch v5"

as this patch won't have any change in changelog

  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "// xHCI capability registers at %p:\n",

xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->run_regs_off);

+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->db_off);

+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->hc_capbase);

+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params1);

+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params2);

+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params3);

+   temp = xhci_readl(

Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-04 Thread Kumar Gaurav

On Tuesday 03 September 2013 09:34 PM, Sarah Sharp wrote:

I'm confused.  I said the last version of this patch didn't apply
against usb-next, and you should rebase it.  Why did you put No Change
in the subject prefix?
I miss understood what Dan said. he said me to add no change if there's 
no change from previous patch, but he didn't meant in subject (my bad).


On Sat, Aug 31, 2013 at 11:02:45PM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---

You didn't describe why you're resending this, or what changed.  If you
did rebase this against usb-next, you should have left the subject
prefix as PATCH v4 and said here:

v4:
  - rebased against usb-next

You can do this by generating the patch with `git format-patch`, edit
the patch manually (in whatever directory it was created it), and then
send it by passing the file to `git send-email`.

Sarah Sharp
I rebased it against linux-next and i'll send the same patch as you 
discribed but please do let me know if i need to mark that as patch v5

as this patch won't have any change in changelog

  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, // xHCI capability registers at %p:\n,

xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);

+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-db_off);

+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);

+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);

+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);

+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);

+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n

Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-02 Thread Kumar Gaurav

I tried applying this patch on linux-next and it applies well.
i used
git apply --apply



On Saturday 31 August 2013 11:02 PM, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav 
---
  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "// xHCI capability registers at %p:\n",

xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->run_regs_off);

+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->db_off);

+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
  
-	temp = xhci_readl(xhci, >cap_regs->hc_capbase);

+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params1);

+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params2);

+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcs_params3);

+   temp = xhci_readl(>cap_regs->hcs_params3);
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Worst case U2 device exit latency: %u\n",
(unsigned int) HCS_U2_LATENCY(temp));
  
-	temp = xhci_readl(xhci, >cap_regs->hcc_params);

+   temp = xhci_readl(>cap_regs->hcc_params);
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, "  HC generates %s bit addresses\n",
HCC_64BIT_ADDR(temp) ? "64" : "32");
/* FIXME */
xhci_dbg(xhci, "  FIXME: more HCCPARAMS debugging\n");
  
-	temp = xhci_readl(xhci, >cap_regs->run_regs_off);

+  

Re: [PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-09-02 Thread Kumar Gaurav

I tried applying this patch on linux-next and it applies well.
i used
git apply --apply



On Saturday 31 August 2013 11:02 PM, Kumar Gaurav wrote:

This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/usb/host/xhci-dbg.c  |   36 -
  drivers/usb/host/xhci-hub.c  |   72 -
  drivers/usb/host/xhci-mem.c  |   20 -
  drivers/usb/host/xhci-ring.c |   12 +++---
  drivers/usb/host/xhci.c  |   92 +-
  drivers/usb/host/xhci.h  |3 +-
  6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, // xHCI capability registers at %p:\n,

xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);

+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-db_off);

+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
  }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
  
  	xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);

+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);

+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);

+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);

+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n,
(unsigned int) HCS_U2_LATENCY(temp));
  
-	temp = xhci_readl(xhci, xhci-cap_regs-hcc_params);

+   temp = xhci_readl(xhci-cap_regs-hcc_params);
xhci_dbg(xhci, HCC PARAMS 0x%x:\n, (unsigned int) temp);
xhci_dbg(xhci,   HC generates %s bit addresses\n,
HCC_64BIT_ADDR(temp) ? 64 : 32);
/* FIXME */
xhci_dbg(xhci,   FIXME: more HCCPARAMS debugging\n);
  
-	temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);

+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, RTSOFF 0x%x:\n, temp  RTSOFF_MASK);
  }
  
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)

  {
u32 temp;
  
-	temp = xhci_readl(xhci, xhci-op_regs-command);

+   temp = xhci_readl(xhci-op_regs-command);
xhci_dbg(xhci, USBCMD 0x%x:\n, temp);
xhci_dbg

[PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-08-31 Thread Kumar Gaurav
This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav 
---
 drivers/usb/host/xhci-dbg.c  |   36 -
 drivers/usb/host/xhci-hub.c  |   72 -
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 +++---
 drivers/usb/host/xhci.c  |   92 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->db_off);
+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params1);
+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params2);
+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params3);
+   temp = xhci_readl(>cap_regs->hcs_params3);
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Worst case U2 device exit latency: %u\n",
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcc_params);
+   temp = xhci_readl(>cap_regs->hcc_params);
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, "  HC generates %s bit addresses\n",
HCC_64BIT_ADDR(temp) ? "64" : "32");
/* FIXME */
xhci_dbg(xhci, "  FIXME: more HCCPARAMS debugging\n");
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 

[PATCH v4:No Change] xHCI:Fixing xhci_readl definition and function call

2013-08-31 Thread Kumar Gaurav
This patch redefine function xhci_readl. xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/usb/host/xhci-dbg.c  |   36 -
 drivers/usb/host/xhci-hub.c  |   72 -
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 +++---
 drivers/usb/host/xhci.c  |   92 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 117 insertions(+), 118 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a8..229e312 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI capability registers at %p:\n,
xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-db_off);
+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);
+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);
+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);
+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n,
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcc_params);
+   temp = xhci_readl(xhci-cap_regs-hcc_params);
xhci_dbg(xhci, HCC PARAMS 0x%x:\n, (unsigned int) temp);
xhci_dbg(xhci,   HC generates %s bit addresses\n,
HCC_64BIT_ADDR(temp) ? 64 : 32);
/* FIXME */
xhci_dbg(xhci,   FIXME: more HCCPARAMS debugging\n);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, RTSOFF 0x%x:\n, temp  RTSOFF_MASK);
 }
 
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, xhci-op_regs-command);
+   temp = xhci_readl(xhci-op_regs-command);
xhci_dbg(xhci, USBCMD 0x%x:\n, temp);
xhci_dbg(xhci,   HC is %s\n,
(temp  CMD_RUN) ? running : being stopped);
@@ -128,7 +128,7 @@ static void

Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Kumar Gaurav

On Wednesday 28 August 2013 10:31 PM, Sarah Sharp wrote:

On Wed, Aug 28, 2013 at 08:39:06PM +0530, Kumar Gaurav wrote:

On Wednesday 28 August 2013 12:43 PM, Dan Carpenter wrote:

On Mon, Aug 26, 2013 at 07:38:57AM +0530, Kumar Gaurav wrote:

I've started cloning linux-next and as it's not applying on
linux-next, I'll try it on linux-next (once i cloned it)  and will
send again.

Yeah, this doesn't apply against Greg's usb-next tree, so I can't take
it.  If you're sending non-bug fixes in, you need to base your patches
against that tree, or linux-next.

Sarah Sharp

I'm trying against linux-git as
cat 0027-xHCI-Fixing-xhci_readl-definition-and-function-call.patch| 
patch

and then after i enter the required file (drivers/usb/host/xhci-dbg.c).
it's giving me  message

File to patch: drivers/usb/host/xhci-dbg.c
patching file drivers/usb/host/xhci-dbg.c
can't find file to patch at input line 180
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

but when i saw the file i found changes are applied there.

I had made the patch using git format-patch. what could be the possible 
reason behind this issue or am i mistaking somewhere?



Regards
Kumar Gaurav



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


Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Kumar Gaurav

On Wednesday 28 August 2013 12:43 PM, Dan Carpenter wrote:

On Mon, Aug 26, 2013 at 07:38:57AM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav 
---

Could you put a list of changes since v2 here?:

v3:  blah blah changelog mostly.

Also this doesn't apply for me against linux-next.

regards,
dan carpenter

There's no change from v2. I was sending the same patch again because 
the last one was lacking good description and i was told (or as i 
understood) that if I'm sending the same patch or patch for the same 
purpose as previous then i should increment version so i did.


I had developed this patch against linux-git, haven't tested that on 
linux-next as i haven't cloned  linux-next yet.


I've started cloning linux-next and as it's not applying on linux-next, 
I'll try it on linux-next (once i cloned it)  and will send again.


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


Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Kumar Gaurav

On Wednesday 28 August 2013 12:43 PM, Dan Carpenter wrote:

On Mon, Aug 26, 2013 at 07:38:57AM +0530, Kumar Gaurav wrote:

This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments.

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---

Could you put a list of changes since v2 here?:

v3:  blah blah changelog mostly.

Also this doesn't apply for me against linux-next.

regards,
dan carpenter

There's no change from v2. I was sending the same patch again because 
the last one was lacking good description and i was told (or as i 
understood) that if I'm sending the same patch or patch for the same 
purpose as previous then i should increment version so i did.


I had developed this patch against linux-git, haven't tested that on 
linux-next as i haven't cloned  linux-next yet.


I've started cloning linux-next and as it's not applying on linux-next, 
I'll try it on linux-next (once i cloned it)  and will send again.


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


Re: [PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-28 Thread Kumar Gaurav

On Wednesday 28 August 2013 10:31 PM, Sarah Sharp wrote:

On Wed, Aug 28, 2013 at 08:39:06PM +0530, Kumar Gaurav wrote:

On Wednesday 28 August 2013 12:43 PM, Dan Carpenter wrote:

On Mon, Aug 26, 2013 at 07:38:57AM +0530, Kumar Gaurav wrote:

I've started cloning linux-next and as it's not applying on
linux-next, I'll try it on linux-next (once i cloned it)  and will
send again.

Yeah, this doesn't apply against Greg's usb-next tree, so I can't take
it.  If you're sending non-bug fixes in, you need to base your patches
against that tree, or linux-next.

Sarah Sharp

I'm trying against linux-git as
cat 0027-xHCI-Fixing-xhci_readl-definition-and-function-call.patch| 
patch

and then after i enter the required file (drivers/usb/host/xhci-dbg.c).
it's giving me  message

File to patch: drivers/usb/host/xhci-dbg.c
patching file drivers/usb/host/xhci-dbg.c
can't find file to patch at input line 180
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

but when i saw the file i found changes are applied there.

I had made the patch using git format-patch. what could be the possible 
reason behind this issue or am i mistaking somewhere?



Regards
Kumar Gaurav



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


[PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-25 Thread Kumar Gaurav
This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav 
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->db_off);
+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params1);
+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params2);
+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params3);
+   temp = xhci_readl(>cap_regs->hcs_params3);
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Worst case U2 device exit latency: %u\n",
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcc_params);
+   temp = xhci_readl(>cap_regs->hcc_params);
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, "  HC generates %s bit addresses\n",
HCC_64BIT_ADDR(temp) ? "64" : "32");
/* FIXME */
xhci_dbg(xhci, "  FIXME: more HCCPARAMS debugging\n");
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 }
 
@@ -1

[PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-25 Thread Kumar Gaurav
This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI capability registers at %p:\n,
xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-db_off);
+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);
+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);
+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);
+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n,
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcc_params);
+   temp = xhci_readl(xhci-cap_regs-hcc_params);
xhci_dbg(xhci, HCC PARAMS 0x%x:\n, (unsigned int) temp);
xhci_dbg(xhci,   HC generates %s bit addresses\n,
HCC_64BIT_ADDR(temp) ? 64 : 32);
/* FIXME */
xhci_dbg(xhci,   FIXME: more HCCPARAMS debugging\n);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, RTSOFF 0x%x:\n, temp  RTSOFF_MASK);
 }
 
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, xhci-op_regs-command);
+   temp = xhci_readl(xhci-op_regs-command);
xhci_dbg(xhci, USBCMD 0x%x:\n, temp);
xhci_dbg(xhci,   HC is %s\n,
(temp  CMD_RUN) ? running : being stopped);
@@ -128,7 +128,7 @@ static void

[PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-21 Thread Kumar Gaurav
This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav 
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->db_off);
+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params1);
+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params2);
+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params3);
+   temp = xhci_readl(>cap_regs->hcs_params3);
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Worst case U2 device exit latency: %u\n",
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcc_params);
+   temp = xhci_readl(>cap_regs->hcc_params);
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, "  HC generates %s bit addresses\n",
HCC_64BIT_ADDR(temp) ? "64" : "32");
/* FIXME */
xhci_dbg(xhci, "  FIXME: more HCCPARAMS debugging\n");
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 }
 
@@ -1

[PATCH v3] xHCI: Fixing xhci_readl definition and function call

2013-08-21 Thread Kumar Gaurav
This patch redefine function xhci_readl.xhci_readl function doesn't use 
xhci_hcd argument.
Hence there is no need of keeping it in the function arguments. 

Redefining this function breaks other functions which calls this function.
This phatch also correct those calls in xhci driver. 

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI capability registers at %p:\n,
xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-db_off);
+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);
+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);
+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);
+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n,
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcc_params);
+   temp = xhci_readl(xhci-cap_regs-hcc_params);
xhci_dbg(xhci, HCC PARAMS 0x%x:\n, (unsigned int) temp);
xhci_dbg(xhci,   HC generates %s bit addresses\n,
HCC_64BIT_ADDR(temp) ? 64 : 32);
/* FIXME */
xhci_dbg(xhci,   FIXME: more HCCPARAMS debugging\n);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, RTSOFF 0x%x:\n, temp  RTSOFF_MASK);
 }
 
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, xhci-op_regs-command);
+   temp = xhci_readl(xhci-op_regs-command);
xhci_dbg(xhci, USBCMD 0x%x:\n, temp);
xhci_dbg(xhci,   HC is %s\n,
(temp  CMD_RUN) ? running : being stopped);
@@ -128,7 +128,7 @@ static void

[PATCH] xHCI:Fixing xhci_readl definition and function call

2013-08-20 Thread Kumar Gaurav
Fixing other programs in xhci driver which calls this function
Signed-off-by: Kumar Gaurav 
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
xhci->cap_regs);
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
>cap_regs->hc_capbase, temp);
xhci_dbg(xhci, "//   CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
>cap_regs->run_regs_off,
(unsigned int) temp & RTSOFF_MASK);
xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->db_off);
+   temp = xhci_readl(>cap_regs->db_off);
xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", >cap_regs->db_off, temp);
xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
 
-   temp = xhci_readl(xhci, >cap_regs->hc_capbase);
+   temp = xhci_readl(>cap_regs->hc_capbase);
xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params1);
+   temp = xhci_readl(>cap_regs->hcs_params1);
xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Max ports: %u\n",
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params2);
+   temp = xhci_readl(>cap_regs->hcs_params2);
xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Maximum allowed segments in event ring: %u\n",
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcs_params3);
+   temp = xhci_readl(>cap_regs->hcs_params3);
xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
(unsigned int) temp);
xhci_dbg(xhci, "  Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "  Worst case U2 device exit latency: %u\n",
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, >cap_regs->hcc_params);
+   temp = xhci_readl(>cap_regs->hcc_params);
xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, "  HC generates %s bit addresses\n",
HCC_64BIT_ADDR(temp) ? "64" : "32");
/* FIXME */
xhci_dbg(xhci, "  FIXME: more HCCPARAMS debugging\n");
 
-   temp = xhci_readl(xhci, >cap_regs->run_regs_off);
+   temp = xhci_readl(>cap_regs->run_regs_off);
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 }
 
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, >op_regs->command);
+   temp = xhci_readl(>op_regs->command);
xhci_dbg(x

[PATCH] xHCI:Fixing xhci_readl definition and function call

2013-08-20 Thread Kumar Gaurav
Fixing other programs in xhci driver which calls this function
Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/usb/host/xhci-dbg.c  |   36 +++
 drivers/usb/host/xhci-hub.c  |   72 +++---
 drivers/usb/host/xhci-mem.c  |   20 -
 drivers/usb/host/xhci-ring.c |   12 ++---
 drivers/usb/host/xhci.c  |  100 +-
 drivers/usb/host/xhci.h  |3 +-
 6 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5d5e58f..66dc1c0 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI capability registers at %p:\n,
xhci-cap_regs);
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, // @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n,
xhci-cap_regs-hc_capbase, temp);
xhci_dbg(xhci, //   CAPLENGTH: 0x%x\n,
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, // xHCI operational registers at %p:\n, xhci-op_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, // @%p = 0x%x RTSOFF\n,
xhci-cap_regs-run_regs_off,
(unsigned int) temp  RTSOFF_MASK);
xhci_dbg(xhci, // xHCI runtime registers at %p:\n, xhci-run_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-db_off);
+   temp = xhci_readl(xhci-cap_regs-db_off);
xhci_dbg(xhci, // @%p = 0x%x DBOFF\n, xhci-cap_regs-db_off, temp);
xhci_dbg(xhci, // Doorbell array at %p:\n, xhci-dba);
 }
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 
xhci_dbg(xhci, xHCI capability registers at %p:\n, xhci-cap_regs);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hc_capbase);
+   temp = xhci_readl(xhci-cap_regs-hc_capbase);
xhci_dbg(xhci, CAPLENGTH AND HCIVERSION 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci, CAPLENGTH: 0x%x\n,
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, HCIVERSION: 0x%x\n,
(unsigned int) HC_VERSION(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params1);
+   temp = xhci_readl(xhci-cap_regs-hcs_params1);
xhci_dbg(xhci, HCSPARAMS 1: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Max device slots: %u\n,
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Max ports: %u\n,
(unsigned int) HCS_MAX_PORTS(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params2);
+   temp = xhci_readl(xhci-cap_regs-hcs_params2);
xhci_dbg(xhci, HCSPARAMS 2: 0x%x\n,
(unsigned int) temp);
xhci_dbg(xhci,   Isoc scheduling threshold: %u\n,
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Maximum allowed segments in event ring: %u\n,
(unsigned int) HCS_ERST_MAX(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcs_params3);
+   temp = xhci_readl(xhci-cap_regs-hcs_params3);
xhci_dbg(xhci, HCSPARAMS 3 0x%x:\n,
(unsigned int) temp);
xhci_dbg(xhci,   Worst case U1 device exit latency: %u\n,
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci,   Worst case U2 device exit latency: %u\n,
(unsigned int) HCS_U2_LATENCY(temp));
 
-   temp = xhci_readl(xhci, xhci-cap_regs-hcc_params);
+   temp = xhci_readl(xhci-cap_regs-hcc_params);
xhci_dbg(xhci, HCC PARAMS 0x%x:\n, (unsigned int) temp);
xhci_dbg(xhci,   HC generates %s bit addresses\n,
HCC_64BIT_ADDR(temp) ? 64 : 32);
/* FIXME */
xhci_dbg(xhci,   FIXME: more HCCPARAMS debugging\n);
 
-   temp = xhci_readl(xhci, xhci-cap_regs-run_regs_off);
+   temp = xhci_readl(xhci-cap_regs-run_regs_off);
xhci_dbg(xhci, RTSOFF 0x%x:\n, temp  RTSOFF_MASK);
 }
 
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, xhci-op_regs-command);
+   temp = xhci_readl(xhci-op_regs-command);
xhci_dbg(xhci, USBCMD 0x%x:\n, temp);
xhci_dbg(xhci,   HC is %s\n,
(temp  CMD_RUN) ? running : being stopped);
@@ -128,7 +128,7 @@ static void xhci_print_status(struct xhci_hcd *xhci)
 {
u32 temp;
 
-   temp = xhci_readl(xhci, xhci-op_regs-status);
+   temp = xhci_readl(xhci-op_regs-status);
xhci_dbg(xhci, USBSTS 0x%x:\n, temp);
xhci_dbg

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Sunday 11 August 2013 12:19 AM, walter harms wrote:

Hello Kumar,
i will try to resolve the riddle ...

doing something like fn(a,b,c,0) is a bad habit.
0 is called a "magic number" because noone reading the code has an idea
why it is there. Using the name IRQF_TRIGGER_NONE good.

Having a named bit like IRQ_TRIGGER|IRQ_NMI is most times also a good idea
because it correspond (most times) to the naming of the bits in the data sheet.

The problems starts when this hits reality since nothing is clearly black or 
white.
In this case when you remove IRQF_DISABLED disables "bit" something should be 
left.

a|b|IRQF_DISABLED -> a|b  (that is the easy part)
but
IRQF_DISABLED -> IRQF_TRIGGER_NONE

Otherwise you would be left with "0". That is a magic number (see above).
So this is to be replaced by a placeholder called IRQF_TRIGGER_NONE.

hope that really helps and that i have understood the discussion.

re,
  wh

Thanks for the clarification. I'll be following this.

Regards
Kumar Gaurav


Am 10.08.2013 20:15, schrieb Kumar Gaurav:

On Saturday 10 August 2013 10:54 PM, Julia Lawall wrote:

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav 
---
drivers/net/hamradio/baycom_ser_fdx.c |2 +-
drivers/net/hamradio/baycom_ser_hdx.c |2 +-
drivers/net/hamradio/scc.c|2 +-
drivers/net/hamradio/yam.c|2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
"baycom_ser_fdx", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
"baycom_ser12", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-IRQF_DISABLED, "AX.25 SCC",
+0, "AX.25 SCC",
(void *)(long) hwcfg.irq))
printk(KERN_WARNING "z8530drv:
warning, cannot get IRQ %d\n", hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev->base_addr));
-if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED |
IRQF_SHARED,
dev->name, dev)) {
+if (request_irq(dev->irq, yam_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED, dev->name, dev)) {
printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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


Yes i was suggested for using IRQF_TRIGGER_NONE too so used this.
Please tell
me if this makes any difference or issue?

I think that the suggestion was to use IRQF_TRIGGER_NONE only when
removing IRQF_DISABLED would leave nothing 

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Saturday 10 August 2013 10:54 PM, Julia Lawall wrote:

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav 
---
   drivers/net/hamradio/baycom_ser_fdx.c |2 +-
   drivers/net/hamradio/baycom_ser_hdx.c |2 +-
   drivers/net/hamradio/scc.c|2 +-
   drivers/net/hamradio/yam.c|2 +-
   4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
"baycom_ser_fdx", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
"baycom_ser12", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, "AX.25 SCC",
+   0, "AX.25 SCC",
(void *)(long) hwcfg.irq))
printk(KERN_WARNING "z8530drv:
warning, cannot get IRQ %d\n", hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED,
dev->name, dev)) {
+   if (request_irq(dev->irq, yam_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED, dev->name, dev)) {
printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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


Yes i was suggested for using IRQF_TRIGGER_NONE too so used this. Please tell
me if this makes any difference or issue?

I think that the suggestion was to use IRQF_TRIGGER_NONE only when
removing IRQF_DISABLED would leave nothing left.

- IRQF_DISABLED | e
+ e

otherwise,

- IRQF_DISABLED
+ 0

julia
Sorry to prompt back but i'm confused. if removing IRQF_DISABLED leaves 
nothing then should i use 0 or IRQF_TRIGGER_NONE?

I'm convinced with

- IRQF_DISABLED | e
+ e

Regards

Kumar Gaurav

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


Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav 
---
  drivers/net/hamradio/baycom_ser_fdx.c |2 +-
  drivers/net/hamradio/baycom_ser_hdx.c |2 +-
  drivers/net/hamradio/scc.c|2 +-
  drivers/net/hamradio/yam.c|2 +-
  4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c 
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
"baycom_ser_fdx", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c 
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
"baycom_ser12", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev, struct 
ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, "AX.25 SCC",
+   0, "AX.25 SCC",
(void *)(long) hwcfg.irq))
printk(KERN_WARNING "z8530drv: warning, 
cannot get IRQ %d\n", hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, 
dev->name, dev)) {
+   if (request_irq(dev->irq, yam_interrupt, IRQF_TRIGGER_NONE | IRQF_SHARED, 
dev->name, dev)) {
printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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

Yes i was suggested for using IRQF_TRIGGER_NONE too so used this. Please 
tell me if this makes any difference or issue?


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


[PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav
Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav 
---
 drivers/net/hamradio/baycom_ser_fdx.c |2 +-
 drivers/net/hamradio/baycom_ser_hdx.c |2 +-
 drivers/net/hamradio/scc.c|2 +-
 drivers/net/hamradio/yam.c|2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c 
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
"baycom_ser_fdx", dev)) {
release_region(dev->base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c 
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev->base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev->base_addr));
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev->irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
"baycom_ser12", dev)) {
release_region(dev->base_addr, SER12_EXTENT);   
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev, struct 
ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, "AX.25 SCC",
+   0, "AX.25 SCC",
(void *)(long) hwcfg.irq))
printk(KERN_WARNING "z8530drv: warning, 
cannot get IRQ %d\n", hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev->base_addr));
-   if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, 
dev->name, dev)) {
+   if (request_irq(dev->irq, yam_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED, dev->name, dev)) {
printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
ret = -EBUSY;
goto out_release_base;
-- 
1.7.9.5

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


[PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav
Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/net/hamradio/baycom_ser_fdx.c |2 +-
 drivers/net/hamradio/baycom_ser_hdx.c |2 +-
 drivers/net/hamradio/scc.c|2 +-
 drivers/net/hamradio/yam.c|2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c 
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
baycom_ser_fdx, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c 
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
baycom_ser12, dev)) {
release_region(dev-base_addr, SER12_EXTENT);   
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev, struct 
ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used  hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, AX.25 SCC,
+   0, AX.25 SCC,
(void *)(long) hwcfg.irq))
printk(KERN_WARNING z8530drv: warning, 
cannot get IRQ %d\n, hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, 
dev-name, dev)) {
+   if (request_irq(dev-irq, yam_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED, dev-name, dev)) {
printk(KERN_ERR %s: irq %d busy\n, dev-name, dev-irq);
ret = -EBUSY;
goto out_release_base;
-- 
1.7.9.5

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


Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/net/hamradio/baycom_ser_fdx.c |2 +-
  drivers/net/hamradio/baycom_ser_hdx.c |2 +-
  drivers/net/hamradio/scc.c|2 +-
  drivers/net/hamradio/yam.c|2 +-
  4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c 
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
baycom_ser_fdx, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c 
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE | 
IRQF_SHARED,
baycom_ser12, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev, struct 
ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used  hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, AX.25 SCC,
+   0, AX.25 SCC,
(void *)(long) hwcfg.irq))
printk(KERN_WARNING z8530drv: warning, 
cannot get IRQ %d\n, hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, 
dev-name, dev)) {
+   if (request_irq(dev-irq, yam_interrupt, IRQF_TRIGGER_NONE | IRQF_SHARED, 
dev-name, dev)) {
printk(KERN_ERR %s: irq %d busy\n, dev-name, dev-irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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

Yes i was suggested for using IRQF_TRIGGER_NONE too so used this. Please 
tell me if this makes any difference or issue?


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


Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Saturday 10 August 2013 10:54 PM, Julia Lawall wrote:

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
   drivers/net/hamradio/baycom_ser_fdx.c |2 +-
   drivers/net/hamradio/baycom_ser_hdx.c |2 +-
   drivers/net/hamradio/scc.c|2 +-
   drivers/net/hamradio/yam.c|2 +-
   4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
baycom_ser_fdx, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+   if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
baycom_ser12, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used  hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-   IRQF_DISABLED, AX.25 SCC,
+   0, AX.25 SCC,
(void *)(long) hwcfg.irq))
printk(KERN_WARNING z8530drv:
warning, cannot get IRQ %d\n, hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev-base_addr));
-   if (request_irq(dev-irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED,
dev-name, dev)) {
+   if (request_irq(dev-irq, yam_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED, dev-name, dev)) {
printk(KERN_ERR %s: irq %d busy\n, dev-name, dev-irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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


Yes i was suggested for using IRQF_TRIGGER_NONE too so used this. Please tell
me if this makes any difference or issue?

I think that the suggestion was to use IRQF_TRIGGER_NONE only when
removing IRQF_DISABLED would leave nothing left.

- IRQF_DISABLED | e
+ e

otherwise,

- IRQF_DISABLED
+ 0

julia
Sorry to prompt back but i'm confused. if removing IRQF_DISABLED leaves 
nothing then should i use 0 or IRQF_TRIGGER_NONE?

I'm convinced with

- IRQF_DISABLED | e
+ e

Regards

Kumar Gaurav

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


Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Kumar Gaurav

On Sunday 11 August 2013 12:19 AM, walter harms wrote:

Hello Kumar,
i will try to resolve the riddle ...

doing something like fn(a,b,c,0) is a bad habit.
0 is called a magic number because noone reading the code has an idea
why it is there. Using the name IRQF_TRIGGER_NONE good.

Having a named bit like IRQ_TRIGGER|IRQ_NMI is most times also a good idea
because it correspond (most times) to the naming of the bits in the data sheet.

The problems starts when this hits reality since nothing is clearly black or 
white.
In this case when you remove IRQF_DISABLED disables bit something should be 
left.

a|b|IRQF_DISABLED - a|b  (that is the easy part)
but
IRQF_DISABLED - IRQF_TRIGGER_NONE

Otherwise you would be left with 0. That is a magic number (see above).
So this is to be replaced by a placeholder called IRQF_TRIGGER_NONE.

hope that really helps and that i have understood the discussion.

re,
  wh

Thanks for the clarification. I'll be following this.

Regards
Kumar Gaurav


Am 10.08.2013 20:15, schrieb Kumar Gaurav:

On Saturday 10 August 2013 10:54 PM, Julia Lawall wrote:

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote:

If it is in a | with something else, I think you can just remove it.

julia

On Sat, 10 Aug 2013, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it's deprecated and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
drivers/net/hamradio/baycom_ser_fdx.c |2 +-
drivers/net/hamradio/baycom_ser_hdx.c |2 +-
drivers/net/hamradio/scc.c|2 +-
drivers/net/hamradio/yam.c|2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c
b/drivers/net/hamradio/baycom_ser_fdx.c
index a974727..c114009 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -445,7 +445,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
baycom_ser_fdx, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c
b/drivers/net/hamradio/baycom_ser_hdx.c
index e349d86..d91c1fd 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -490,7 +490,7 @@ static int ser12_open(struct net_device *dev)
outb(0, FCR(dev-base_addr));  /* disable FIFOs */
outb(0x0d, MCR(dev-base_addr));
outb(0, IER(dev-base_addr));
-if (request_irq(dev-irq, ser12_interrupt, IRQF_DISABLED |
IRQF_SHARED,
+if (request_irq(dev-irq, ser12_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED,
baycom_ser12, dev)) {
release_region(dev-base_addr, SER12_EXTENT);
return -EBUSY;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index bc1d521..4bc6ee8 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1734,7 +1734,7 @@ static int scc_net_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used  hwcfg.irq)
{
if (request_irq(hwcfg.irq, scc_isr,
-IRQF_DISABLED, AX.25 SCC,
+0, AX.25 SCC,
(void *)(long) hwcfg.irq))
printk(KERN_WARNING z8530drv:
warning, cannot get IRQ %d\n, hwcfg.irq);
else
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 0721e72..f947887 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -888,7 +888,7 @@ static int yam_open(struct net_device *dev)
goto out_release_base;
}
outb(0, IER(dev-base_addr));
-if (request_irq(dev-irq, yam_interrupt, IRQF_DISABLED |
IRQF_SHARED,
dev-name, dev)) {
+if (request_irq(dev-irq, yam_interrupt, IRQF_TRIGGER_NONE |
IRQF_SHARED, dev-name, dev)) {
printk(KERN_ERR %s: irq %d busy\n, dev-name, dev-irq);
ret = -EBUSY;
goto out_release_base;
--
1.7.9.5

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


Yes i was suggested for using IRQF_TRIGGER_NONE too so used this.
Please tell
me if this makes any difference or issue?

I think that the suggestion was to use IRQF_TRIGGER_NONE only when
removing IRQF_DISABLED would leave nothing left.

- IRQF_DISABLED | e
+ e

otherwise,

- IRQF_DISABLED
+ 0

julia

Sorry to prompt back but i'm confused. if removing IRQF_DISABLED leaves
nothing then should i use 0

Re: [PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav

On Saturday 10 August 2013 01:08 AM, Sergei Shtylyov wrote:

Hello.

On 08/09/2013 10:25 PM, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.


   That's clearly a material for 2 separate patches.


Signed-off-by: Kumar Gaurav 
---
  drivers/net/ethernet/lantiq_etop.c |8 +---
  1 file changed, 5 insertions(+), 3 deletions(-)


diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c

index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c

[...]

@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
  if (err)
  goto err_netdev;

-/* Set addr_assign_type here, ltq_etop_set_mac_address would 
reset it. */

+/* Set addr_assign_type here,
+ *ltq_etop_set_mac_address would reset it.


   You forgot space after * here.

WBR, Sergei


Okay i'll be sending them in separate and correcting a space issue as told.
thanks

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


Re: [PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav
It's a single patch. Please don't be confused with the subject [PATCH 
17/17]. I forgot to edit this before sending.

my apology for mistake

On Friday 09 August 2013 11:55 PM, Kumar Gaurav wrote:

Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.

Signed-off-by: Kumar Gaurav 
---
  drivers/net/ethernet/lantiq_etop.c |8 +---
  1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c
index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -282,7 +282,7 @@ ltq_etop_hw_init(struct net_device *dev)
  
  		if (IS_TX(i)) {

ltq_dma_alloc_tx(>dma);
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
"etop_tx", priv);
} else if (IS_RX(i)) {
ltq_dma_alloc_rx(>dma);
@@ -291,7 +291,7 @@ ltq_etop_hw_init(struct net_device *dev)
if (ltq_etop_alloc_skb(ch))
return -ENOMEM;
ch->dma.desc = 0;
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
"etop_rx", priv);
}
ch->dma.irq = irq;
@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_netdev;
  
-	/* Set addr_assign_type here, ltq_etop_set_mac_address would reset it. */

+   /* Set addr_assign_type here,
+*ltq_etop_set_mac_address would reset it.
+*/
if (random_mac)
dev->addr_assign_type = NET_ADDR_RANDOM;
  


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


[PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav
Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.

Signed-off-by: Kumar Gaurav 
---
 drivers/net/ethernet/lantiq_etop.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c
index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -282,7 +282,7 @@ ltq_etop_hw_init(struct net_device *dev)
 
if (IS_TX(i)) {
ltq_dma_alloc_tx(>dma);
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
"etop_tx", priv);
} else if (IS_RX(i)) {
ltq_dma_alloc_rx(>dma);
@@ -291,7 +291,7 @@ ltq_etop_hw_init(struct net_device *dev)
if (ltq_etop_alloc_skb(ch))
return -ENOMEM;
ch->dma.desc = 0;
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
"etop_rx", priv);
}
ch->dma.irq = irq;
@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_netdev;
 
-   /* Set addr_assign_type here, ltq_etop_set_mac_address would reset it. 
*/
+   /* Set addr_assign_type here,
+*ltq_etop_set_mac_address would reset it.
+*/
if (random_mac)
dev->addr_assign_type = NET_ADDR_RANDOM;
 
-- 
1.7.9.5

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


[PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav
Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/net/ethernet/lantiq_etop.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c
index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -282,7 +282,7 @@ ltq_etop_hw_init(struct net_device *dev)
 
if (IS_TX(i)) {
ltq_dma_alloc_tx(ch-dma);
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
etop_tx, priv);
} else if (IS_RX(i)) {
ltq_dma_alloc_rx(ch-dma);
@@ -291,7 +291,7 @@ ltq_etop_hw_init(struct net_device *dev)
if (ltq_etop_alloc_skb(ch))
return -ENOMEM;
ch-dma.desc = 0;
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
etop_rx, priv);
}
ch-dma.irq = irq;
@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_netdev;
 
-   /* Set addr_assign_type here, ltq_etop_set_mac_address would reset it. 
*/
+   /* Set addr_assign_type here,
+*ltq_etop_set_mac_address would reset it.
+*/
if (random_mac)
dev-addr_assign_type = NET_ADDR_RANDOM;
 
-- 
1.7.9.5

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


Re: [PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav
It's a single patch. Please don't be confused with the subject [PATCH 
17/17]. I forgot to edit this before sending.

my apology for mistake

On Friday 09 August 2013 11:55 PM, Kumar Gaurav wrote:

Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/net/ethernet/lantiq_etop.c |8 +---
  1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c
index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -282,7 +282,7 @@ ltq_etop_hw_init(struct net_device *dev)
  
  		if (IS_TX(i)) {

ltq_dma_alloc_tx(ch-dma);
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
etop_tx, priv);
} else if (IS_RX(i)) {
ltq_dma_alloc_rx(ch-dma);
@@ -291,7 +291,7 @@ ltq_etop_hw_init(struct net_device *dev)
if (ltq_etop_alloc_skb(ch))
return -ENOMEM;
ch-dma.desc = 0;
-   request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
+   request_irq(irq, ltq_etop_dma_irq, 0,
etop_rx, priv);
}
ch-dma.irq = irq;
@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_netdev;
  
-	/* Set addr_assign_type here, ltq_etop_set_mac_address would reset it. */

+   /* Set addr_assign_type here,
+*ltq_etop_set_mac_address would reset it.
+*/
if (random_mac)
dev-addr_assign_type = NET_ADDR_RANDOM;
  


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


Re: [PATCH 17/17] net:ethernet:lantiq_etop.c: Removed deprecated IRQF_DISABLED

2013-08-09 Thread Kumar Gaurav

On Saturday 10 August 2013 01:08 AM, Sergei Shtylyov wrote:

Hello.

On 08/09/2013 10:25 PM, Kumar Gaurav wrote:


Removed IRQF_DISABLED as it is deprecated and fixed a coding style issue
of more than 80 chars on single line by sliting the line in two.


   That's clearly a material for 2 separate patches.


Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  drivers/net/ethernet/lantiq_etop.c |8 +---
  1 file changed, 5 insertions(+), 3 deletions(-)


diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c

index bfdb0686..04c3a82 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c

[...]

@@ -653,7 +653,9 @@ ltq_etop_init(struct net_device *dev)
  if (err)
  goto err_netdev;

-/* Set addr_assign_type here, ltq_etop_set_mac_address would 
reset it. */

+/* Set addr_assign_type here,
+ *ltq_etop_set_mac_address would reset it.


   You forgot space after * here.

WBR, Sergei


Okay i'll be sending them in separate and correcting a space issue as told.
thanks

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


Re: [PATCH]arch:avr32:kernel:time.c: Removed IRQF_DISABLED

2013-08-08 Thread Kumar Gaurav
Please ignore the below patch. I'll be resending this with 0 instead of 
IRQF_TRIGGER_NONE

On Friday 09 August 2013 08:47 AM, Kumar Gaurav wrote:

Removed IRQF_DISABLED as it's no-op and should be removed

Signed-off-by: Kumar Gaurav 
---
  arch/avr32/kernel/time.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 869a1c6..0566c81 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
  static struct irqaction timer_irqaction = {
.handler= timer_interrupt,
/* Oprofile uses the same irq as the timer, so allow it to be shared */
-   .flags  = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
+   .flags  = IRQF_TIMER | IRQF_TRIGGER_NONE | IRQF_SHARED,
.name   = "avr32_comparator",
  };
  


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


[PATCH]arch:avr32:kernel:time.c: Removed IRQF_DISABLED

2013-08-08 Thread Kumar Gaurav
Removed IRQF_DISABLED as it's no-op and should be removed

Signed-off-by: Kumar Gaurav 
---
 arch/avr32/kernel/time.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 869a1c6..0566c81 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction timer_irqaction = {
.handler= timer_interrupt,
/* Oprofile uses the same irq as the timer, so allow it to be shared */
-   .flags  = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
+   .flags  = IRQF_TIMER | IRQF_TRIGGER_NONE | IRQF_SHARED,
.name   = "avr32_comparator",
 };
 
-- 
1.7.9.5

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


[PATCH] Staging:zram:zram_drv.c Fixed Error of trailing whitespace

2013-08-08 Thread Kumar Gaurav
Fixed by removing trailing whitespace

Signed-off-by: Kumar Gaurav 
---
 drivers/staging/zram/zram_drv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 82c7202..f590715 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -169,7 +169,7 @@ static inline int is_partial_io(struct bio_vec *bvec)
 static inline int valid_io_request(struct zram *zram, struct bio *bio)
 {
u64 start, end, bound;
-   
+
/* unaligned request */
if (unlikely(bio->bi_sector & (ZRAM_SECTOR_PER_LOGICAL_BLOCK - 1)))
return 0;
-- 
1.7.9.5

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


[PATCH] Staging:zram:zram_drv.c Fixed Error of trailing whitespace

2013-08-08 Thread Kumar Gaurav
Fixed by removing trailing whitespace

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/staging/zram/zram_drv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 82c7202..f590715 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -169,7 +169,7 @@ static inline int is_partial_io(struct bio_vec *bvec)
 static inline int valid_io_request(struct zram *zram, struct bio *bio)
 {
u64 start, end, bound;
-   
+
/* unaligned request */
if (unlikely(bio-bi_sector  (ZRAM_SECTOR_PER_LOGICAL_BLOCK - 1)))
return 0;
-- 
1.7.9.5

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


[PATCH]arch:avr32:kernel:time.c: Removed IRQF_DISABLED

2013-08-08 Thread Kumar Gaurav
Removed IRQF_DISABLED as it's no-op and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 arch/avr32/kernel/time.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 869a1c6..0566c81 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction timer_irqaction = {
.handler= timer_interrupt,
/* Oprofile uses the same irq as the timer, so allow it to be shared */
-   .flags  = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
+   .flags  = IRQF_TIMER | IRQF_TRIGGER_NONE | IRQF_SHARED,
.name   = avr32_comparator,
 };
 
-- 
1.7.9.5

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


Re: [PATCH]arch:avr32:kernel:time.c: Removed IRQF_DISABLED

2013-08-08 Thread Kumar Gaurav
Please ignore the below patch. I'll be resending this with 0 instead of 
IRQF_TRIGGER_NONE

On Friday 09 August 2013 08:47 AM, Kumar Gaurav wrote:

Removed IRQF_DISABLED as it's no-op and should be removed

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
  arch/avr32/kernel/time.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 869a1c6..0566c81 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
  static struct irqaction timer_irqaction = {
.handler= timer_interrupt,
/* Oprofile uses the same irq as the timer, so allow it to be shared */
-   .flags  = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
+   .flags  = IRQF_TIMER | IRQF_TRIGGER_NONE | IRQF_SHARED,
.name   = avr32_comparator,
  };
  


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


[PATCH] Staging:xgifb:Fixed a warning of Space before semicolon

2013-08-04 Thread Kumar Gaurav
Fixed issue by removing Space before semicolon

Signed-off-by: Kumar Gaurav 
---
 drivers/staging/xgifb/vb_setmode.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/xgifb/vb_setmode.h 
b/drivers/staging/xgifb/vb_setmode.h
index 2c0a31c..679a822 100644
--- a/drivers/staging/xgifb/vb_setmode.h
+++ b/drivers/staging/xgifb/vb_setmode.h
@@ -13,7 +13,7 @@ extern void XGI_GetVBType(struct vb_device_info *);
 extern void XGI_SenseCRT1(struct vb_device_info *);
 extern unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
   struct xgi_hw_device_info *HwDeviceExtension,
-  unsigned short ModeNo) ;
+  unsigned short ModeNo);
 
 extern unsigned char XGI_SearchModeID(unsigned short ModeNo,
  unsigned short *ModeIdIndex,
-- 
1.7.9.5

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


[PATCH] Staging:xgifb:Fixed a warning of Space before semicolon

2013-08-04 Thread Kumar Gaurav
Fixed issue by removing Space before semicolon

Signed-off-by: Kumar Gaurav kumargauravgup...@gmail.com
---
 drivers/staging/xgifb/vb_setmode.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/xgifb/vb_setmode.h 
b/drivers/staging/xgifb/vb_setmode.h
index 2c0a31c..679a822 100644
--- a/drivers/staging/xgifb/vb_setmode.h
+++ b/drivers/staging/xgifb/vb_setmode.h
@@ -13,7 +13,7 @@ extern void XGI_GetVBType(struct vb_device_info *);
 extern void XGI_SenseCRT1(struct vb_device_info *);
 extern unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
   struct xgi_hw_device_info *HwDeviceExtension,
-  unsigned short ModeNo) ;
+  unsigned short ModeNo);
 
 extern unsigned char XGI_SearchModeID(unsigned short ModeNo,
  unsigned short *ModeIdIndex,
-- 
1.7.9.5

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