[PATCH] Code cleanup - nvec

2016-06-06 Thread Rithvik Patibandla
Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/nvec/nvec-keytable.h | 3 +--
 drivers/staging/nvec/nvec_power.c| 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/nvec/nvec-keytable.h 
b/drivers/staging/nvec/nvec-keytable.h
index 1dc22cb..b51f756 100644
--- a/drivers/staging/nvec/nvec-keytable.h
+++ b/drivers/staging/nvec/nvec-keytable.h
@@ -17,8 +17,7 @@
  * more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ * with this program; if not, it is already included in Linux.
  */
 
 static unsigned short code_tab_102us[] = {
diff --git a/drivers/staging/nvec/nvec_power.c 
b/drivers/staging/nvec/nvec_power.c
index fcbb0fa..09befbb 100644
--- a/drivers/staging/nvec/nvec_power.c
+++ b/drivers/staging/nvec/nvec_power.c
@@ -442,7 +442,7 @@ static struct platform_driver nvec_power_driver = {
.remove = nvec_power_remove,
.driver = {
   .name = "nvec-power",
-  }
+   }
 };
 
 module_platform_driver(nvec_power_driver);
-- 
2.7.4

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


[PATCH] Warnings in comedi_fops.c

2016-06-07 Thread Rithvik Patibandla
**Intro**
The following patch fixes warnings thrown by checkpatch.pl script. The
warnings are: 
"It is preferable to use WRITE_ONCE(, ) instead of
ACCESS_ONCE() = " 

"It is preferable to use READ_ONCE() instead of ACCESS_ONCE()"

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/comedi/comedi_fops.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 629080f..4d87596 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -312,8 +312,8 @@ static void comedi_file_reset(struct file *file)
}
cfp->last_attached = dev->attached;
cfp->last_detach_count = dev->detach_count;
-   ACCESS_ONCE(cfp->read_subdev) = read_s;
-   ACCESS_ONCE(cfp->write_subdev) = write_s;
+   WRITE_ONCE(cfp->read_subdev, read_s);
+   WRITE_ONCE(cfp->write_subdev, write_s);
 }
 
 static void comedi_file_check(struct file *file)
@@ -331,7 +331,7 @@ static struct comedi_subdevice 
*comedi_file_read_subdevice(struct file *file)
struct comedi_file *cfp = file->private_data;
 
comedi_file_check(file);
-   return ACCESS_ONCE(cfp->read_subdev);
+   return READ_ONCE(cfp->read_subdev);
 }
 
 static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file)
@@ -339,7 +339,7 @@ static struct comedi_subdevice 
*comedi_file_write_subdevice(struct file *file)
struct comedi_file *cfp = file->private_data;
 
comedi_file_check(file);
-   return ACCESS_ONCE(cfp->write_subdev);
+   return READ_ONCE(cfp->write_subdev);
 }
 
 static int resize_async_buffer(struct comedi_device *dev,
@@ -1992,7 +1992,7 @@ static int do_setrsubd_ioctl(struct comedi_device *dev, 
unsigned long arg,
!(s_old->async->cmd.flags & CMDF_WRITE))
return -EBUSY;
 
-   ACCESS_ONCE(cfp->read_subdev) = s_new;
+   WRITE_ONCE(cfp->read_subdev, s_new);
return 0;
 }
 
@@ -2034,7 +2034,7 @@ static int do_setwsubd_ioctl(struct comedi_device *dev, 
unsigned long arg,
(s_old->async->cmd.flags & CMDF_WRITE))
return -EBUSY;
 
-   ACCESS_ONCE(cfp->write_subdev) = s_new;
+   WRITE_ONCE(cfp->write_subdev, s_new);
return 0;
 }
 
-- 
2.7.4

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


[PATCH] staging:vt6656:card.c:Fix comment block issue

2016-06-11 Thread Rithvik Patibandla
Fix "Block comments use * on subsequent lines" and "Block comments use
*/ on trailing lines" warnings thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/card.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index a382fc6..607834c 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -47,7 +47,8 @@
 #include "usbpipe.h"
 
 /* const u16 cwRXBCNTSFOff[MAX_RATE] =
-   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */
+ *   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
+ */
 
 static const u16 cwRXBCNTSFOff[MAX_RATE] = {
192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3
-- 
2.7.4

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


[PATCH] Staging:sm750fb:ddk750_chip.c:Fixed coding style in comments

2016-06-12 Thread Rithvik Patibandla
The following patch fixes format of some comments.

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/sm750fb/ddk750_chip.c | 71 +++
 1 file changed, 38 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index f80ee77..8cb5cb9 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -70,11 +70,11 @@ static void setChipClock(unsigned int frequency)
pll.inputFreq = DEFAULT_INPUT_CLOCK; /* Defined in CLOCK.H */
pll.clockType = MXCLK_PLL;
 
-   /*
-   * Call calcPllValue() to fill up the other fields for PLL 
structure.
-   * Sometime, the chip cannot set up the exact clock required by 
User.
-   * Return value from calcPllValue() gives the actual possible 
clock.
-   */
+   /*
+* Call calcPllValue() to fill up the other fields for PLL structure.
+* Sometime, the chip cannot set up the exact clock required by User.
+* Return value from calcPllValue() gives the actual possible clock.
+*/
ulActualMxClk = calcPllValue(frequency, &pll);
 
/* Master Clock Control: MXCLK_PLL */
@@ -86,13 +86,15 @@ static void setMemoryClock(unsigned int frequency)
 {
unsigned int reg, divisor;
 
-   /* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. 
*/
+/* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */
if (getChipType() == SM750LE)
return;
 
if (frequency) {
-   /* Set the frequency to the maximum frequency that the DDR 
Memory can take
-   which is 336MHz. */
+   /*
+* Set the frequency to the maximum frequency that the DDR Memory can
+* take which is 336MHz.
+*/
if (frequency > MHz(336))
frequency = MHz(336);
 
@@ -133,13 +135,15 @@ static void setMasterClock(unsigned int frequency)
 {
unsigned int reg, divisor;
 
-   /* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. 
*/
+/* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */
if (getChipType() == SM750LE)
return;
 
if (frequency) {
-   /* Set the frequency to the maximum frequency that the SM750 
engine can
-   run, which is about 190 MHz. */
+   /*
+* Set the frequency to the maximum frequency that the SM750 engine can
+* run, which is about 190 MHz.
+*/
if (frequency > MHz(190))
frequency = MHz(190);
 
@@ -236,9 +240,10 @@ int ddk750_initHw(initchip_param_t *pInitParam)
setMasterClock(MHz(pInitParam->masterClock));
 
 
-   /* Reset the memory controller. If the memory controller is not reset 
in SM750,
-  the system might hang when sw accesses the memory.
-  The memory should be resetted after changing the MXCLK.
+   /*
+* Reset the memory controller. If the memory controller is not reset
+* in SM750, the system might hang when sw accesses the memory.The
+* memory should be resetted after changing the MXCLK.
 */
if (pInitParam->resetMemory == 1) {
reg = PEEK32(MISC_CTRL);
@@ -282,24 +287,23 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 }
 
 /*
-   monk liu @ 4/6/2011:
-  re-write the calculatePLL function of ddk750.
-  the original version function does not use some mathematics 
tricks and shortcut
-  when it doing the calculation of the best N,M,D combination
-  I think this version gives a little upgrade in speed
-
-   750 pll clock formular:
-   Request Clock = (Input Clock * M )/(N * X)
-
-   Input Clock = 14318181 hz
-   X = 2 power D
-   D ={0,1,2,3,4,5,6}
-   M = {1,...,255}
-   N = {2,...,15}
-*/
+ * monk liu @ 4/6/2011:
+ * re-write the calculatePLL function of ddk750. the original version
+ * function does not use some mathematics tricks and shortcut when it
+ * doing the calculation of the best N,M,D combination. I think this
+ * version gives a little upgrade in speed
+ *
+ * 750 pll clock formular:
+*  Request Clock = (Input Clock * M )/(N * X)
+ * Input Clock = 14318181 hz
+ * X = 2 power D
+ * D ={0,1,2,3,4,5,6}
+ * M = {1,...,255}
+ * N = {2,...,15}
+ */
 unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 {
-   /* as sm750 register definition, N located in 2,15 and M located in 
1,255   */
+/* as sm750 register definition, N located in 2,15 and M located in  1,255 */
int N, M, X, d;
int mini_diff;
unsigned int RN, quo, rem, fl_quo;
@@ -310,7 +314,8 @@ unsigned 

[PATCH 2/4]staging:vt6656:card.c: fix blank lines issue

2016-06-16 Thread Rithvik Patibandla
Fix "Blank lines aren't necessary after an open brace" check thrown by
checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/card.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index fde48e5..7a10e8f 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -66,7 +66,6 @@ static const u16 cwRXBCNTSFOff[MAX_RATE] = {
  */
 void vnt_set_channel(struct vnt_private *priv, u32 connection_channel)
 {
-
if (connection_channel > CB_MAX_CHANNEL || !connection_channel)
return;
 
@@ -168,7 +167,6 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 
rate_idx)
 static void vnt_calculate_ofdm_rate(u16 rate, u8 bb_type,
u8 *tx_rate, u8 *rsv_time)
 {
-
switch (rate) {
case RATE_6M:
if (bb_type == BB_TYPE_11A) {
@@ -479,7 +477,6 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
 
 u8 vnt_get_pkt_type(struct vnt_private *priv)
 {
-
if (priv->bb_type == BB_TYPE_11A || priv->bb_type == BB_TYPE_11B)
return (u8)priv->bb_type;
else if (vnt_ofdm_min_rate(priv))
@@ -566,7 +563,6 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
  */
 bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
 {
-
*current_tsf = priv->current_tsf;
 
return true;
@@ -585,7 +581,6 @@ bool vnt_get_current_tsf(struct vnt_private *priv, u64 
*current_tsf)
  */
 bool vnt_clear_current_tsf(struct vnt_private *priv)
 {
-
vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
 
priv->current_tsf = 0;
-- 
2.7.4

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


[PATCH 3/4]staging:vt6656:card.c: fix blank line issue

2016-06-16 Thread Rithvik Patibandla
Fix "Please use a blank line after function declaration" check thrown
by checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/card.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 7a10e8f..a3fa6d8 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -548,6 +548,7 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TSF, 0, 8, data);
 }
+
 /*
  * Description: Read NIC TSF counter
  *  Get local TSF counter
-- 
2.7.4

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


[PATCH 4/4]staging:vt6656:card.c: fix camel case issue

2016-06-16 Thread Rithvik Patibandla
Fix "Avoid camel case" issue thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/card.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index a3fa6d8..53b469c 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -46,11 +46,11 @@
 #include "key.h"
 #include "usbpipe.h"
 
-/* const u16 cwRXBCNTSFOff[MAX_RATE] =
+/* const u16 cw_rxbcntsf_off[MAX_RATE] =
  *   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
  */
 
-static const u16 cwRXBCNTSFOff[MAX_RATE] = {
+static const u16 cw_rxbcntsf_off[MAX_RATE] = {
192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3
 };
 
@@ -504,7 +504,7 @@ u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2)
u64 tsf_offset = 0;
u16 rx_bcn_offset;
 
-   rx_bcn_offset = cwRXBCNTSFOff[rx_rate % MAX_RATE];
+   rx_bcn_offset = cw_rxbcntsf_off[rx_rate % MAX_RATE];
 
tsf2 += (u64)rx_bcn_offset;
 
-- 
2.7.4

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


[PATCH 1/4]staging:vt6656:card.c:fix alignment checks

2016-06-16 Thread Rithvik Patibandla
Fix "Alignment should match with open paranthesis" check thrown by
checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/card.c | 60 +--
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 607834c..fde48e5 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -77,10 +77,10 @@ void vnt_set_channel(struct vnt_private *priv, u32 
connection_channel)
vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0);
 
vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNEL,
-   connection_channel, 0, 0, NULL);
+   connection_channel, 0, 0, NULL);
 
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG, MAC_REG_CHANNEL,
-   (u8)(connection_channel | 0x80));
+  (u8)(connection_channel | 0x80));
 }
 
 /*
@@ -127,11 +127,11 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, 
u16 rate_idx)
u16 ui = rate_idx;
 
dev_dbg(&priv->usb->dev, "%s basic rate: %d\n",
-   __func__,  priv->basic_rates);
+   __func__,  priv->basic_rates);
 
if (!vnt_ofdm_min_rate(priv)) {
dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
-   __func__, rate_idx);
+   __func__, rate_idx);
if (rate_idx > RATE_24M)
rate_idx = RATE_24M;
return rate_idx;
@@ -140,7 +140,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 
rate_idx)
while (ui > RATE_11M) {
if (priv->basic_rates & (1 << ui)) {
dev_dbg(&priv->usb->dev, "%s rate: %d\n",
-   __func__, ui);
+   __func__, ui);
return ui;
}
ui--;
@@ -166,7 +166,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 
rate_idx)
  *
  */
 static void vnt_calculate_ofdm_rate(u16 rate, u8 bb_type,
-   u8 *tx_rate, u8 *rsv_time)
+   u8 *tx_rate, u8 *rsv_time)
 {
 
switch (rate) {
@@ -268,20 +268,20 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
int i;
 
/*RSPINF_b_1*/
-   vnt_get_phy_field(priv, 14,
-   vnt_get_cck_rate(priv, RATE_1M), PK_TYPE_11B, &phy[0]);
+   vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_1M),
+ PK_TYPE_11B, &phy[0]);
 
/*RSPINF_b_2*/
-   vnt_get_phy_field(priv, 14,
-   vnt_get_cck_rate(priv, RATE_2M), PK_TYPE_11B, &phy[1]);
+   vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_2M),
+ PK_TYPE_11B, &phy[1]);
 
/*RSPINF_b_5*/
-   vnt_get_phy_field(priv, 14,
-   vnt_get_cck_rate(priv, RATE_5M), PK_TYPE_11B, &phy[2]);
+   vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_5M),
+ PK_TYPE_11B, &phy[2]);
 
/*RSPINF_b_11*/
-   vnt_get_phy_field(priv, 14,
-   vnt_get_cck_rate(priv, RATE_11M), PK_TYPE_11B, &phy[3]);
+   vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_11M),
+ PK_TYPE_11B, &phy[3]);
 
/*RSPINF_a_6*/
vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]);
@@ -300,19 +300,19 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
 
/*RSPINF_a_36*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M),
-   bb_type, &tx_rate[5], &rsv_time[5]);
+   bb_type, &tx_rate[5], &rsv_time[5]);
 
/*RSPINF_a_48*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M),
-   bb_type, &tx_rate[6], &rsv_time[6]);
+   bb_type, &tx_rate[6], &rsv_time[6]);
 
/*RSPINF_a_54*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
-   bb_type, &tx_rate[7], &rsv_time[7]);
+   bb_type, &tx_rate[7], &rsv_time[7]);
 
/*RSPINF_a_72*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
-   bb_type, &tx_rate[8], &rsv_time[8]);
+   bb_type, &tx_rate[8], &rsv_time[8]);
 
put_unaligned(phy[0].len, (u16 *)&data[0]);
data[2] = phy[0].signal;
@@ -335,8 +335,8 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
data[16 + i * 2 + 

[PATCH]staging:vt6656:baseband.h: Fix alignment issue

2016-06-16 Thread Rithvik Patibandla
Fix "Alignment should match open paranthesis" check thrown by
checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/baseband.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.h 
b/drivers/staging/vt6656/baseband.h
index 807a580..7cc1387 100644
--- a/drivers/staging/vt6656/baseband.h
+++ b/drivers/staging/vt6656/baseband.h
@@ -84,10 +84,10 @@ struct vnt_phy_field {
 } __packed;
 
 unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
-   unsigned int frame_length, u16 tx_rate);
+   unsigned int frame_length, u16 tx_rate);
 
 void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
-   u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
+  u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
 
 void vnt_set_short_slot_time(struct vnt_private *);
 void vnt_set_vga_gain_offset(struct vnt_private *, u8);
-- 
2.7.4

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


[PATCH 1/2]staging:vt6656:dpc.c:Fix parantheses alignment

2016-06-27 Thread Rithvik Patibandla
This patch fixes "Alignment should match open parantheses" check
thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/dpc.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 6019aac..2de6982 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -34,7 +34,7 @@
 #include "rf.h"
 
 int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
-   unsigned long bytes_received)
+   unsigned long bytes_received)
 {
struct ieee80211_hw *hw = priv->hw;
struct ieee80211_supported_band *sband;
@@ -87,10 +87,10 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb 
*ptr_rcb,
 
/*Fix hardware bug => PLCP_Length error */
if (((bytes_received - (*pay_load_len)) > 27) ||
-   ((bytes_received - (*pay_load_len)) < 24) ||
-   (bytes_received < (*pay_load_len))) {
+   ((bytes_received - (*pay_load_len)) < 24) ||
+   (bytes_received < (*pay_load_len))) {
dev_dbg(&priv->usb->dev, "Wrong PLCP Length %x\n",
-   *pay_load_len);
+   *pay_load_len);
return false;
}
 
-- 
2.7.4

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


[PATCH 2/2]staging:vt6656:dpc.c:Fix spaces

2016-06-27 Thread Rithvik Patibandla
The following patch fixes two checks thrown by checkpatch.pl, "Spaces
preferred around '+'" and "No space is necessary after a cast"

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/dpc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 2de6982..c352c70 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -75,15 +75,15 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb 
*ptr_rcb,
 
skb_data = (u8 *)skb->data;
 
-   rx_sts = skb_data+4;
-   rx_rate = skb_data+5;
+   rx_sts = skb_data + 4;
+   rx_rate = skb_data + 5;
 
/* real Frame Size = USBframe_size -4WbkStatus - 4RxStatus */
/* -8TSF - 4RSR - 4SQ3 - ?Padding */
 
/* if SQ3 the range is 24~27, if no SQ3 the range is 20~23 */
 
-   pay_load_len = (u16 *) (skb_data + 6);
+   pay_load_len = (u16 *)(skb_data + 6);
 
/*Fix hardware bug => PLCP_Length error */
if (((bytes_received - (*pay_load_len)) > 27) ||
-- 
2.7.4

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


[PATCH]staging:vt6656:dpc.h:fix parantheses alignment

2016-06-27 Thread Rithvik Patibandla
The following patch fixes "Alignment should match open parantheses"
check thrown by checkpatch.pl

Signed-off-by: Rithvik Patibandla 
---
 drivers/staging/vt6656/dpc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/dpc.h b/drivers/staging/vt6656/dpc.h
index 5a92bd8..ff1850c 100644
--- a/drivers/staging/vt6656/dpc.h
+++ b/drivers/staging/vt6656/dpc.h
@@ -29,6 +29,6 @@
 #include "device.h"
 
 int vnt_rx_data(struct vnt_private *, struct vnt_rcb *,
-   unsigned long bytes_received);
+   unsigned long bytes_received);
 
 #endif /* __RXTX_H__ */
-- 
2.7.4

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