[PATCH 32/32] Staging/octeon-usb/octeon-hcd.c: Compression of lines for immediate return This patch compresses two lines in to a single line in file octeon-hcd.c

2016-07-22 Thread Nadim almas
if immediate return statement is found. It also removes variable
bytes_written as
it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following
semantic
patch for this compression function:

@@
expression ret;
identifier f;
@@

-ret =
+return
 f(...);
-return ret;

Signed-off-by: Nadim Almas
Acked-by: Julia Lawall 
---
 Makefile|  2 +-
 drivers/staging/octeon-usb/octeon-hcd.c | 16 
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 4fb6bea..3d9d77a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 7
 SUBLEVEL = 0
-EXTRAVERSION = -rc4
+EXTRAVERSION = -eudyptula-rc4
 NAME = Psychotic Stoned Sheep
 
 # *DOCUMENTATION*
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index 17442b3..b801c8a 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -508,15 +508,15 @@ static int octeon_map_urb_for_dma(struct usb_hcd *hcd, 
struct urb *urb,
 {
int ret;
 
-   ret = octeon_alloc_temp_buffer(urb, mem_flags);
-   if (ret)
-   return ret;
+ 
+   if (octeon_alloc_temp_buffer(urb, mem_flags))
+   return octeon_alloc_temp_buffer(urb, mem_flags);
 
-   ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
-   if (ret)
+
+   if (usb_hcd_map_urb_for_dma(hcd, urb, mem_flags))
octeon_free_temp_buffer(urb);
 
-   return ret;
+   return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
 }
 
 /**
@@ -542,8 +542,8 @@ static void octeon_unmap_urb_for_dma(struct usb_hcd *hcd, 
struct urb *urb)
  */
 static inline u32 cvmx_usb_read_csr32(struct octeon_hcd *usb, u64 address)
 {
-   u32 result = cvmx_read64_uint32(address ^ 4);
-   return result;
+
+   return cvmx_read64_uint32(address ^ 4);
 }
 
 /**
-- 
2.7.4



[PATCH 32/32] Staging: dgnc: dgnc_driver.h: fixed a 80 character line

2016-07-29 Thread Nadim almas
From: Nadim Almas 

Fixed a coding style issue.

Signed-off-by: Nadim Almas 
---
 drivers/staging/dgnc/dgnc_driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index 95ec729..8c0432a 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -398,7 +398,7 @@ extern uint dgnc_major; /* Our 
driver/mgmt major */
 extern int dgnc_poll_tick; /* Poll interval - 20 ms */
 extern spinlock_t  dgnc_global_lock;   /* Driver global spinlock */
 extern spinlock_t  dgnc_poll_lock; /* Poll scheduling lock */
-extern uintdgnc_num_boards;/* Total number of 
boards */
+extern uintdgnc_num_boards;/* Total number of boards */
 extern struct dgnc_board   *dgnc_board[MAXBOARDS]; /* Array of board
 * structs
 */
-- 
2.7.4



[PATCH 33/33] Staging: android: ion: ion.c: Compression of lines for

2016-07-29 Thread Nadim almas
This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable 
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:


@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   
+return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 




[PATCH 33/33] Staging: android: ion: ion.c: Compression of lines for

2016-07-30 Thread Nadim almas
This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable 
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:


@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   
+return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 




[PATCH 33/33] Staging: android: ion: ion.c: Compression of lines for

2016-07-30 Thread Nadim almas
This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable 
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:


@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-   int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   
+return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 




[PATCH 33/33] Staging: android: ion: ion.c: Compression of lines for

2016-07-30 Thread Nadim almas
This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable 
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:


@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-   int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+   return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 




[PATCH 33/33] Staging: android: ion: ion.c: Compression of lines for

2016-07-30 Thread Nadim almas
This patch compresses two lines in to a single line in file ion.c
if immediate return statement is found. It also removes variable 
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:


@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-   int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+   return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 




[PATCH 34/34] Staging: comedi: drivers: cd_pcidas: Compression of

2016-07-30 Thread Nadim almas
This patch compresses two lines in to a single line in file
cb_pcidas.c
if immediate return statement is found. It also removes variable
bytes_written as it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following
semantic patch for this compression function:

@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret

Signed-off-by: Nadim Almas 
---
 
 drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


 
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c 
b/drivers/staging/comedi/drivers/cb_pcidas64.c
index 1f9c08a..d30cf3d 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -1408,9 +1408,7 @@ static int set_ai_fifo_size(struct comedi_device *dev, 
unsigned int num_samples)
if (retval < 0)
return retval;
 
-   num_samples = retval * fifo->num_segments * fifo->sample_packing_ratio;
-
-   return num_samples;
+   return retval * fifo->num_segments * fifo->sample_packing_ratio;
 }
 
 /* query length of fifo */
-- 
2.7.4



[PATCH] Staging: android: ion: ion.c: Compression of lines for

2016-07-31 Thread Nadim almas
This patch compresses two lines in to a single line in file
ion.c
if immediate return statement is found.It also removes variable
ret as it is no longer needed.

ne using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:

@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-   int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+   return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 

-- 
2.7.4



[PATCH 31/32] staging: android: ion: ion.c fixed a 80 character line limit coding style issue

2016-07-24 Thread Nadim almas
From: sarique 

fixed a coding style issue.

Signed-off-by: Nadim almas 
---
 drivers/staging/android/ion/ion.c| 3 ++-
 drivers/staging/comedi/drivers/ssv_dnp.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index a2cf93b..52345df 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1358,7 +1358,8 @@ static long ion_ioctl(struct file *filp, unsigned int 
cmd, unsigned long arg)
struct ion_handle *handle;
 
mutex_lock(&client->lock);
-   handle = ion_handle_get_by_id_nolock(client, 
data.handle.handle);
+   handle = ion_handle_get_by_id_nolock(client,
+data.handle.handle);
if (IS_ERR(handle)) {
mutex_unlock(&client->lock);
return PTR_ERR(handle);
diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c 
b/drivers/staging/comedi/drivers/ssv_dnp.c
index f9f634f..5674427 100644
--- a/drivers/staging/comedi/drivers/ssv_dnp.c
+++ b/drivers/staging/comedi/drivers/ssv_dnp.c
@@ -121,9 +121,9 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
}
 
val = inb(CSCDR);
-   if (data[0] == COMEDI_OUTPUT)
+   if (data[0] == COMEDI_OUTPUT) 
val |= mask;
-   else
+else
val &= ~mask;
outb(val, CSCDR);
 
-- 
2.7.4



[PATCH] Staging: used dma_map_single in place of pci_map_single

2016-11-07 Thread Nadim Almas
pci_map_single is unneeded and can be replaced with dma_map_single
to avoid inconcitent api usage.
The Coccinelle semantic patch used to make this change is as follows:
@@ expression E1,E2,E3; @@
- pci_map_single(E1,
+ dma_map_single(&E1->dev,
 E2, E3,
(
- PCI_DMA_BIDIRECTIONAL
+ DMA_BIDIRCTIONAL
|
- PCI_DMA_TODEVICE
+ DMA_TO_DEVICE
|
- PCI_DMA_FROMDEVICE
+ DMA_FROM_DEVICE
|
- PCI_DMA_NONE
+ DMA_NONE_DEVICE
)
  )
Signed-off-by: Nadim Almas 
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 ++
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 12 ++--
 drivers/staging/slicoss/slicoss.c  | 12 ++--
 3 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c 
b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 8d6bca6..a3c8c3a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1184,8 +1184,9 @@ void  rtl92e_fill_tx_desc(struct net_device *dev, struct 
tx_desc *pdesc,
  struct cb_desc *cb_desc, struct sk_buff *skb)
 {
struct r8192_priv *priv = rtllib_priv(dev);
-   dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len,
-PCI_DMA_TODEVICE);
+   dma_addr_t mapping = dma_map_single(&priv->pdev->dev, skb->data,
+   skb->len,
+   DMA_TO_DEVICE);
struct tx_fwinfo_8190pci *pTxFwInfo;
 
pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data;
@@ -1292,8 +1293,9 @@ void  rtl92e_fill_tx_cmd_desc(struct net_device *dev, 
struct tx_desc_cmd *entry,
  struct cb_desc *cb_desc, struct sk_buff *skb)
 {
struct r8192_priv *priv = rtllib_priv(dev);
-   dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len,
-PCI_DMA_TODEVICE);
+   dma_addr_t mapping = dma_map_single(&priv->pdev->dev, skb->data,
+   skb->len,
+   DMA_TO_DEVICE);
 
if (pci_dma_mapping_error(priv->pdev, mapping))
netdev_err(dev, "%s(): DMA Mapping error\n", __func__);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f985d88..ddd6523 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1826,10 +1826,10 @@ static short _rtl92e_alloc_rx_ring(struct net_device 
*dev)
skb->dev = dev;
priv->rx_buf[rx_queue_idx][i] = skb;
mapping = (dma_addr_t *)skb->cb;
-   *mapping = pci_map_single(priv->pdev,
+   *mapping = dma_map_single(&priv->pdev->dev,
skb_tail_pointer_rsl(skb),
priv->rxbuffersize,
- PCI_DMA_FROMDEVICE);
+ DMA_FROM_DEVICE);
if (pci_dma_mapping_error(priv->pdev, *mapping)) {
dev_kfree_skb_any(skb);
return -1;
@@ -2104,10 +2104,10 @@ static void _rtl92e_rx_normal(struct net_device *dev)
 
priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]] =
 skb;
-   *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev,
-   skb_tail_pointer_rsl(skb),
-   priv->rxbuffersize,
-   PCI_DMA_FROMDEVICE);
+   *((dma_addr_t *) skb->cb) = dma_map_single(&priv->pdev->dev,
+   skb_tail_pointer_rsl(skb),
+  priv->rxbuffersize,
+  DMA_FROM_DEVICE);
if (pci_dma_mapping_error(priv->pdev,
  *((dma_addr_t *)skb->cb))) {
dev_kfree_skb_any(skb);
diff --git a/drivers/staging/slicoss/slicoss.c 
b/drivers/staging/slicoss/slicoss.c
index 062307a..2d76bfd 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1452,10 +1452,10 @@ static int slic_rcvqueue_fill(struct adapter *adapter)
skb = alloc_skb(SLIC_RCVQ_RCVBUFSIZE, GFP_ATOMIC);
if (skb) {
paddr = (void *)(unsigned long)
-   pci_map_single(adapter->pcidev,
+ 

[PATCH] Staging:greybus:arche-apb-ctrl: fixed some coding style issue

2016-10-11 Thread Nadim Almas
fixed trailing */ Block comments and 80 character line limit coding style issue

Signed-off-by: Nadim Almas 
---


 drivers/staging/greybus/arche-apb-ctrl.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c 
b/drivers/staging/greybus/arche-apb-ctrl.c
index 70323aa..eeba912 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -168,7 +168,10 @@ static int standby_boot_seq(struct platform_device *pdev)
if (apb->init_disabled)
return 0;
 
-   /* Even if it is in OFF state, then we do not want to change the state 
*/
+   /*
+* Even if it is in OFF state,
+* then we do not want to change the state
+*/
if (apb->state == ARCHE_PLATFORM_STATE_STANDBY ||
apb->state == ARCHE_PLATFORM_STATE_OFF)
return 0;
@@ -183,7 +186,7 @@ static int standby_boot_seq(struct platform_device *pdev)
 * Pasted from WDM spec,
 *  - A falling edge on POWEROFF_L is detected (a)
 *  - WDM enters standby mode, but no output signals are changed
-* */
+*/
 
/* TODO: POWEROFF_L is input to WDM module  */
apb->state = ARCHE_PLATFORM_STATE_STANDBY;
@@ -286,7 +289,8 @@ static ssize_t state_store(struct device *dev,
return count;
 
/* First we want to make sure we power off everything
-* and then enter FW flashing state */
+* and then enter FW flashing state
+*/
poweroff_seq(pdev);
ret = fw_flashing_seq(pdev);
} else {
-- 
2.7.4



Re: [PATCH] Staging:greybus:arche-apb-ctrl: fixed some coding style issue

2016-10-12 Thread Nadim Almas
>Someone else already sent this same patch in before you, sorry
 But sir how can i come to know that Someone else already sent
particular patch  before sending that particular patch

On Wed, Oct 12, 2016 at 6:55 PM, Greg KH  wrote:
> On Tue, Oct 11, 2016 at 12:49:54PM -0700, Nadim Almas wrote:
>> fixed trailing */ Block comments and 80 character line limit coding style 
>> issue
>>
>> Signed-off-by: Nadim Almas 
>> ---
>
> Someone else already sent this same patch in before you, sorry :(


[PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue

2016-10-13 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/ks7010/eap_packet.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/eap_packet.h 
b/drivers/staging/ks7010/eap_packet.h
index df7f760..90432ff 100644
--- a/drivers/staging/ks7010/eap_packet.h
+++ b/drivers/staging/ks7010/eap_packet.h
@@ -58,11 +58,13 @@ struct ieee802_1x_eapol_key {
 * encrypt the Key field; 64-bit NTP timestamp MAY be used here
 */
unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
-   unsigned char key_iv[IEEE8021X_KEY_IV_LEN]; /* cryptographically 
random number */
+   unsigned char key_iv[IEEE8021X_KEY_IV_LEN];
+   /* cryptographically random number */
unsigned char key_index;/*
 * key flag in the most significant bit:
 * 0 = broadcast (default key),
-* 1 = unicast (key mapping key); key 
index is in the
+* 1 = unicast (key mapping key); key
+* index is in the
 * 7 least significant bits
 */
/*
-- 
2.7.4



[PATCH v2] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue

2016-10-13 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
Changes in v2:
  -Comment is taken from below line.

 drivers/staging/ks7010/eap_packet.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/eap_packet.h 
b/drivers/staging/ks7010/eap_packet.h
index df7f760..90432ff 100644
--- a/drivers/staging/ks7010/eap_packet.h
+++ b/drivers/staging/ks7010/eap_packet.h
@@ -58,11 +58,13 @@ struct ieee802_1x_eapol_key {
 * encrypt the Key field; 64-bit NTP timestamp MAY be used here
 */
unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
-   unsigned char key_iv[IEEE8021X_KEY_IV_LEN]; /* cryptographically 
random number */
+   unsigned char key_iv[IEEE8021X_KEY_IV_LEN];
+   /* cryptographically random number */
unsigned char key_index;/*
 * key flag in the most significant bit:
 * 0 = broadcast (default key),
-* 1 = unicast (key mapping key); key 
index is in the
+* 1 = unicast (key mapping key); key
+* index is in the
 * 7 least significant bits
 */
/*
--
2.7.4



[PATCH] Staging:ks7010:ks7010_sdio: fixed some coding style issue

2016-10-13 Thread Nadim Almas
fixed trailing */ Block comments and 80 character line limit coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/ks7010/ks7010_sdio.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index b02980d..40974e3 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -495,8 +495,11 @@ static void ks7010_rw_function(struct work_struct *work)
/* wiat after WAKEUP */
while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) {
DPRINTK(4, "wait after WAKEUP\n");
-/* 
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,&priv->ks_wlan_hw.rw_wq,
-   (priv->last_wakeup + ((30*HZ)/1000) - jiffies));*/
+   /*
+* queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
+* &priv->ks_wlan_hw.rw_wq,
+* (priv->last_wakeup + ((30*HZ)/1000) - jiffies));
+*/
dev_info(&priv->ks_wlan_hw.sdio_card->func->dev,
 "wake: %lu %lu\n",
 priv->last_wakeup + (30 * HZ) / 1000,
--
2.7.4



[PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-10-05 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/dgnc/dgnc_neo.h | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h
index abddd48..65994e3 100644
--- a/drivers/staging/dgnc/dgnc_neo.h
+++ b/drivers/staging/dgnc/dgnc_neo.h
@@ -30,7 +30,8 @@
 struct neo_uart_struct {
u8 txrx;/* WR  RHR/THR - Holding Reg */
u8 ier; /* WR  IER - Interrupt Enable Reg */
-   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo 
Control Reg */
+   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo Control */
+   /*Reg */
u8 lcr; /* WR  LCR - Line Control Reg */
u8 mcr; /* WR  MCR - Modem Control Reg */
u8 lsr; /* WR  LSR - Line Status Reg */
@@ -108,7 +109,8 @@ struct neo_uart_struct {
 /* 17158 Extended IIR's */
 #define UART_17158_IIR_RDI_TIMEOUT 0x0C/* Receiver data TIMEOUT */
 #define UART_17158_IIR_XONXOFF 0x10/* Received an XON/XOFF char */
-#define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20/* CTS/DSR or RTS/DTR 
state change */
+#define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20/* CTS/DSR or RTS/DTR 
state */
+   /* change */
 #define UART_17158_IIR_FIFO_ENABLED0xC0/* 16550 FIFOs are Enabled */
 
 /*
@@ -119,8 +121,10 @@ struct neo_uart_struct {
 #define UART_17158_RXRDY_TIMEOUT   0x2 /* RX Ready Timeout */
 #define UART_17158_TXRDY   0x3 /* TX Ready */
 #define UART_17158_MSR 0x4 /* Modem State Change */
-#define UART_17158_TX_AND_FIFO_CLR 0x40/* Transmitter Holding Reg 
Empty */
-#define UART_17158_RX_FIFO_DATA_ERROR  0x80/* UART detected an RX FIFO 
Data error */
+#define UART_17158_TX_AND_FIFO_CLR 0x40/* Transmitter Holding Reg */
+   /* Empty */
+#define UART_17158_RX_FIFO_DATA_ERROR  0x80/* UART detected an RX FIFO */
+   /* Data error */
 
 /*
  * These are the EXTENDED definitions for the 17C158's Interrupt
@@ -132,8 +136,10 @@ struct neo_uart_struct {
 #define UART_17158_EFR_RTSDTR  0x40/* Auto RTS/DTR Flow Control Enable */
 #define UART_17158_EFR_CTSDSR  0x80/* Auto CTS/DSR Flow COntrol Enable */
 
-#define UART_17158_XOFF_DETECT 0x1 /* Indicates whether chip saw an 
incoming XOFF char  */
-#define UART_17158_XON_DETECT  0x2 /* Indicates whether chip saw an 
incoming XON char */
+#define UART_17158_XOFF_DETECT 0x1 /* Indicates whether chip saw an */
+   /* incoming XOFF char  */
+#define UART_17158_XON_DETECT  0x2 /* Indicates whether chip saw an */
+   /* incoming XON char */
 
 #define UART_17158_IER_RSVD1   0x10/* Reserved by Exar */
 #define UART_17158_IER_XOFF0x20/* Xoff Interrupt Enable */
-- 
2.7.4



Re: [PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-10-06 Thread Nadim Almas
May be it is not looking better than yours but it removed 6 warning of
the file which is shown by running "perl scripts/checkpatch.pl -f
drivers/staging/dgnc/* | less" commend

On Thu, Oct 6, 2016 at 10:51 AM, Greg KH  wrote:
> On Wed, Oct 05, 2016 at 02:53:58PM -0700, Nadim Almas wrote:
>> Fixed coding style issue
>>
>> Signed-off-by: Nadim Almas 
>> ---
>>  drivers/staging/dgnc/dgnc_neo.h | 18 --
>>  1 file changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/staging/dgnc/dgnc_neo.h 
>> b/drivers/staging/dgnc/dgnc_neo.h
>> index abddd48..65994e3 100644
>> --- a/drivers/staging/dgnc/dgnc_neo.h
>> +++ b/drivers/staging/dgnc/dgnc_neo.h
>> @@ -30,7 +30,8 @@
>>  struct neo_uart_struct {
>>   u8 txrx;/* WR  RHR/THR - Holding Reg */
>>   u8 ier; /* WR  IER - Interrupt Enable Reg */
>> - u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo 
>> Control Reg */
>> + u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo Control */
>> + /*Reg 
>> */
>
> Does that really look better now than it did before?
>
> I don't think so :(
>
> sorry,
>
> greg k-h


Re: [PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-10-06 Thread Nadim Almas
May be it is not looking better than it did before but it removed 6 warning of
the file which is shown by running "perl scripts/checkpatch.pl -f
drivers/staging/dgnc/* | less" commend
than why it is not acceptable

On Thu, Oct 6, 2016 at 1:52 PM, Nadim Almas  wrote:
> May be it is not looking better than yours but it removed 6 warning of
> the file which is shown by running "perl scripts/checkpatch.pl -f
> drivers/staging/dgnc/* | less" commend
>
> On Thu, Oct 6, 2016 at 10:51 AM, Greg KH  wrote:
>> On Wed, Oct 05, 2016 at 02:53:58PM -0700, Nadim Almas wrote:
>>> Fixed coding style issue
>>>
>>> Signed-off-by: Nadim Almas 
>>> ---
>>>  drivers/staging/dgnc/dgnc_neo.h | 18 --
>>>  1 file changed, 12 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/staging/dgnc/dgnc_neo.h 
>>> b/drivers/staging/dgnc/dgnc_neo.h
>>> index abddd48..65994e3 100644
>>> --- a/drivers/staging/dgnc/dgnc_neo.h
>>> +++ b/drivers/staging/dgnc/dgnc_neo.h
>>> @@ -30,7 +30,8 @@
>>>  struct neo_uart_struct {
>>>   u8 txrx;/* WR  RHR/THR - Holding Reg */
>>>   u8 ier; /* WR  IER - Interrupt Enable Reg */
>>> - u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo 
>>> Control Reg */
>>> + u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo Control */
>>> + /*Reg 
>>> */
>>
>> Does that really look better now than it did before?
>>
>> I don't think so :(
>>
>> sorry,
>>
>> greg k-h


[PATCH] Staging:fbtft/fb_s6d02a1.c: fixed 80 character line limit coding

2016-10-07 Thread Nadim Almas
style issue

Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/fbtft/fb_s6d02a1.c | 30 --
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/fbtft/fb_s6d02a1.c 
b/drivers/staging/fbtft/fb_s6d02a1.c
index 774b0ff..bc0c48f 100644
--- a/drivers/staging/fbtft/fb_s6d02a1.c
+++ b/drivers/staging/fbtft/fb_s6d02a1.c
@@ -30,20 +30,27 @@ static int default_init_sequence[] = {
 
-1, 0xfc, 0x5a, 0x5a,
 
-   -1, 0xfa, 0x02, 0x1f, 0x00, 0x10, 0x22, 0x30, 0x38, 0x3A, 0x3A, 0x3A, 
0x3A, 0x3A, 0x3d, 0x02, 0x01,
+   -1, 0xfa, 0x02, 0x1f, 0x00, 0x10, 0x22, 0x30, 0x38, 0x3A, 0x3A, 0x3A,
+   0x3A, 0x3A, 0x3d, 0x02, 0x01,
 
-   -1, 0xfb, 0x21, 0x00, 0x02, 0x04, 0x07, 0x0a, 0x0b, 0x0c, 0x0c, 0x16, 
0x1e, 0x30, 0x3f, 0x01, 0x02,
+   -1, 0xfb, 0x21, 0x00, 0x02, 0x04, 0x07, 0x0a, 0x0b, 0x0c, 0x0c, 0x16,
+   0x1e, 0x30, 0x3f, 0x01, 0x02,
 
/* power setting sequence */
-   -1, 0xfd, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x01, 0x01, 0x00, 0x1f, 
0x1f,
+   -1, 0xfd, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x01, 0x01, 0x00, 0x1f,
+   0x1f,
 
-   -1, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 
0x36, 0x00, 0x3C, 0x36, 0x00,
+   -1, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C,
+   0x36, 0x00, 0x3C, 0x36, 0x00,
 
-   -1, 0xf5, 0x00, 0x70, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x6d, 0x66, 0x06,
+   -1, 0xf5, 0x00, 0x70, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x6d, 0x66, 0x06,
 
-   -1, 0xf6, 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x01, 
0x00,
+   -1, 0xf6, 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x01,
+   0x00,
 
-   -1, 0xf2, 0x00, 0x01, 0x03, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x01, 0x00, 0x00, 0x04, 0x08, 0x08,
+   -1, 0xf2, 0x00, 0x01, 0x03, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x08, 0x08,
 
-1, 0xf8, 0x11,
 
@@ -63,7 +70,8 @@ static int default_init_sequence[] = {
-1, 0xf3, 0x00, 0x0f,
-2, 50,
 
-   -1, 0xf4, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 
0x36, 0x00, 0x3C, 0x36, 0x00,
+   -1, 0xf4, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07,
+   0x00, 0x3C, 0x36, 0x00, 0x3C, 0x36, 0x00,
-2, 50,
 
-1, 0xf3, 0x00, 0x1f,
@@ -74,9 +82,11 @@ static int default_init_sequence[] = {
-1, 0xf3, 0x00, 0xff,
-2, 50,
 
-   -1, 0xfd, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x00, 0x01, 0x00, 0x16, 
0x16,
+   -1, 0xfd, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x00, 0x01,
+   0x00, 0x16, 0x16,
 
-   -1, 0xf4, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 
0x36, 0x00, 0x3C, 0x36, 0x00,
+   -1, 0xf4, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C,
+   0x36, 0x00, 0x3C, 0x36, 0x00,
 
/* initializing sequence */
 
-- 
2.7.4



Re: [PATCH] Staging:fbtft/fb_s6d02a1.c: fixed 80 character line limit coding

2016-10-07 Thread Nadim Almas
why its seems worst to you i am just removing  "80 character line
limit coding style"
for the last 3 months I am trying to submit my first patch but patch
is not accepted by you by giving reason i can't able to understand
please help me

On Fri, Oct 7, 2016 at 10:37 PM, Greg KH  wrote:
> On Fri, Oct 07, 2016 at 08:43:02AM -0700, Nadim Almas wrote:
>> style issue
>>
>> Fixed coding style issue
>
> This does not seem like valid sentances that mean much to me.  Do they
> to you?
>
>>
>> Signed-off-by: Nadim Almas 
>> ---
>>  drivers/staging/fbtft/fb_s6d02a1.c | 30 --
>>  1 file changed, 20 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/staging/fbtft/fb_s6d02a1.c 
>> b/drivers/staging/fbtft/fb_s6d02a1.c
>> index 774b0ff..bc0c48f 100644
>> --- a/drivers/staging/fbtft/fb_s6d02a1.c
>> +++ b/drivers/staging/fbtft/fb_s6d02a1.c
>> @@ -30,20 +30,27 @@ static int default_init_sequence[] = {
>>
>>   -1, 0xfc, 0x5a, 0x5a,
>>
>> - -1, 0xfa, 0x02, 0x1f, 0x00, 0x10, 0x22, 0x30, 0x38, 0x3A, 0x3A, 0x3A, 
>> 0x3A, 0x3A, 0x3d, 0x02, 0x01,
>> + -1, 0xfa, 0x02, 0x1f, 0x00, 0x10, 0x22, 0x30, 0x38, 0x3A, 0x3A, 0x3A,
>> + 0x3A, 0x3A, 0x3d, 0x02, 0x01,
>
> This looks worse to me now, remember, checkpatch.pl is a "hint", not a
> hard-and-fast-rule.  Use it wisely.
>
> greg k-h


[PATCH] Staging:greybus:arche-apb-ctrl: fix trailing */ Block comments and 80 character line limit coding style issue

2016-10-07 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/greybus/arche-apb-ctrl.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c 
b/drivers/staging/greybus/arche-apb-ctrl.c
index 70323aa..eeba912 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -168,7 +168,10 @@ static int standby_boot_seq(struct platform_device *pdev)
if (apb->init_disabled)
return 0;
 
-   /* Even if it is in OFF state, then we do not want to change the state 
*/
+   /*
+*Even if it is in OFF state,
+*then we do not want to change the state
+*/
if (apb->state == ARCHE_PLATFORM_STATE_STANDBY ||
apb->state == ARCHE_PLATFORM_STATE_OFF)
return 0;
@@ -183,7 +186,7 @@ static int standby_boot_seq(struct platform_device *pdev)
 * Pasted from WDM spec,
 *  - A falling edge on POWEROFF_L is detected (a)
 *  - WDM enters standby mode, but no output signals are changed
-* */
+*/
 
/* TODO: POWEROFF_L is input to WDM module  */
apb->state = ARCHE_PLATFORM_STATE_STANDBY;
@@ -286,7 +289,8 @@ static ssize_t state_store(struct device *dev,
return count;
 
/* First we want to make sure we power off everything
-* and then enter FW flashing state */
+* and then enter FW flashing state
+*/
poweroff_seq(pdev);
ret = fw_flashing_seq(pdev);
} else {
-- 
2.7.4



[PATCH v2 1/2] Staging:greybus:arche-apb-ctrl: fix trailing */ Block comments and 80 character line limit coding style issue

2016-10-07 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
Changes in v2:
  - Used space after leading * in block comments.

 drivers/staging/greybus/arche-apb-ctrl.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c 
b/drivers/staging/greybus/arche-apb-ctrl.c
index 70323aa..eeba912 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -168,7 +168,10 @@ static int standby_boot_seq(struct platform_device *pdev)
if (apb->init_disabled)
return 0;
 
-   /* Even if it is in OFF state, then we do not want to change the state 
*/
+   /*
+* Even if it is in OFF state,
+* then we do not want to change the state
+*/
if (apb->state == ARCHE_PLATFORM_STATE_STANDBY ||
apb->state == ARCHE_PLATFORM_STATE_OFF)
return 0;
@@ -183,7 +186,7 @@ static int standby_boot_seq(struct platform_device *pdev)
 * Pasted from WDM spec,
 *  - A falling edge on POWEROFF_L is detected (a)
 *  - WDM enters standby mode, but no output signals are changed
-* */
+*/
 
/* TODO: POWEROFF_L is input to WDM module  */
apb->state = ARCHE_PLATFORM_STATE_STANDBY;
@@ -286,7 +289,8 @@ static ssize_t state_store(struct device *dev,
return count;
 
/* First we want to make sure we power off everything
-* and then enter FW flashing state */
+* and then enter FW flashing state
+*/
poweroff_seq(pdev);
ret = fw_flashing_seq(pdev);
} else {
-- 
2.7.4



[PATCH] Staging:wlan-ng:hfa384x: fixed 80 character line limit coding style issue

2016-10-21 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/wlan-ng/hfa384x.h | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h 
b/drivers/staging/wlan-ng/hfa384x.h
index 6337b1d..cca2652 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1349,7 +1349,9 @@ struct hfa384x {
  * interface
  */
 
-   struct hfa384x_caplevel cap_act_sta_mfi; /* sta f/w to modem interface 
*/
+   struct hfa384x_caplevel cap_act_sta_mfi; /*
+ * sta f/w to modem interface
+ */
 
struct hfa384x_caplevel cap_act_ap_cfi; /*
 * ap f/w to controller
@@ -1371,7 +1373,9 @@ struct hfa384x {
 
struct hfa384x_inf_frame *scanresults;
 
-   struct prism2sta_authlist authlist; /* Authenticated station list. 
*/
+   struct prism2sta_authlist authlist; /*
+* Authenticated station list
+*/
unsigned int accessmode;/* Access mode. */
struct prism2sta_accesslist allow;  /* Allowed station list. */
struct prism2sta_accesslist deny;   /* Denied station list. */
-- 
2.7.4



[PATCH] Staging:wilc1000:host_interface: fixed 80 character line limit coding style issue

2016-10-21 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/wilc1000/host_interface.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0c5dea7..6e6540f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -497,10 +497,12 @@ static void handle_cfg_param(struct wilc_vif *vif,
if (cfg_param_attr->flag & POWER_MANAGEMENT) {
if (cfg_param_attr->power_mgmt_mode < 5) {
wid_list[i].id = WID_POWER_MANAGEMENT;
-   wid_list[i].val = (s8 
*)&cfg_param_attr->power_mgmt_mode;
+   wid_list[i].val = (s8 *)&cfg_param_attr->
+  power_mgmt_mode;
wid_list[i].type = WID_CHAR;
wid_list[i].size = sizeof(char);
-   hif_drv->cfg_values.power_mgmt_mode = 
(u8)cfg_param_attr->power_mgmt_mode;
+   hif_drv->cfg_values.power_mgmt_mode =
+  (u8)cfg_param_attr->power_mgmt_mode;
} else {
netdev_err(vif->ndev, "Invalid power mode\n");
goto unlock;
-- 
2.7.4



[PATCH] Staging:vt6656:main_usb: fix Block comments should align the * on each line

2016-10-21 Thread Nadim Almas
Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Nadim Almas 
---
 drivers/staging/vt6656/main_usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index fe84da3..50d02d9 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -326,9 +326,9 @@ static int vnt_init_registers(struct vnt_private *priv)
priv->current_net_addr);
 
/*
-   * set BB and packet type at the same time
-   * set Short Slot Time, xIFS, and RSPINF
-   */
+* set BB and packet type at the same time
+* set Short Slot Time, xIFS, and RSPINF
+*/
if (priv->bb_type == BB_TYPE_11A)
priv->short_slot_time = true;
else
-- 
2.7.4



[PATCH] Staging:board:board: fix implicit declaration of function

2016-10-23 Thread Nadim Almas
implicit declaration of function ‘of_find_all_nodes’ reported by sparse

Signed-off-by: Nadim Almas 
---
 drivers/staging/board/board.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index 86dc411..6978db5 100644
--- a/drivers/staging/board/board.c
+++ b/drivers/staging/board/board.c
@@ -22,6 +22,7 @@
 
 #include "board.h"
 
+struct device_node *of_find_all_nodes(struct device_node *);
 static struct device_node *irqc_node __initdata;
 static unsigned int irqc_base __initdata;
 
-- 
2.7.4



[PATCH] Staging: i4l: act2000: capi: Removing necessary variable

2016-11-11 Thread Nadim Almas
Removing struct sk_buff *skb from capi.c

The Coccinelle semantic patch used to make this change is as follows:
@@
type T;
identifier D;
@@
- T D;
...when != D

Signed-off-by: Nadim Almas 
---
 drivers/staging/i4l/act2000/capi.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/i4l/act2000/capi.c 
b/drivers/staging/i4l/act2000/capi.c
index 61386a7..2c2c77e 100644
--- a/drivers/staging/i4l/act2000/capi.c
+++ b/drivers/staging/i4l/act2000/capi.c
@@ -183,7 +183,6 @@ static void
 actcapi_connect_b3_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(17, 0x82, 0x00);
ACTCAPI_CHKSKB;
@@ -304,7 +303,6 @@ void
 actcapi_select_b2_protocol_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(10, 0x40, 0x00);
ACTCAPI_CHKSKB;
@@ -339,7 +337,6 @@ static void
 actcapi_select_b3_protocol_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(17, 0x80, 0x00);
ACTCAPI_CHKSKB;
@@ -360,7 +357,6 @@ static void
 actcapi_listen_b3_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x81, 0x00);
ACTCAPI_CHKSKB;
@@ -372,7 +368,6 @@ static void
 actcapi_disconnect_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(3, 0x04, 0x00);
ACTCAPI_CHKSKB;
@@ -385,7 +380,6 @@ void
 actcapi_disconnect_b3_req(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(17, 0x84, 0x00);
ACTCAPI_CHKSKB;
@@ -402,7 +396,6 @@ void
 actcapi_connect_resp(act2000_card *card, act2000_chan *chan, __u8 cause)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(3, 0x02, 0x03);
ACTCAPI_CHKSKB;
@@ -420,7 +413,6 @@ static void
 actcapi_connect_active_resp(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x03, 0x03);
ACTCAPI_CHKSKB;
@@ -434,7 +426,6 @@ static void
 actcapi_connect_b3_resp(act2000_card *card, act2000_chan *chan, __u8 
rejectcause)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR((rejectcause ? 3 : 17), 0x82, 0x03);
ACTCAPI_CHKSKB;
@@ -454,7 +445,6 @@ static void
 actcapi_connect_b3_active_resp(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x83, 0x03);
ACTCAPI_CHKSKB;
@@ -467,7 +457,6 @@ static void
 actcapi_info_resp(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x07, 0x03);
ACTCAPI_CHKSKB;
@@ -479,7 +468,6 @@ static void
 actcapi_disconnect_b3_resp(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x84, 0x03);
ACTCAPI_CHKSKB;
@@ -493,7 +481,6 @@ static void
 actcapi_disconnect_resp(act2000_card *card, act2000_chan *chan)
 {
actcapi_msg *m;
-   struct sk_buff *skb;
 
ACTCAPI_MKHDR(2, 0x04, 0x03);
ACTCAPI_CHKSKB;
-- 
2.7.4



[PATCH] Staging:emxx_udc:emxx_udc: Compression of lines for immediate return

2016-10-31 Thread Nadim Almas
This patch compresses two lines into a single line
if immediate return statement is found. Remove variable data as
it is no longer needed.

It is done using script Coccinelle. And coccinelle uses the following
semantic patch for this compression function

@@
local idexpression ret;
expression e;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/emxx_udc/emxx_udc.c   | 4 +---
 
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index abe2aaf..31f4206 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -2979,9 +2979,7 @@ static int nbu2ss_gad_get_frame(struct usb_gadget 
*pgadget)
if (data == 0)
return -EINVAL;
 
-   data = _nbu2ss_readl(&udc->p_regs->USB_ADDRESS) & FRAME;
-
-   return data;
+   return _nbu2ss_readl(&udc->p_regs->USB_ADDRESS) & FRAME;
 }
 
 
2.7.4



[PATCH] Staging:media:davinci_vpfe: used devm_kzalloc in place of kzalloc

2016-11-01 Thread Nadim Almas
Switch to resource-managed function devm_kzalloc instead
of kzolloc and remove unneeded kzfree

Also, remove kzfree in probe function and  remove
function,vpfe_remove as it is now has nothing to do.
The Coccinelle semantic patch used to make this change is as follows:
/
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kzfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression prb.e;
@@
removefn(...) {
<...
- kzfree(e);
...>
}
//

Signed-off-by: Nadim Almas 
---
 drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c 
b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
index bf077f8..cd44f0f 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
@@ -579,7 +579,7 @@ static int vpfe_probe(struct platform_device *pdev)
struct resource *res1;
int ret = -ENOMEM;
 
-   vpfe_dev = kzalloc(sizeof(*vpfe_dev), GFP_KERNEL);
+   vpfe_dev = devm_kzalloc(&pdev->dev, sizeof(*vpfe_dev), GFP_KERNEL);
if (!vpfe_dev)
return ret;
 
@@ -681,7 +681,6 @@ static int vpfe_probe(struct platform_device *pdev)
 probe_disable_clock:
vpfe_disable_clock(vpfe_dev);
 probe_free_dev_mem:
-   kzfree(vpfe_dev);
 
return ret;
 }
@@ -702,7 +701,6 @@ static int vpfe_remove(struct platform_device *pdev)
v4l2_device_unregister(&vpfe_dev->v4l2_dev);
media_device_unregister(&vpfe_dev->media_dev);
vpfe_disable_clock(vpfe_dev);
-   kzfree(vpfe_dev);
 
return 0;
 }
-- 
2.7.4



[PATCH] Crypto: mv_cesa: Switch to using managed resources

2016-11-02 Thread Nadim Almas
Switch to resource-managed function devm_kzalloc instead
of kzalloc and remove unneeded kfree

Also, remove kfree in probe function and remove
function, mv_remove as it is now has nothing to do.
The Coccinelle semantic patch used to make this change is as follows:
//
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression prb.e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
//

Signed-off-by: Nadim Almas 
---
 drivers/crypto/mv_cesa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 104e9ce..451fa18 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -1073,7 +1073,7 @@ static int mv_probe(struct platform_device *pdev)
if (!res)
return -ENXIO;
 
-   cp = kzalloc(sizeof(*cp), GFP_KERNEL);
+   cp = devm_kzalloc(&pdev->dev, sizeof(*cp), GFP_KERNEL);
if (!cp)
return -ENOMEM;
 
@@ -1163,7 +1163,6 @@ static int mv_probe(struct platform_device *pdev)
 err_thread:
kthread_stop(cp->queue_th);
 err:
-   kfree(cp);
cpg = NULL;
return ret;
 }
@@ -1187,7 +1186,6 @@ static int mv_remove(struct platform_device *pdev)
clk_put(cp->clk);
}
 
-   kfree(cp);
cpg = NULL;
return 0;
 }
-- 
2.7.4



[PATCH] Staging:board:board: fix Block comments should align the * on each line

2016-10-24 Thread Nadim Almas
Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Nadim Almas 
---
 
 drivers/staging/dgnc/dgnc_tty.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


 
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index cf8aefd..94c4840 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -2707,7 +2707,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, 
unsigned int cmd,
uint loopback = 0;
/* Let go of locks when accessing user space,
 * could sleep
-   */
+*/
spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(loopback, (unsigned int __user *)arg);
if (rc)
-- 
2.7.4



[PATCH] Staging:fbtft: Replace decimal permissions with 4 digit octal

2016-10-24 Thread Nadim Almas
ERROR: Use 4 digit octal (0777) not decimal permissions

This error was detected by checkpatch.pl

Signed-off-by: Nadim Almas 
---
 drivers/staging/fbtft/fb_ili9325.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ili9325.c 
b/drivers/staging/fbtft/fb_ili9325.c
index 4ab4479..19e33ba 100644
--- a/drivers/staging/fbtft/fb_ili9325.c
+++ b/drivers/staging/fbtft/fb_ili9325.c
@@ -33,23 +33,23 @@
"04 16 2 7 6 3 2 1 7 7"
 
 static unsigned int bt = 6; /* VGL=Vci*4 , VGH=Vci*4 */
-module_param(bt, uint, 0);
+module_param(bt, uint, );
 MODULE_PARM_DESC(bt, "Sets the factor used in the step-up circuits");
 
 static unsigned int vc = 0x03; /* Vci1=Vci*0.80 */
-module_param(vc, uint, 0);
+module_param(vc, uint, );
 MODULE_PARM_DESC(vc, "Sets the ratio factor of Vci to generate the reference 
voltages Vci1");
 
 static unsigned int vrh = 0x0d; /* VREG1OUT=Vci*1.85 */
-module_param(vrh, uint, 0);
+module_param(vrh, uint, );
 MODULE_PARM_DESC(vrh, "Set the amplifying rate (1.6 ~ 1.9) of Vci applied to 
output the VREG1OUT");
 
 static unsigned int vdv = 0x12; /* VCOMH amplitude=VREG1OUT*0.98 */
-module_param(vdv, uint, 0);
+module_param(vdv, uint, );
 MODULE_PARM_DESC(vdv, "Select the factor of VREG1OUT to set the amplitude of 
Vcom");
 
 static unsigned int vcm = 0x0a; /* VCOMH=VREG1OUT*0.735 */
-module_param(vcm, uint, 0);
+module_param(vcm, uint, );
 MODULE_PARM_DESC(vcm, "Set the internal VcomH voltage");
 
 /*
-- 
2.7.4



[PATCH v2] Staging:dgnc:dgnc_tty: fix Block comments should align the * on each line

2016-10-25 Thread Nadim Almas
Block comments should align the * on each line as reported by checkpatch.pl

Signed-off-by: Nadim Almas 
---

Changes in v2:
  - Made subject better
 
 drivers/staging/dgnc/dgnc_tty.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


 
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index cf8aefd..94c4840 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -2707,7 +2707,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, 
unsigned int cmd,
uint loopback = 0;
/* Let go of locks when accessing user space,
 * could sleep
-   */
+*/
spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(loopback, (unsigned int __user *)arg);
if (rc)
-- 
2.7.4



[PATCH] Mfd: used devm_kzalloc in place of kzalloc

2016-11-05 Thread Nadim Almas
Switch to resource-managed function devm_kzalloc instead
of kzalloc and remove unneeded kzfree

Remove kfree in probe function and  remove
function as it is now has nothing to do

The Coccinelle semantic patch used to make this change is as follows:
//
@platform@
identifier p, probefn, removefn;
@@

struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2,x;
@@
probefn(struct platform_device *pdev, ...) {
... when != x = f(...);
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
-kfree(e);
... when != g(...);

}
@rem depends on prb@
identifier platform.removefn;
expression prb.e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
//

Signed-off-by: Nadim Almas 
---
 drivers/mfd/t7l66xb.c  | 4 +---
 drivers/mfd/tc6387xb.c | 4 +---
 drivers/mfd/tc6393xb.c | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 94bd89c..9a2086b 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -317,7 +317,7 @@ static int t7l66xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   t7l66xb = kzalloc(sizeof *t7l66xb, GFP_KERNEL);
+   t7l66xb = devm_kzalloc(&dev->dev, sizeof *t7l66xb, GFP_KERNEL);
if (!t7l66xb)
return -ENOMEM;
 
@@ -395,7 +395,6 @@ static int t7l66xb_probe(struct platform_device *dev)
clk_put(t7l66xb->clk32k);
 err_clk32k_get:
 err_noirq:
-   kfree(t7l66xb);
return ret;
 }
 
@@ -414,7 +413,6 @@ static int t7l66xb_remove(struct platform_device *dev)
iounmap(t7l66xb->scr);
release_resource(&t7l66xb->rscr);
mfd_remove_devices(&dev->dev);
-   kfree(t7l66xb);
 
return ret;
 
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
index 85fab37..aaab422 100644
--- a/drivers/mfd/tc6387xb.c
+++ b/drivers/mfd/tc6387xb.c
@@ -150,7 +150,7 @@ static int tc6387xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   tc6387xb = kzalloc(sizeof(*tc6387xb), GFP_KERNEL);
+   tc6387xb = devm_kzalloc(&dev->dev, sizeof(*tc6387xb), GFP_KERNEL);
if (!tc6387xb)
return -ENOMEM;
 
@@ -203,7 +203,6 @@ static int tc6387xb_probe(struct platform_device *dev)
clk_put(clk32k);
 err_no_clk:
 err_no_irq:
-   kfree(tc6387xb);
return ret;
 }
 
@@ -216,7 +215,6 @@ static int tc6387xb_remove(struct platform_device *dev)
release_resource(&tc6387xb->rscr);
clk_disable_unprepare(tc6387xb->clk32k);
clk_put(tc6387xb->clk32k);
-   kfree(tc6387xb);
 
return 0;
 }
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index d42d322..bdb48e0 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -622,7 +622,7 @@ static int tc6393xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL);
+   tc6393xb = devm_kzalloc(&dev->dev, sizeof *tc6393xb, GFP_KERNEL);
if (!tc6393xb) {
ret = -ENOMEM;
goto err_kzalloc;
@@ -735,7 +735,6 @@ static int tc6393xb_probe(struct platform_device *dev)
clk_put(tc6393xb->clk);
 err_noirq:
 err_clk_get:
-   kfree(tc6393xb);
 err_kzalloc:
return ret;
 }
@@ -761,7 +760,6 @@ static int tc6393xb_remove(struct platform_device *dev)
iounmap(tc6393xb->scr);
release_resource(&tc6393xb->rscr);
clk_put(tc6393xb->clk);
-   kfree(tc6393xb);
 
return ret;
 }
-- 
2.7.4



[PATCH] Mfd: used devm_kzalloc in place of kzalloc

2016-11-05 Thread Nadim Almas
Switch to resource-managed function devm_kzalloc instead
of kzalloc and remove unneeded kzfree

Remove kfree in probe function and  remove
function as it is now has nothing to do

The Coccinelle semantic patch used to make this change is as follows:
//
@platform@
identifier p, probefn, removefn;
@@

struct platform_driver p = {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2,x;
@@
probefn(struct platform_device *pdev, ...) {
... when != x = f(...);
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
-kfree(e);
... when != g(...);

}
@rem depends on prb@
identifier platform.removefn;
expression prb.e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
//

Signed-off-by: Nadim Almas 
---
 drivers/mfd/t7l66xb.c  | 4 +---
 drivers/mfd/tc6387xb.c | 4 +---
 drivers/mfd/tc6393xb.c | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 94bd89c..9a2086b 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -317,7 +317,7 @@ static int t7l66xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   t7l66xb = kzalloc(sizeof *t7l66xb, GFP_KERNEL);
+   t7l66xb = devm_kzalloc(&dev->dev, sizeof(*t7l66xb), GFP_KERNEL);
if (!t7l66xb)
return -ENOMEM;
 
@@ -395,7 +395,6 @@ static int t7l66xb_probe(struct platform_device *dev)
clk_put(t7l66xb->clk32k);
 err_clk32k_get:
 err_noirq:
-   kfree(t7l66xb);
return ret;
 }
 
@@ -414,7 +413,6 @@ static int t7l66xb_remove(struct platform_device *dev)
iounmap(t7l66xb->scr);
release_resource(&t7l66xb->rscr);
mfd_remove_devices(&dev->dev);
-   kfree(t7l66xb);
 
return ret;
 
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
index 85fab37..aaab422 100644
--- a/drivers/mfd/tc6387xb.c
+++ b/drivers/mfd/tc6387xb.c
@@ -150,7 +150,7 @@ static int tc6387xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   tc6387xb = kzalloc(sizeof(*tc6387xb), GFP_KERNEL);
+   tc6387xb = devm_kzalloc(&dev->dev, sizeof(*tc6387xb), GFP_KERNEL);
if (!tc6387xb)
return -ENOMEM;
 
@@ -203,7 +203,6 @@ static int tc6387xb_probe(struct platform_device *dev)
clk_put(clk32k);
 err_no_clk:
 err_no_irq:
-   kfree(tc6387xb);
return ret;
 }
 
@@ -216,7 +215,6 @@ static int tc6387xb_remove(struct platform_device *dev)
release_resource(&tc6387xb->rscr);
clk_disable_unprepare(tc6387xb->clk32k);
clk_put(tc6387xb->clk32k);
-   kfree(tc6387xb);
 
return 0;
 }
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index d42d322..bdb48e0 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -622,7 +622,7 @@ static int tc6393xb_probe(struct platform_device *dev)
if (!iomem)
return -EINVAL;
 
-   tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL);
+   tc6393xb = devm_kzalloc(&dev->dev, sizeof(*tc6393xb), GFP_KERNEL);
if (!tc6393xb) {
ret = -ENOMEM;
goto err_kzalloc;
@@ -735,7 +735,6 @@ static int tc6393xb_probe(struct platform_device *dev)
clk_put(tc6393xb->clk);
 err_noirq:
 err_clk_get:
-   kfree(tc6393xb);
 err_kzalloc:
return ret;
 }
@@ -761,7 +760,6 @@ static int tc6393xb_remove(struct platform_device *dev)
iounmap(tc6393xb->scr);
release_resource(&tc6393xb->rscr);
clk_put(tc6393xb->clk);
-   kfree(tc6393xb);
 
return ret;
 }
-- 
2.7.4



[PATCH] Staging: android: ion: ion.c: Compression of lines for

2016-08-02 Thread Nadim almas
This patch compresses two lines in to a single line in file
ion.c
if immediate return statement is found.It also removes variable
ret as it is no longer needed.

ne using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:

@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Nadim Almas 
---
 drivers/staging/android/ion/ion.c  | 8 +++-
 
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 52345df..271395b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -391,9 +391,7 @@ static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-   int ret;
 
-   ret = kref_put(&handle->ref, ion_handle_destroy);
-
-   return ret;
+   return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)
@@ -597,8 +595,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
return -ENODEV;
}
mutex_unlock(&client->lock);
-   ret = buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
-   return ret;
+   return buffer->heap->ops->phys(buffer->heap, buffer, addr, len);
 }
 EXPORT_SYMBOL(ion_phys);
 

-- 
2.7.4



[PATCH 1/1] Staging: comedi: cd_pcidas64.c: Compression of

2016-08-02 Thread Nadim almas
This patch compresses two lines in to a single line in file
cb_pcidas64.c
if immediate return statement is found.

It is done using script Coccinelle. And coccinelle uses following
semantic patch for this compression function:

@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret

Signed-off-by: Nadim Almas 
---
 
 drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


 
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c 
b/drivers/staging/comedi/drivers/cb_pcidas64.c
index 1f9c08a..d30cf3d 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -1408,9 +1408,7 @@ static int set_ai_fifo_size(struct comedi_device *dev, 
unsigned int num_samples)
if (retval < 0)
return retval;
 
-   num_samples = retval * fifo->num_segments * fifo->sample_packing_ratio;
-
-   return num_samples;
+   return retval * fifo->num_segments * fifo->sample_packing_ratio;
 }
 
 /* query length of fifo */
-- 
2.7.4



[PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-09-30 Thread Nadim Almas
Fixed coding style issue.

Signed-off-by: Nadim Almas 
---
 drivers/staging/dgnc/dgnc_neo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index e794056..bc15584 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -554,7 +554,8 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, 
uint port)
 * Rx Oruns. Exar says that an orun will NOT corrupt
 * the FIFO. It will just replace the holding register
 * with this new data byte. So basically just ignore this.
-* Probably we should eventually have an orun stat in our 
driver...
+* Probably we should eventually have an orun stat in our
+* driver...
 */
ch->ch_err_overrun++;
}
-- 
2.7.4



[PATCH 1/1] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-09-03 Thread Nadim Almas
Fixed coding style issue

Signed-off-by: Nadim Almas 
---
 drivers/staging/dgnc/dgnc_neo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 0974986..f07f69c 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1463,8 +1463,8 @@ static void neo_copy_data_from_queue_to_uart(struct 
channel_t *ch)
 
/*
 * If DTR Toggle mode is on, turn on DTR now if not already set,
-* and make sure we get an event when the data transfer has 
completed.
+* and make sure we get an event when the data transfer has com-
+* -pleted.
 */
if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) {
if (!(ch->ch_mostat & UART_MCR_DTR)) {
-- 
2.7.4



Fwd: [PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-10-02 Thread Nadim Almas
sir i am  new in linux kernel hacking so I just want to start with
something very simple ,so for sake of simplicity and learning I fixed
only one of these warning


Re: Fwd: [PATCH] Staging:dgnc:dgnc_neo: fixed 80 character line limit coding style issue

2016-10-02 Thread Nadim Almas
So my first patch is correct?

On Sun, Oct 2, 2016 at 9:39 PM, Greg KH  wrote:
> On Sun, Oct 02, 2016 at 09:13:32PM +0530, Nadim Almas wrote:
>> sir i am  new in linux kernel hacking so I just want to start with
>> something very simple ,so for sake of simplicity and learning I fixed
>> only one of these warning
>
> That's great, but next time try to do a little bit more, just fixing a
> single warning like that isn't all that useful overall, right?
>
> thanks,
>
> greg k-h