Re: [PATCH v2 4/5] staging: rtl8192e: rectified spelling mistake and replace memcmp with ether_oui_equal

2021-04-15 Thread Mitali Borkar
On Wed, Apr 14, 2021 at 10:55:25AM +0300, Dan Carpenter wrote:
> On Wed, Apr 14, 2021 at 12:26:01PM +0530, Mitali Borkar wrote:
> > Added a generic function of static inline bool in
> > include/linux/etherdevice.h to replace memcmp with
> > ether_oui_equal throughout the execution.
> > Corrected the misspelled words in this file.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  
> > Changes from v1:- Rectified spelling mistake and replaced memcmp with
> > ether_oui_equal.
> > 
> >  drivers/staging/rtl8192e/rtl819x_HTProc.c | 48 +++
> >  include/linux/etherdevice.h   |  5 +++
>^^^
> This is networking code and not staging code, but the netdev mailing
> list isn't CC'd.
>
I didn't knew mail id then, I will look into this,

> >  2 files changed, 29 insertions(+), 24 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
> > b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > index ec6b46166e84..ce58feb2af9a 100644
> > --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > @@ -43,7 +43,7 @@ u16 MCS_DATA_RATE[2][2][77] = {
> >  810, 720, 810, 900, 900, 990} }
> >  };
> >  
> > -static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf};
> > +static u8 UNKNOWN_BROADCOM[3] = {0x00, 0x14, 0xbf};
> 
> Please pull this spelling fix into its own patch.
> 
Okay Sir.

> [ snip ]
> 
> > diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> > index 2e5debc0373c..6a1a63168319 100644
> > --- a/include/linux/etherdevice.h
> > +++ b/include/linux/etherdevice.h
> > @@ -87,6 +87,11 @@ static inline bool is_link_local_ether_addr(const u8 
> > *addr)
> >  #endif
> >  }
> >  
> > +static inline bool ether_oui_equal(const u8 *addr, const u8 *oui)
> > +{
> > +return addr[0] == oui[0] && addr[1] == oui[1] && addr[2] == oui[2];
> > +}
> 
> The indenting is messed up on this.
>
OKay Sir, I am looking into this.

> regards,
> dan carpenter
> 


Re: [PATCH v2 4/5] staging: rtl8192e: rectified spelling mistake and replace memcmp with ether_oui_equal

2021-04-15 Thread Mitali Borkar
On Wed, Apr 14, 2021 at 10:16:59AM +0200, Greg KH wrote:
> On Wed, Apr 14, 2021 at 12:26:01PM +0530, Mitali Borkar wrote:
> > Added a generic function of static inline bool in
> > include/linux/etherdevice.h to replace memcmp with
> > ether_oui_equal throughout the execution.
> > Corrected the misspelled words in this file.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  
> > Changes from v1:- Rectified spelling mistake and replaced memcmp with
> > ether_oui_equal.
> > 
> >  drivers/staging/rtl8192e/rtl819x_HTProc.c | 48 +++
> >  include/linux/etherdevice.h   |  5 +++
> >  2 files changed, 29 insertions(+), 24 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
> > b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > index ec6b46166e84..ce58feb2af9a 100644
> > --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > @@ -43,7 +43,7 @@ u16 MCS_DATA_RATE[2][2][77] = {
> >  810, 720, 810, 900, 900, 990} }
> >  };
> >  
> > -static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf};
> > +static u8 UNKNOWN_BROADCOM[3] = {0x00, 0x14, 0xbf};
> >  
> >  static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM[3] = {0x00, 0x1a, 0x70};
> >  
> > @@ -146,16 +146,16 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
> > boolretValue = false;
> > struct rtllib_network *net = >current_network;
> >  
> > -   if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) ||
> > -   (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) ||
> > -   (memcmp(net->bssid, PCI_RALINK, 3) == 0) ||
> > -   (memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) ||
> > -   (memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) ||
> > +   if ((ether_oui_equal(net->bssid, BELKINF5D8233V1_RALINK) == 0) ||
> > +   (ether_oui_equal(net->bssid, BELKINF5D82334V3_RALINK) == 0) ||
> > +   (ether_oui_equal(net->bssid, PCI_RALINK) == 0) ||
> > +   (ether_oui_equal(net->bssid, EDIMAX_RALINK) == 0) ||
> > +   (ether_oui_equal(net->bssid, AIRLINK_RALINK) == 0) ||
> > (net->ralink_cap_exist))
> > retValue = true;
> > -   else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
> > -!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> > -!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
> > +   else if (ether_oui_equal(net->bssid, UNKNOWN_BROADCOM) ||
> > +ether_oui_equal(net->bssid, 
> > LINKSYSWRT330_LINKSYSWRT300_BROADCOM) ||
> > +ether_oui_equal(net->bssid, 
> > LINKSYSWRT350_LINKSYSWRT150_BROADCOM) ||
> >  (net->broadcom_cap_exist))
> > retValue = true;
> > else if (net->bssht.bd_rt2rt_aggregation)
> > @@ -179,26 +179,26 @@ static void HTIOTPeerDetermine(struct rtllib_device 
> > *ieee)
> > pHTInfo->IOTPeer = HT_IOT_PEER_92U_SOFTAP;
> > } else if (net->broadcom_cap_exist) {
> > pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM;
> > -   } else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
> > -!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> > -!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)) {
> > +   } else if (ether_oui_equal(net->bssid, UNKNOWN_BROADCOM) ||
> > +  ether_oui_equal(net->bssid, 
> > LINKSYSWRT330_LINKSYSWRT300_BROADCOM) ||
> > +  ether_oui_equal(net->bssid, 
> > LINKSYSWRT350_LINKSYSWRT150_BROADCOM)) {
> > pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM;
> > -   } else if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) ||
> > -(memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) ||
> > -(memcmp(net->bssid, PCI_RALINK, 3) == 0) ||
> > -(memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) ||
> > -(memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) ||
> > - net->ralink_cap_exist) {
> > +   } else if ((ether_oui_equal(net->bssid, BELKINF5D8233V1_RALINK) == 0) ||
> > +  (ether_oui_equal(net->bssid, BELKINF5D82334V3_RALINK) == 0) 
> > ||
> > +  (ether_oui_equal(net->bssid, PCI_RALINK) == 0) ||
> > +  (ether_oui_equal(net->bssid, EDIMAX_RALINK) == 0) ||
> > +  (ether_oui_equal(net->bssid, AIRLINK_RALINK) == 0) ||
> > +  net->ralink_cap_exist) {
> >

Re: [PATCH v4 2/2] staging: media: zoran: add BIT() macro and align code

2021-04-15 Thread Mitali Borkar
On Wed, Apr 14, 2021 at 12:38:41PM +0200, z...@gentoo.org wrote:
> Am 13.04.21 um 21:50 schrieb Mitali Borkar:
> > Added #include  and replaced bit shifts by BIT() macro.
> > This BIT() macro from linux/bitops.h is used to define ZR36057_VFESPFR_* 
> > bitmasks.
> > Use of macro is better and neater. It maintains consistency.
> > Removed comments from the same line and added them to new line above the
> > blocks, aligned everything properly by using tabs to make code neater
> > and improve readability.
> > Reported by checkpatch.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> > 
> > Changes from v3:- No changes.
> > Changes from v2:- Aligned the code using tabs.
> > Changes from v1:- Aligned the code using tabs and readjusted the
> > comments line.
> > 
> >   drivers/staging/media/zoran/zr36057.h | 312 ++
> >   1 file changed, 172 insertions(+), 140 deletions(-)
> > 
> 
> General comment:
> The patch is hard to read without applying it and viewing it with ignore
> whitespace.
> 
> > diff --git a/drivers/staging/media/zoran/zr36057.h 
> > b/drivers/staging/media/zoran/zr36057.h
> > index a2a75fd9f535..f51e9ea2c3d3 100644
> > --- a/drivers/staging/media/zoran/zr36057.h
> > +++ b/drivers/staging/media/zoran/zr36057.h
> > @@ -7,148 +7,180 @@
> >   #ifndef _ZR36057_H_
> >   #define _ZR36057_H_
> > +#include 
> >   /* Zoran ZR36057 registers */
> > -#define ZR36057_VFEHCR  0x000  /* Video Front End, Horizontal 
> > Configuration Register */
> > -#define ZR36057_VFEHCR_HS_POL BIT(30)
> > -#define ZR36057_VFEHCR_H_START   10
> > -#define ZR36057_VFEHCR_H_END   0
> > -#define ZR36057_VFEHCR_HMASK   0x3ff
> > -
> > -#define ZR36057_VFEVCR  0x004  /* Video Front End, Vertical 
> > Configuration Register */
> > -#define ZR36057_VFEVCR_VS_POL BIT(30)
> > -#define ZR36057_VFEVCR_V_START   10
> > -#define ZR36057_VFEVCR_V_END   0
> > -#define ZR36057_VFEVCR_VMASK   0x3ff
> > -
> > -#define ZR36057_VFESPFR 0x008  /* Video Front End, Scaler and 
> > Pixel Format Register */
> > -#define ZR36057_VFESPFR_EXT_FLBIT(26)
> > -#define ZR36057_VFESPFR_TOP_FIELD BIT(25)
> > -#define ZR36057_VFESPFR_VCLK_POL  BIT(24)
> > -#define ZR36057_VFESPFR_H_FILTER 21
> > -#define ZR36057_VFESPFR_HOR_DCM  14
> > -#define ZR36057_VFESPFR_VER_DCM  8
> > -#define ZR36057_VFESPFR_DISP_MODE6
> > -#define ZR36057_VFESPFR_YUV422  (0 << 3)
> > -#define ZR36057_VFESPFR_RGB888  (1 << 3)
> > -#define ZR36057_VFESPFR_RGB565  (2 << 3)
> > -#define ZR36057_VFESPFR_RGB555  (3 << 3)
> > -#define ZR36057_VFESPFR_ERR_DIF  (1 << 2)
> > -#define ZR36057_VFESPFR_PACK24  (1 << 1)
> > -#define ZR36057_VFESPFR_LITTLE_ENDIAN(1 << 0)
> > -
> > -#define ZR36057_VDTR0x00c  /* Video Display "Top" Register 
> > */
> > -
> > -#define ZR36057_VDBR0x010  /* Video Display "Bottom" 
> > Register */
> > -
> > -#define ZR36057_VSSFGR  0x014  /* Video Stride, Status, and 
> > Frame Grab Register */
> > -#define ZR36057_VSSFGR_DISP_STRIDE   16
> > -#define ZR36057_VSSFGR_VID_OVFBIT(8)
> > -#define ZR36057_VSSFGR_SNAP_SHOT  BIT(1)
> > -#define ZR36057_VSSFGR_FRAME_GRAB BIT(0)
> > -
> > -#define ZR36057_VDCR0x018  /* Video Display Configuration 
> > Register */
> > -#define ZR36057_VDCR_VID_EN   BIT(31)
> > -#define ZR36057_VDCR_MIN_PIX 24
> > -#define ZR36057_VDCR_TRITON  BIT(24)
> > -#define ZR36057_VDCR_VID_WIN_HT   12
> > -#define ZR36057_VDCR_VID_WIN_WID  0
> > -
> > -#define ZR36057_MMTR0x01c  /* Masking Map "Top" Register */
> > -
> > -#define ZR36057_MMBR0x020  /* Masking Map "Bottom" 
> > Register */
> > -
> > -#define ZR36057_OCR 0x024  /* Overlay Control Register */
> > -#define ZR36057_OCR_OVL_ENABLEBIT(15)
> > -#define ZR36057_OCR_MASK_STRIDE  0
> > -
> > -#define ZR36057_SPGPPCR 0x028  /* System, PCI, and General 
> > Purpose Pins Control Register */
> > -#define ZR36057_SPGPPCR_SOFT_RESET  BIT(24)
> > -
> > -#define Z

[PATCH v6 2/2] staging: rtl8192e: remove casts and parentheses

2021-04-14 Thread Mitali Borkar
Removed unnecessary (void *) cast and parentheses to meet linux kernel
coding style.

Signed-off-by: Mitali Borkar 
---

Changes from v5:- No changes.
Changes from v4:- Removed unnecessary casts and parentheses.
Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes has been made in v3.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 431202927036..ec6b46166e84 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -646,14 +646,10 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(>SelfHTCap), 0,
-  sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(>SelfHTInfo), 0,
-  sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(>PeerHTCapBuf), 0,
-  sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(>PeerHTInfoBuf), 0,
-  sizeof(pHTInfo->PeerHTInfoBuf));
+   memset(>SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap));
+   memset(>SelfHTInfo, 0, sizeof(pHTInfo->SelfHTInfo));
+   memset(>PeerHTCapBuf, 0, sizeof(pHTInfo->PeerHTCapBuf));
+   memset(>PeerHTInfoBuf, 0, sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
 
-- 
2.30.2



[PATCH v6 1/2] staging: rtl8192e: remove parentheses around boolean expression

2021-04-14 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' boolean expression as '!'
has higher precedance than '||'

Signed-off-by: Mitali Borkar 
---
 
Changes from v5:- No changes.
Changes from v4:- No changes.
Changes from v3:- No changes.
Changes from v2:- Modified subject description. Changes has been made in
v3.
Changes from v1:- Removed unnecessary parentheses around boolean
expression. Changes has been made in v2.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v6 0/2] staging: rtl8192e: Clean up patchset for style issues in rtl819x_HTProc.c

2021-04-14 Thread Mitali Borkar
Changes from v5:- Rebased these patches and dropped 2/3 and made this
a patchset of 2.
[PATCH v5 1/2]:- No changes.
[PATCH V5 2/2]:- No changes.

Changes from v4:-
[PATCH v4 1/2]:- No changes.
[PATCH V4 2/2]:- Removed casts and parentheses.

Changes from v3:- Changed subject line to match prefix on the patches.
[PATCH v3 1/2]:- No changes.
[PATCH V3 2/2]:- No changes.

Changes from v2:-
[PATCH v2 1/2]:- Modified subject description. Changes has been made in
v3.
[PATCH v2 2/2]:- Rectified spelling mistake in subject description.
Changes has been made in v3.

Changes from v1:-
[PATCH 1/2]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/2]:- No changes.

Mitali Borkar (2):
  staging: rtl8192e: remove parentheses around boolean expression
  staging: rtl8192e: remove casts and parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 14 +--
 1 file changed, 5 insertions(+), 9 deletions(-)

-- 
2.30.2



[PATCH v2 5/5] staging: rtl8192e: removed multiple blank lines

2021-04-14 Thread Mitali Borkar
Removed multiple blank lines to make code better and neater.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b11b0054d8cb..955442b95bdc 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -214,7 +214,6 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device 
*ieee, u8 *PeerMacAddr)
return 0;
 }
 
-
 static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
 {
return false;
@@ -236,7 +235,6 @@ static u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
 {
u8  retValue = 0;
 
-
if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM)
retValue = 1;
 
@@ -315,7 +313,6 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
pCapELE->PSMP = 0;
pCapELE->LSigTxopProtect = 0;
 
-
netdev_dbg(ieee->dev,
   "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n",
   pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
@@ -390,7 +387,6 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 
*posHTInfo,
 
memset(pHTInfoEle->BasicMSC, 0, 16);
 
-
*len = 22 + 2;
 
} else {
@@ -541,7 +537,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
else
pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
 
-
 #ifdef VERBOSE_DEBUG
print_hex_dump_bytes("%s: ", __func__, DUMP_PREFIX_NONE,
 pPeerHTCap, sizeof(struct ht_capab_ele));
@@ -562,7 +557,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
   ((pPeerHTCap->DssCCk == 1) ? true :
   false) : false);
 
-
pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support;
 
nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize == 0) ? 3839 : 7935;
@@ -750,7 +744,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_ALL_2SS;
 
-
bIOTAction = HTIOTActIsDisableEDCATurbo(ieee, pNetwork->bssid);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_EDCA_TURBO;
-- 
2.30.2



[PATCH v2 4/5] staging: rtl8192e: rectified spelling mistake and replace memcmp with ether_oui_equal

2021-04-14 Thread Mitali Borkar
Added a generic function of static inline bool in
include/linux/etherdevice.h to replace memcmp with
ether_oui_equal throughout the execution.
Corrected the misspelled words in this file.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- Rectified spelling mistake and replaced memcmp with
ether_oui_equal.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 48 +++
 include/linux/etherdevice.h   |  5 +++
 2 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index ec6b46166e84..ce58feb2af9a 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -43,7 +43,7 @@ u16 MCS_DATA_RATE[2][2][77] = {
 810, 720, 810, 900, 900, 990} }
 };
 
-static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf};
+static u8 UNKNOWN_BROADCOM[3] = {0x00, 0x14, 0xbf};
 
 static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM[3] = {0x00, 0x1a, 0x70};
 
@@ -146,16 +146,16 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
boolretValue = false;
struct rtllib_network *net = >current_network;
 
-   if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) ||
-   (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) ||
-   (memcmp(net->bssid, PCI_RALINK, 3) == 0) ||
-   (memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) ||
-   (memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) ||
+   if ((ether_oui_equal(net->bssid, BELKINF5D8233V1_RALINK) == 0) ||
+   (ether_oui_equal(net->bssid, BELKINF5D82334V3_RALINK) == 0) ||
+   (ether_oui_equal(net->bssid, PCI_RALINK) == 0) ||
+   (ether_oui_equal(net->bssid, EDIMAX_RALINK) == 0) ||
+   (ether_oui_equal(net->bssid, AIRLINK_RALINK) == 0) ||
(net->ralink_cap_exist))
retValue = true;
-   else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
-!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
-!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
+   else if (ether_oui_equal(net->bssid, UNKNOWN_BROADCOM) ||
+ether_oui_equal(net->bssid, 
LINKSYSWRT330_LINKSYSWRT300_BROADCOM) ||
+ether_oui_equal(net->bssid, 
LINKSYSWRT350_LINKSYSWRT150_BROADCOM) ||
 (net->broadcom_cap_exist))
retValue = true;
else if (net->bssht.bd_rt2rt_aggregation)
@@ -179,26 +179,26 @@ static void HTIOTPeerDetermine(struct rtllib_device *ieee)
pHTInfo->IOTPeer = HT_IOT_PEER_92U_SOFTAP;
} else if (net->broadcom_cap_exist) {
pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM;
-   } else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
-!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
-!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)) {
+   } else if (ether_oui_equal(net->bssid, UNKNOWN_BROADCOM) ||
+  ether_oui_equal(net->bssid, 
LINKSYSWRT330_LINKSYSWRT300_BROADCOM) ||
+  ether_oui_equal(net->bssid, 
LINKSYSWRT350_LINKSYSWRT150_BROADCOM)) {
pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM;
-   } else if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) ||
-(memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) ||
-(memcmp(net->bssid, PCI_RALINK, 3) == 0) ||
-(memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) ||
-(memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) ||
- net->ralink_cap_exist) {
+   } else if ((ether_oui_equal(net->bssid, BELKINF5D8233V1_RALINK) == 0) ||
+  (ether_oui_equal(net->bssid, BELKINF5D82334V3_RALINK) == 0) 
||
+  (ether_oui_equal(net->bssid, PCI_RALINK) == 0) ||
+  (ether_oui_equal(net->bssid, EDIMAX_RALINK) == 0) ||
+  (ether_oui_equal(net->bssid, AIRLINK_RALINK) == 0) ||
+  net->ralink_cap_exist) {
pHTInfo->IOTPeer = HT_IOT_PEER_RALINK;
} else if ((net->atheros_cap_exist) ||
-   (memcmp(net->bssid, DLINK_ATHEROS_1, 3) == 0) ||
-   (memcmp(net->bssid, DLINK_ATHEROS_2, 3) == 0)) {
+  (ether_oui_equal(net->bssid, DLINK_ATHEROS_1) == 0) ||
+  (ether_oui_equal(net->bssid, DLINK_ATHEROS_2) == 0)) {
pHTInfo->IOTPeer = HT_IOT_PEER_ATHEROS;
-   } else if ((memcmp(net->bssid, CISCO_BROADCOM, 3) == 0) ||
- net->cisco_cap_exist) {
+   } else if ((ether_oui_equal(net->bssid, CISCO_BROADCOM) == 0) ||
+  net->cisco_cap_exist) {
pHTInfo->IOTPeer = HT_IOT_PEER_CISCO;
-   } else if ((memcmp(net-

[PATCH v2 3/5] staging: rtl8192e: remove unnecessary blank line after close brace

2021-04-14 Thread Mitali Borkar
Removed an extra blank line after close brace '{' as it was not
necessary.
Reported by checkpatch

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 651441a71646..b6805908bbbd 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -492,7 +492,6 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 
*pMCSRateSet,
 static u8 HTFilterMCSRate(struct rtllib_device *ieee, u8 *pSupportMCS,
  u8 *pOperateMCS)
 {
-
u8 i;
 
for (i = 0; i <= 15; i++)
@@ -685,7 +684,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 
 void HTInitializeBssDesc(struct bss_ht *pBssHT)
 {
-
pBssHT->bd_support_ht = false;
memset(pBssHT->bd_ht_cap_buf, 0, sizeof(pBssHT->bd_ht_cap_buf));
pBssHT->bd_ht_cap_len = 0;
-- 
2.30.2



[PATCH v2 2/5] staging: rtl8192e: remove unnecessary blank line before brace

2021-04-14 Thread Mitali Borkar
Removed an extra blank line before close brace as it was not necessary.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 --
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b74c6ac817d4..651441a71646 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -263,7 +263,6 @@ static void HTIOTActDetermineRaFunc(struct rtllib_device 
*ieee, bool bPeerRx2ss)
 
if (pHTInfo->IOTAction & HT_IOT_ACT_AMSDU_ENABLE)
pHTInfo->IOTRaFunc |= HT_IOT_RAFUNC_TX_AMSDU;
-
 }
 
 void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo)
@@ -445,7 +444,6 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 
*pOperateMCS)
break;
default:
break;
-
}
 
return true;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index b14ed3534ffa..34b00a76b6bd 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -192,7 +192,6 @@ void TSInitialize(struct rtllib_device *ieee)
break;
pRxReorderEntry = >RxReorderEntry[count + 1];
}
-
 }
 
 static void AdmitTS(struct rtllib_device *ieee,
@@ -253,7 +252,6 @@ static struct ts_common_info *SearchAdmitTRStream(struct 
rtllib_device *ieee,
pRet->TSpec.f.TSInfo.field.ucTSID == TID &&
pRet->TSpec.f.TSInfo.field.ucDirection == dir)
break;
-
}
if (>List  != psearch_list)
break;
-- 
2.30.2



[PATCH v2 1/5] staging: rtl8192e: add spaces around binary operators

2021-04-14 Thread Mitali Borkar
Added spaces around binary operators like '+', '*', '|', '-', '&',
to improve readability and to meet linux kernel coding style.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 8 
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 4a2968566b93..b74c6ac817d4 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -138,7 +138,7 @@ u16  TxCountToDataRate(struct rtllib_device *ieee, u8 
nDataRate)
is40MHz = 1;
isShortGI = 1;
}
-   return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate&0xf];
+   return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate & 0xf];
 }
 
 bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
@@ -479,8 +479,8 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 
*pMCSRateSet,
if (availableMcsRate[i] != 0) {
bitMap = availableMcsRate[i];
for (j = 0; j < 8; j++) {
-   if ((bitMap%2) != 0) {
-   if (HTMcsToDataRate(ieee, (8*i+j)) >
+   if ((bitMap % 2) != 0) {
+   if (HTMcsToDataRate(ieee, (8 * i + j)) >
HTMcsToDataRate(ieee, mcsRate))
mcsRate = 8 * i + j;
}
@@ -577,7 +577,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 
pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable;
if (ieee->rtllib_ap_sec_type &&
-  (ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP))) {
+  (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
if ((pHTInfo->IOTPeer == HT_IOT_PEER_ATHEROS) ||
(pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
pHTInfo->bCurrentAMPDUEnable = false;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 6c51323104e5..b14ed3534ffa 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -104,7 +104,7 @@ static void ResetTsCommonInfo(struct ts_common_info 
*pTsCommonInfo)
 {
eth_zero_addr(pTsCommonInfo->Addr);
memset(>TSpec, 0, sizeof(union tspec_body));
-   memset(>TClass, 0, sizeof(union qos_tclas)*TCLAS_NUM);
+   memset(>TClass, 0, sizeof(union qos_tclas) * TCLAS_NUM);
pTsCommonInfo->TClasProc = 0;
pTsCommonInfo->TClasNum = 0;
 }
@@ -188,9 +188,9 @@ void TSInitialize(struct rtllib_device *ieee)
for (count = 0; count < REORDER_ENTRY_NUM; count++) {
list_add_tail(>List,
  >RxReorder_Unused_List);
-   if (count == (REORDER_ENTRY_NUM-1))
+   if (count == (REORDER_ENTRY_NUM - 1))
break;
-   pRxReorderEntry = >RxReorderEntry[count+1];
+   pRxReorderEntry = >RxReorderEntry[count + 1];
}
 
 }
@@ -517,7 +517,7 @@ void TsStartAddBaProcess(struct rtllib_device *ieee, struct 
tx_ts_record *pTxTS)
  msecs_to_jiffies(TS_ADDBA_DELAY));
} else {
netdev_dbg(ieee->dev, "Immediately Start ADDBA\n");
-   mod_timer(>TsAddBaTimer, jiffies+10);
+   mod_timer(>TsAddBaTimer, jiffies + 10);
}
} else
netdev_dbg(ieee->dev, "BA timer is already added\n");
-- 
2.30.2



Subject: [PATCH v2 0/5] staging: rtl8192e: CLeanup patchset for style issues in rtl819x_Y.c files

2021-04-14 Thread Mitali Borkar
Changes from v1:- Dropped 6/6 from and made this as a patchset of 5 as
alignment of code is done in following patches.
[PATCH 1/5]:- No changes.
[PATCH 2/5]:- No changes.
[PATCH 3/5]:- No changes.
[PATCH 4/5]:- Rectified spelling mistake and replaced memcmp with
ether_oui_equal.
[PATCH 5/5]:- No changes.

Mitali Borkar (5):
  staging: rtl8192e: add spaces around binary operators
  staging: rtl8192e: remove unnecessary blank line before brace
  staging: rtl8192e: remove unnecessary blank line after close brace
  staging: rtl8192e: rectified spelling mistake and replace memcmp with
ether_oui_equal
  staging: rtl8192e: removed multiple blank lines

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 67 -
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 10 +++--
 include/linux/etherdevice.h   |  5 +
 3 files changed, 37 insertions(+), 45 deletions(-)

-- 
2.30.2



Re: [PATCH v3 4/4] staging: media: intel-ipu3: remove space before tabs

2021-04-13 Thread Mitali Borkar
On Tue, Apr 13, 2021 at 09:17:12PM +0300, Dan Carpenter wrote:
> On Tue, Apr 13, 2021 at 08:59:34PM +0530, Mitali Borkar wrote:
> > Removed unnecessary space before tabs to adhere to linux kernel coding
> > style.
> > Reported by checkpatch.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  
> > Changes from v2:- No changes.
> > Changes from v1:- No changes.
> > 
> >  drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
> > b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > index 47e98979683c..42edac5ee4e4 100644
> > --- a/drivers/staging/media/ipu3/include/intel-ipu3.h
> > +++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > @@ -633,7 +633,7 @@ struct ipu3_uapi_bnr_static_config_wb_gains_thr_config {
> >   * @cg:Gain coefficient for threshold calculation, [0, 31], default 8.
> >   * @ci:Intensity coefficient for threshold calculation. range [0, 0x1f]
> >   * default 6.
> > - * format: u3.2 (3 most significant bits represent whole number,
> > + *format: u3.2 (3 most significant bits represent whole number,
> >   * 2 least significant bits represent the fractional part
> 
> Just remove the spaces, don't remove the tab.  It's looks silly now.
>
Okay Sir, do I have to send a v4 patch on this now?

> regards,
> dan carpenter
> 


[PATCH v4 2/2] staging: media: zoran: add BIT() macro and align code

2021-04-13 Thread Mitali Borkar
Added #include  and replaced bit shifts by BIT() macro.
This BIT() macro from linux/bitops.h is used to define ZR36057_VFESPFR_* 
bitmasks.
Use of macro is better and neater. It maintains consistency.
Removed comments from the same line and added them to new line above the
blocks, aligned everything properly by using tabs to make code neater
and improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v3:- No changes.
Changes from v2:- Aligned the code using tabs.
Changes from v1:- Aligned the code using tabs and readjusted the
comments line. 

 drivers/staging/media/zoran/zr36057.h | 312 ++
 1 file changed, 172 insertions(+), 140 deletions(-)

diff --git a/drivers/staging/media/zoran/zr36057.h 
b/drivers/staging/media/zoran/zr36057.h
index a2a75fd9f535..f51e9ea2c3d3 100644
--- a/drivers/staging/media/zoran/zr36057.h
+++ b/drivers/staging/media/zoran/zr36057.h
@@ -7,148 +7,180 @@
 
 #ifndef _ZR36057_H_
 #define _ZR36057_H_
+#include 
 
 /* Zoran ZR36057 registers */
 
-#define ZR36057_VFEHCR  0x000  /* Video Front End, Horizontal 
Configuration Register */
-#define ZR36057_VFEHCR_HS_POL BIT(30)
-#define ZR36057_VFEHCR_H_START   10
-#define ZR36057_VFEHCR_H_END   0
-#define ZR36057_VFEHCR_HMASK   0x3ff
-
-#define ZR36057_VFEVCR  0x004  /* Video Front End, Vertical 
Configuration Register */
-#define ZR36057_VFEVCR_VS_POL BIT(30)
-#define ZR36057_VFEVCR_V_START   10
-#define ZR36057_VFEVCR_V_END   0
-#define ZR36057_VFEVCR_VMASK   0x3ff
-
-#define ZR36057_VFESPFR 0x008  /* Video Front End, Scaler and Pixel 
Format Register */
-#define ZR36057_VFESPFR_EXT_FLBIT(26)
-#define ZR36057_VFESPFR_TOP_FIELD BIT(25)
-#define ZR36057_VFESPFR_VCLK_POL  BIT(24)
-#define ZR36057_VFESPFR_H_FILTER 21
-#define ZR36057_VFESPFR_HOR_DCM  14
-#define ZR36057_VFESPFR_VER_DCM  8
-#define ZR36057_VFESPFR_DISP_MODE6
-#define ZR36057_VFESPFR_YUV422  (0 << 3)
-#define ZR36057_VFESPFR_RGB888  (1 << 3)
-#define ZR36057_VFESPFR_RGB565  (2 << 3)
-#define ZR36057_VFESPFR_RGB555  (3 << 3)
-#define ZR36057_VFESPFR_ERR_DIF  (1 << 2)
-#define ZR36057_VFESPFR_PACK24  (1 << 1)
-#define ZR36057_VFESPFR_LITTLE_ENDIAN(1 << 0)
-
-#define ZR36057_VDTR0x00c  /* Video Display "Top" Register */
-
-#define ZR36057_VDBR0x010  /* Video Display "Bottom" Register */
-
-#define ZR36057_VSSFGR  0x014  /* Video Stride, Status, and Frame Grab 
Register */
-#define ZR36057_VSSFGR_DISP_STRIDE   16
-#define ZR36057_VSSFGR_VID_OVFBIT(8)
-#define ZR36057_VSSFGR_SNAP_SHOT  BIT(1)
-#define ZR36057_VSSFGR_FRAME_GRAB BIT(0)
-
-#define ZR36057_VDCR0x018  /* Video Display Configuration Register 
*/
-#define ZR36057_VDCR_VID_EN   BIT(31)
-#define ZR36057_VDCR_MIN_PIX 24
-#define ZR36057_VDCR_TRITON  BIT(24)
-#define ZR36057_VDCR_VID_WIN_HT   12
-#define ZR36057_VDCR_VID_WIN_WID  0
-
-#define ZR36057_MMTR0x01c  /* Masking Map "Top" Register */
-
-#define ZR36057_MMBR0x020  /* Masking Map "Bottom" Register */
-
-#define ZR36057_OCR 0x024  /* Overlay Control Register */
-#define ZR36057_OCR_OVL_ENABLEBIT(15)
-#define ZR36057_OCR_MASK_STRIDE  0
-
-#define ZR36057_SPGPPCR 0x028  /* System, PCI, and General Purpose 
Pins Control Register */
-#define ZR36057_SPGPPCR_SOFT_RESET  BIT(24)
-
-#define ZR36057_GPPGCR1 0x02c  /* General Purpose Pins and GuestBus 
Control Register (1) */
-
-#define ZR36057_MCSAR   0x030  /* MPEG Code Source Address Register */
-
-#define ZR36057_MCTCR   0x034  /* MPEG Code Transfer Control Register 
*/
-#define ZR36057_MCTCR_COD_TIMEBIT(30)
-#define ZR36057_MCTCR_C_EMPTY BIT(29)
-#define ZR36057_MCTCR_C_FLUSH BIT(28)
-#define ZR36057_MCTCR_COD_GUEST_ID 20
-#define ZR36057_MCTCR_COD_GUEST_REG16
-
-#define ZR36057_MCMPR   0x038  /* MPEG Code Memory Pointer Register */
-
-#define ZR36057_ISR 0x03c  /* Interrupt Status Register */
-#define ZR36057_ISR_GIRQ1BIT(30)
-#define ZR36057_ISR_GIRQ0BIT(29)
-#define ZR36057_ISR_COD_REP_IRQBIT(28)
-#define ZR36057_ISR_JPEG_REP_IRQ   BIT(27)
-
-#define ZR36057_ICR 0x040  /* Interrupt Control Register */
-#define ZR36057_ICR_GIRQ1BIT(30)
-#define ZR36057_ICR_GIRQ0BIT(29)
-#define ZR36057_ICR_COD_REP_IRQBIT(28)
-#define ZR36057_ICR_JPEG_REP_IRQ   BIT(27)
-#define ZR36057_ICR_INT_PIN_EN BIT(24)
-
-#define ZR36057_I2CBR   0x044  /* I2C Bus Register */
-#define ZR3

[PATCH v4 1/2] staging: media: zoran: add spaces around '<<' operator

2021-04-13 Thread Mitali Borkar
Added spaces around '<<' operator to improve readability and meet linux
kernel coding style.
Reported by checkpatch

Signed-off-by: Mitali Borkar 
---

Changes from v3:- No changes.
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/media/zoran/zr36057.h | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/media/zoran/zr36057.h 
b/drivers/staging/media/zoran/zr36057.h
index 71b651add35a..a2a75fd9f535 100644
--- a/drivers/staging/media/zoran/zr36057.h
+++ b/drivers/staging/media/zoran/zr36057.h
@@ -30,13 +30,13 @@
 #define ZR36057_VFESPFR_HOR_DCM  14
 #define ZR36057_VFESPFR_VER_DCM  8
 #define ZR36057_VFESPFR_DISP_MODE6
-#define ZR36057_VFESPFR_YUV422  (0<<3)
-#define ZR36057_VFESPFR_RGB888  (1<<3)
-#define ZR36057_VFESPFR_RGB565  (2<<3)
-#define ZR36057_VFESPFR_RGB555  (3<<3)
-#define ZR36057_VFESPFR_ERR_DIF  (1<<2)
-#define ZR36057_VFESPFR_PACK24  (1<<1)
-#define ZR36057_VFESPFR_LITTLE_ENDIAN(1<<0)
+#define ZR36057_VFESPFR_YUV422  (0 << 3)
+#define ZR36057_VFESPFR_RGB888  (1 << 3)
+#define ZR36057_VFESPFR_RGB565  (2 << 3)
+#define ZR36057_VFESPFR_RGB555  (3 << 3)
+#define ZR36057_VFESPFR_ERR_DIF  (1 << 2)
+#define ZR36057_VFESPFR_PACK24  (1 << 1)
+#define ZR36057_VFESPFR_LITTLE_ENDIAN(1 << 0)
 
 #define ZR36057_VDTR0x00c  /* Video Display "Top" Register */
 
-- 
2.30.2



[PATCH v4 0/2] staging: media: zoran: Cleanup patchset for style issues in zr36057.h

2021-04-13 Thread Mitali Borkar
Changes from v3:- Rebased these patches and made changes against
mainline code.

Changes from v2:-
[PATCH 1/2]:- No changes.
[PATCH 2/2]:- Aligned the code using tabs.

Changes from v1:- 
[PATCH 1/2]:- No changes.
[PATCH 2/2]:- Aligned the code using tabs and readjusted the
comments line.

Mitali Borkar (2):
  staging: media: zoran: add spaces around '<<' operator
  staging: media: zoran: add BIT() macro and align code

 drivers/staging/media/zoran/zr36057.h | 312 ++
 1 file changed, 172 insertions(+), 140 deletions(-)

-- 
2.30.2



Subject: [PATCH v4] staging: media: zoran: add '*' in long(multi-line) comments

2021-04-13 Thread Mitali Borkar
Added '*' before every line inside long(multi-line) comments. Removed
'*/' from end of the comment line and added to next line as per linux
kernel coding style. Aligned '*' accordingly to make code neater.

Signed-off-by: Mitali Borkar 
---
Changes from v3:- Rebased this patch and made changes against mainline
code. 
Changes from v2:- made style changes in code according to linux kernel
coding style for long comments.
Changes from v1:- Changes made in code according to linux kernel coding
style for long(multi-line) comments.

 drivers/staging/media/zoran/zr36050.c | 192 +++---
 1 file changed, 112 insertions(+), 80 deletions(-)

diff --git a/drivers/staging/media/zoran/zr36050.c 
b/drivers/staging/media/zoran/zr36050.c
index 2826f4e5d37b..a1084aa142e7 100644
--- a/drivers/staging/media/zoran/zr36050.c
+++ b/drivers/staging/media/zoran/zr36050.c
@@ -24,8 +24,11 @@
 /* codec io API */
 #include "videocodec.h"
 
-/* it doesn't make sense to have more than 20 or so,
-  just to prevent some unwanted loops */
+/*
+ * it doesn't make sense to have more than 20 or so,
+ * just to prevent some unwanted loops
+ */
+
 #define MAX_CODECS 20
 
 /* amount of chips attached via this driver */
@@ -43,10 +46,11 @@ MODULE_PARM_DESC(debug, "Debug level (0-4)");
} while (0)
 
 /* =
-   Local hardware I/O functions:
-
-   read/write via codec layer (registers are located in the master device)
-   = */
+ * Local hardware I/O functions:
+ *
+ * read/write via codec layer (registers are located in the master device)
+ * =
+ */
 
 /* read and write functions */
 static u8 zr36050_read(struct zr36050 *ptr, u16 reg)
@@ -80,10 +84,11 @@ static void zr36050_write(struct zr36050 *ptr, u16 reg, u8 
value)
 }
 
 /* =
-   Local helper function:
-
-   status read
-   = */
+ * Local helper function:
+ *
+ * status read
+ * =
+ */
 
 /* status is kept in datastructure */
 static u8 zr36050_read_status1(struct zr36050 *ptr)
@@ -95,10 +100,11 @@ static u8 zr36050_read_status1(struct zr36050 *ptr)
 }
 
 /* =
-   Local helper function:
-
-   scale factor read
-   = */
+ * Local helper function:
+ *
+ * scale factor read
+ * =
+ */
 
 /* scale factor is kept in datastructure */
 static u16 zr36050_read_scalefactor(struct zr36050 *ptr)
@@ -112,10 +118,11 @@ static u16 zr36050_read_scalefactor(struct zr36050 *ptr)
 }
 
 /* =
-   Local helper function:
-
-   wait if codec is ready to proceed (end of processing) or time is over
-   = */
+ * Local helper function:
+ *
+ * wait if codec is ready to proceed (end of processing) or time is over
+ * =
+ */
 
 static void zr36050_wait_end(struct zr36050 *ptr)
 {
@@ -133,10 +140,11 @@ static void zr36050_wait_end(struct zr36050 *ptr)
 }
 
 /* =
-   Local helper function:
-
-   basic test of "connectivity", writes/reads to/from memory the SOF marker
-   = */
+ * Local helper function:
+ *
+ * basic test of "connectivity", writes/reads to/from memory the SOF marker
+ * =
+ */
 
 static int zr36050_basic_test(struct zr36050 *ptr)
 {
@@ -174,10 +182,11 @@ static int zr36050_basic_test(struct zr36050 *ptr)
 }
 
 /* =
-   Local helper function:
-
-   simple loop for pushing the init datasets
-   = */
+ * Local helper function:
+ *
+ * simple loop for pushing the init datasets
+ * =
+ */
 
 static int zr36050_pushit(struct zr36050 *ptr, u16 startreg, u16 len, const 
char *data)
 {
@@ -192,15 +201,16 @@ static int zr36050_pushit(struct zr36050 *ptr, u16 
startreg, u16 len, const char
 }
 
 /* =
-   Basic datasets:
-
-   jpeg baseline setup data (you find it on lots places in internet, or just
- 

[PATCH v3] staging: media: zoran: reduce length of a line

2021-04-13 Thread Mitali Borkar
Reduced length of a line which exceed the 100 columns limit by splitting
the line into two statements and commenting it with '*' to meet linux
kernel coding style for long(multi-line) comments.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v2:- Rebased this patch and made changes against mainline
code.
Changes from v1:- Made style changes according to linux kernel coding style
for long comments.

 drivers/staging/media/zoran/zr36060.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/zoran/zr36060.c 
b/drivers/staging/media/zoran/zr36060.c
index 4f9eb9ff2c42..27eec3446592 100644
--- a/drivers/staging/media/zoran/zr36060.c
+++ b/drivers/staging/media/zoran/zr36060.c
@@ -249,7 +249,11 @@ static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 0, 0 
};  //table idx's AC
 static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 };
 static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
 
-/* SOF (start of frame) segment depends on width, height and sampling ratio of 
each color component */
+/*
+ * SOF (start of frame) segment depends on width,
+ * height and sampling ratio of each color component
+ */
+
 static int zr36060_set_sof(struct zr36060 *ptr)
 {
char sof_data[34];  // max. size of register set
-- 
2.30.2



[PATCH v4] staging: media: meson: vdec: declare u32 as static const

2021-04-13 Thread Mitali Borkar
Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant
throughout execution.

Signed-off-by: Mitali Borkar 
---
Changes from v3:- Made commit message under 75 characters per line.
Changes from v2:- Rebased this patch and made changes against mainline code
Changes from v1:- Rectified mistake by declaring u32 as static const
properly as static const u32 canvas'x'[]

 drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c 
b/drivers/staging/media/meson/vdec/codec_h264.c
index c61128fc4bb9..80141b89a9f6 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_h264 *h264 = sess->priv;
u32 mb_width, mb_height, mb_total;
+   static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+   static const u32 canvas4[] = { 24, 0 };
 
-   amvdec_set_canvases(sess,
-   (u32[]){ ANC0_CANVAS_ADDR, 0 },
-   (u32[]){ 24, 0 });
+   amvdec_set_canvases(sess, canvas3, canvas4);
 
dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
h264->max_refs, sess->num_dst_bufs);
-- 
2.30.2



[PATCH v3 4/4] staging: media: intel-ipu3: remove space before tabs

2021-04-13 Thread Mitali Borkar
Removed unnecessary space before tabs to adhere to linux kernel coding
style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 47e98979683c..42edac5ee4e4 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -633,7 +633,7 @@ struct ipu3_uapi_bnr_static_config_wb_gains_thr_config {
  * @cg:Gain coefficient for threshold calculation, [0, 31], default 8.
  * @ci:Intensity coefficient for threshold calculation. range [0, 0x1f]
  * default 6.
- * format: u3.2 (3 most significant bits represent whole number,
+ *format: u3.2 (3 most significant bits represent whole number,
  * 2 least significant bits represent the fractional part
  * with each count representing 0.25)
  * e.g. 6 in binary format is 00110, that translates to 1.5
-- 
2.30.2



[PATCH v3 0/4] staging: media: intel-ipu3: Cleanup patchset for style issues

2021-04-13 Thread Mitali Borkar
Changes from v2:- Rebased these four patces and made changes against
mailine code

Changes from v1:-
Dropped patches 1/6 and 2/6 and compiled this as a patchset of 4
patches.
[PATCH 1/4]:- No changes.
[PATCH 2/4]:- No changes.
[PATCH 3/4]:- Reduced length of a line under 80 characters. This was
patch 5/6 previously.
[PATCH 4/4]:- No changes.

Mitali Borkar (4):
  staging: media: intel-ipu3: remove unnecessary blank line
  staging: media: intel-ipu3: reduce length of line
  staging: media: intel-ipu3: line should not end with '['
  staging: media: intel-ipu3: remove space before tabs

 drivers/staging/media/ipu3/include/intel-ipu3.h | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

-- 
2.30.2



[PATCH v3 3/4] staging: media: intel-ipu3: line should not end with '['

2021-04-13 Thread Mitali Borkar
Fixed the issue of line should not end with '[' by moving argument
from next line to line ending with '[' and made it under 80
characters.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
Changes from v2:- No changes
Changes from v1:- Made line length under 80 characters

 drivers/staging/media/ipu3/include/intel-ipu3.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index eb21cbc63af6..47e98979683c 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -247,8 +247,8 @@ struct ipu3_uapi_ae_ccm {
  */
 struct ipu3_uapi_ae_config {
struct ipu3_uapi_ae_grid_config grid_cfg __attribute__((aligned(32)));
-   struct ipu3_uapi_ae_weight_elem weights[
-   IPU3_UAPI_AE_WEIGHTS] __attribute__((aligned(32)));
+   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS]
+   __attribute__((aligned(32)));
struct ipu3_uapi_ae_ccm ae_ccm __attribute__((aligned(32)));
 } __packed;
 
-- 
2.30.2



[PATCH v3 1/4] staging: media: intel-ipu3: remove unnecessary blank line

2021-04-13 Thread Mitali Borkar
Removed an unnecessary blank line to meet linux kernel coding style.
Reported by checkpatch.pl

Signed-off-by: Mitali Borkar 
---
Changes from v2:- No changes.
Changes from v1:- NO changes.

 drivers/staging/media/ipu3/include/intel-ipu3.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index edd8edda0647..438ec3ed7b6b 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -74,7 +74,6 @@ struct ipu3_uapi_grid_config {
(IPU3_UAPI_AWB_MAX_SETS * \
 (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))
 
-
 /**
  * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer
  *
-- 
2.30.2



[PATCH v3 2/4] staging: media: intel-ipu3: reduce length of line

2021-04-13 Thread Mitali Borkar
Reduced length of line as it was exceeding 100 characters by removing
comments from same line and adding it to previous line. This makes code
neater, and meets linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/media/ipu3/include/intel-ipu3.h | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 438ec3ed7b6b..eb21cbc63af6 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -9,8 +9,12 @@
 /* from /drivers/staging/media/ipu3/include/videodev2.h */
 
 /* Vendor specific - used for IPU3 camera sub-system */
-#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p') /* IPU3 
processing parameters */
-#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's') /* IPU3 
3A statistics */
+
+/* IPU3 processing parameters */
+#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p')
+
+/* IPU3 3A statistics */
+#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's')
 
 /* from include/uapi/linux/v4l2-controls.h */
 #define V4L2_CID_INTEL_IPU3_BASE   (V4L2_CID_USER_BASE + 0x10c0)
-- 
2.30.2



[PATCH v3] staging: media: meson: vdec: declare u32 as static const

2021-04-13 Thread Mitali Borkar
Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant throughout 
execution.

Reported-by: kernel test robot 
Signed-off-by: Mitali Borkar 
---
Changes from v2:- Rebased this patch and made changes against mainline code
Changes from v1:- Rectified mistake by declaring u32 as static const
properly as static const u32 canvas'x'[]

 drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c 
b/drivers/staging/media/meson/vdec/codec_h264.c
index c61128fc4bb9..80141b89a9f6 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_h264 *h264 = sess->priv;
u32 mb_width, mb_height, mb_total;
+   static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+   static const u32 canvas4[] = { 24, 0 };
 
-   amvdec_set_canvases(sess,
-   (u32[]){ ANC0_CANVAS_ADDR, 0 },
-   (u32[]){ 24, 0 });
+   amvdec_set_canvases(sess, canvas3, canvas4);
 
dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
h264->max_refs, sess->num_dst_bufs);
-- 
2.30.2



Re: Subject: [PATCH v2] staging: media: meson: vdec: declare u32 as static const appropriately

2021-04-13 Thread Mitali Borkar
On Tue, Apr 13, 2021 at 09:26:01AM +0200, Hans Verkuil wrote:
> On 13/04/2021 08:27, Mitali Borkar wrote:
> > Declared 32 bit unsigned int as static constant inside a function
> > appropriately.
> > 
> > Reported-by: kernel test robot 
> > Signed-off-by: Mitali Borkar 
> > ---
> > 
> > Changes from v1:- Rectified the mistake by declaring u32 as static const
> > properly.
> > 
> >  drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/media/meson/vdec/codec_h264.c 
> > b/drivers/staging/media/meson/vdec/codec_h264.c
> > index ea86e9e1c447..80141b89a9f6 100644
> > --- a/drivers/staging/media/meson/vdec/codec_h264.c
> > +++ b/drivers/staging/media/meson/vdec/codec_h264.c
> > @@ -287,8 +287,8 @@ static void codec_h264_resume(struct amvdec_session 
> > *sess)
> > struct amvdec_core *core = sess->core;
> > struct codec_h264 *h264 = sess->priv;
> > u32 mb_width, mb_height, mb_total;
> > -   static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
> > -   static const u32[] canvas4 = { 24, 0 };
> > +   static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
> > +   static const u32 canvas4[] = { 24, 0 };
> 
> This is a patch on top of your previous (v1) patch. That won't work
> since the v1 is not merged, you need to make a patch against the current
> mainline code.
>
But Sir, since I have made changes in the code, and committed them, now,
if I open that file, it will contain those changes. Then should I
rewrite the patch body more accurately? 

> Regards,
> 
>   Hans
> 
> >  
> > amvdec_set_canvases(sess, canvas3, canvas4);
> >  
> > 
> 


Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis

2021-04-13 Thread Mitali Borkar
On Fri, Apr 09, 2021 at 07:31:53PM -0700, Joe Perches wrote:
> On Sat, 2021-04-10 at 07:55 +0530, Mitali Borkar wrote:
> > On Fri, Apr 09, 2021 at 07:07:09PM -0700, Joe Perches wrote:
> > > On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> > > > Matched the alignment with open parenthesis to meet linux kernel coding
> > > > style.
> > > > Reported by checkpatch.
> > > []
> > > > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
> > > > b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > > []
> > > > @@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
> > > >     (net->ralink_cap_exist))
> > > >     retValue = true;
> > > >     else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
> > > > -   !memcmp(net->bssid, 
> > > > LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> > > > +!memcmp(net->bssid, 
> > > > LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> > > >     !memcmp(net->bssid, 
> > > > LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
> > > >     (net->broadcom_cap_exist))
> > > 
> > > checkpatch is a stupid script.
> > > Look further at the code not just at what checkpatch reports.
> > > Align all the contination lines, not just the first one.
> > > 
> > Sir, I have aligned them in last patch of this patchset.
> 
> This sort of change should not require an additional patch.
>
So now should I compile this as a patchset of 5, removing the last patch
of alignment?
> 


Re: [PATCH v2 3/4] staging: media: intel-ipu3: reduce length of line

2021-04-13 Thread Mitali Borkar
On Tue, Apr 13, 2021 at 01:44:32PM +0300, Sakari Ailus wrote:
> On Tue, Apr 13, 2021 at 04:13:04PM +0530, Mitali Borkar wrote:
> > On Tue, Apr 13, 2021 at 01:01:34PM +0300, Sakari Ailus wrote:
> > > Hi Mitali,
> > > 
> > > Thanks for the update.
> > > 
> > > On Tue, Apr 13, 2021 at 10:46:06AM +0530, Mitali Borkar wrote:
> > > > Reduced length of the line under 80 characters to meet linux-kernel
> > > > coding style.
> > > > 
> > > > Signed-off-by: Mitali Borkar 
> > > > ---
> > > > 
> > > > Changes from v1:- Reduced length of the line under 80 characters
> > > > 
> > > >  drivers/staging/media/ipu3/include/intel-ipu3.h | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
> > > > b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > > > index 6a72c81d2b67..52dcc6cdcffc 100644
> > > > --- a/drivers/staging/media/ipu3/include/intel-ipu3.h
> > > > +++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > > > @@ -247,7 +247,8 @@ struct ipu3_uapi_ae_ccm {
> > > >   */
> > > >  struct ipu3_uapi_ae_config {
> > > > struct ipu3_uapi_ae_grid_config grid_cfg __aligned(32);
> > > > -   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS] 
> > > > __aligned(32);
> > > > +   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS]
> > > > +   __aligned(32);
> > > 
> > > Do you still have the other two patches in your tree? This doesn't apply
> > > here due to the different attribute syntax.
> > >
> > I have patch 1/6 and 2/6 in my tree which you asked me to drop.
> 
> Could you drop them and then submit v3?
>
I am extremely sorry Sir, but I am still learning to use git, drop them
means to delete those commits? Even if I delete those, this patch was
made after those, so the changes I made then will remain as it is, so
what to do now? 

> Thanks.
> 
> -- 
> Sakari Ailus


Re: [PATCH v5 0/3] staging: rtl8192e: Cleanup patchset for style issues in rtl819x_HTProc.c

2021-04-13 Thread Mitali Borkar
On Tue, Apr 13, 2021 at 09:52:48AM +0200, Greg KH wrote:
> On Tue, Apr 13, 2021 at 08:55:03AM +0530, Mitali Borkar wrote:
> > Changes from v4:-
> > [PATCH v4 1/3]:- No changes.
> > [PATCH v4 2/3]:- No changes.
> > [PATCH V4 3/3]:- Removed casts and parentheses.
> 
> This series does not apply cleanly, please rebase and resend.
>
Resend as v6? Does not apply cleanly as in? Were mails not threaded
properly?

> thanks,
> 
> greg k-h


Re: [PATCH v2 3/4] staging: media: intel-ipu3: reduce length of line

2021-04-13 Thread Mitali Borkar
On Tue, Apr 13, 2021 at 01:01:34PM +0300, Sakari Ailus wrote:
> Hi Mitali,
> 
> Thanks for the update.
> 
> On Tue, Apr 13, 2021 at 10:46:06AM +0530, Mitali Borkar wrote:
> > Reduced length of the line under 80 characters to meet linux-kernel
> > coding style.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> > 
> > Changes from v1:- Reduced length of the line under 80 characters
> > 
> >  drivers/staging/media/ipu3/include/intel-ipu3.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
> > b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > index 6a72c81d2b67..52dcc6cdcffc 100644
> > --- a/drivers/staging/media/ipu3/include/intel-ipu3.h
> > +++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
> > @@ -247,7 +247,8 @@ struct ipu3_uapi_ae_ccm {
> >   */
> >  struct ipu3_uapi_ae_config {
> > struct ipu3_uapi_ae_grid_config grid_cfg __aligned(32);
> > -   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS] 
> > __aligned(32);
> > +   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS]
> > +   __aligned(32);
> 
> Do you still have the other two patches in your tree? This doesn't apply
> here due to the different attribute syntax.
>
I have patch 1/6 and 2/6 in my tree which you asked me to drop.

> > struct ipu3_uapi_ae_ccm ae_ccm __aligned(32);
> >  } __packed;
> >  
> 
> -- 
> Kind regards,
> 
> Sakari Ailus


Subject: [PATCH v2] staging: media: meson: vdec: declare u32 as static const appropriately

2021-04-13 Thread Mitali Borkar
Declared 32 bit unsigned int as static constant inside a function
appropriately.

Reported-by: kernel test robot 
Signed-off-by: Mitali Borkar 
---

Changes from v1:- Rectified the mistake by declaring u32 as static const
properly.

 drivers/staging/media/meson/vdec/codec_h264.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c 
b/drivers/staging/media/meson/vdec/codec_h264.c
index ea86e9e1c447..80141b89a9f6 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,8 +287,8 @@ static void codec_h264_resume(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_h264 *h264 = sess->priv;
u32 mb_width, mb_height, mb_total;
-   static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
-   static const u32[] canvas4 = { 24, 0 };
+   static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
+   static const u32 canvas4[] = { 24, 0 };
 
amvdec_set_canvases(sess, canvas3, canvas4);
 
-- 
2.30.2



[PATCH v2 4/4] staging: media: intel-ipu3: remove space before tabs

2021-04-12 Thread Mitali Borkar
Removed unnecessary space before tabs to adhere to  linux kernel coding
style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 0451f8b7ba4f..340d97160bbb 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -631,7 +631,7 @@ struct ipu3_uapi_bnr_static_config_wb_gains_thr_config {
  * @cg:Gain coefficient for threshold calculation, [0, 31], default 8.
  * @ci:Intensity coefficient for threshold calculation. range [0, 0x1f]
  * default 6.
- * format: u3.2 (3 most significant bits represent whole number,
+ * format: u3.2 (3 most significant bits represent whole number,
  * 2 least significant bits represent the fractional part
  * with each count representing 0.25)
  * e.g. 6 in binary format is 00110, that translates to 1.5
-- 
2.30.2



[PATCH v2 3/4] staging: media: intel-ipu3: reduce length of line

2021-04-12 Thread Mitali Borkar
Reduced length of the line under 80 characters to meet linux-kernel
coding style.

Signed-off-by: Mitali Borkar 
---

Changes from v1:- Reduced length of the line under 80 characters

 drivers/staging/media/ipu3/include/intel-ipu3.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 6a72c81d2b67..52dcc6cdcffc 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -247,7 +247,8 @@ struct ipu3_uapi_ae_ccm {
  */
 struct ipu3_uapi_ae_config {
struct ipu3_uapi_ae_grid_config grid_cfg __aligned(32);
-   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS] 
__aligned(32);
+   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS]
+   __aligned(32);
struct ipu3_uapi_ae_ccm ae_ccm __aligned(32);
 } __packed;
 
-- 
2.30.2



[PATCH v2 2/4] staging: media: intel-ipu3: reduce length of line

2021-04-12 Thread Mitali Borkar
Reduced length of line as it was exceeding 100 characters by removing
comments from same line and adding it to previous line. This makes code
neater, and meets linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/media/ipu3/include/intel-ipu3.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 335522e7fc08..53f8e5dec8f5 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -10,8 +10,10 @@
 /* from /drivers/staging/media/ipu3/include/videodev2.h */
 
 /* Vendor specific - used for IPU3 camera sub-system */
-#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p') /* IPU3 
processing parameters */
-#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's') /* IPU3 
3A statistics */
+/* IPU3 processing parameters */
+#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p')
+/* IPU3 3A statistics */
+#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's')
 
 /* from include/uapi/linux/v4l2-controls.h */
 #define V4L2_CID_INTEL_IPU3_BASE   (V4L2_CID_USER_BASE + 0x10c0)
-- 
2.30.2



[PATCH v2 1/4] staging: media: intel-ipu3: remove unnecessary blank line

2021-04-12 Thread Mitali Borkar
Removed an unnecessary blank line to meet linux kernel coding style.
Reported by checkpatch.pl

Signed-off-by: Mitali Borkar 
---

Changes from v1:- No changes. 

 drivers/staging/media/ipu3/include/intel-ipu3.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index d95ca9ebfafb..335522e7fc08 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -75,7 +75,6 @@ struct ipu3_uapi_grid_config {
(IPU3_UAPI_AWB_MAX_SETS * \
 (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))
 
-
 /**
  * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer
  *
-- 
2.30.2



[PATCH v2 0/4] staging: media: intel-ipu3: Cleanup patchset for style issues

2021-04-12 Thread Mitali Borkar
Changes from v1:-
Dropped patches 1/6 and 2/6 and compiled this as a patchset of 4
patches.
[PATCH 1/4]:- No changes.
[PATCH 2/4]:- No changes.
[PATCH 3/4]:- Reduced length of a line under 80 characters. This was
patch 5/6 previously.
[PATCH 4/4]:- No changes.

Mitali Borkar (4):
  staging: media: intel-ipu3: remove unnecessary blank line
  staging: media: intel-ipu3: reduce length of line
  staging: media: intel-ipu3: reduce length of line
  staging: media: intel-ipu3: remove space before tabs

 .../staging/media/ipu3/include/intel-ipu3.h| 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

-- 
2.30.2



[PATCH v5 3/3] staging: rtl8192e: remove casts and parentheses

2021-04-12 Thread Mitali Borkar
Removed unnecessary (void *) cast and parentheses to meet linux kernel
coding style.

Signed-off-by: Mitali Borkar 
---
 
Changes from v4:- Removed unnecessary casts and parentheses.
Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes has been made in v3.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 431202927036..ec6b46166e84 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -646,14 +646,10 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(>SelfHTCap), 0,
-  sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(>SelfHTInfo), 0,
-  sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(>PeerHTCapBuf), 0,
-  sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(>PeerHTInfoBuf), 0,
-  sizeof(pHTInfo->PeerHTInfoBuf));
+   memset(>SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap));
+   memset(>SelfHTInfo, 0, sizeof(pHTInfo->SelfHTInfo));
+   memset(>PeerHTCapBuf, 0, sizeof(pHTInfo->PeerHTCapBuf));
+   memset(>PeerHTInfoBuf, 0, sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
 
-- 
2.30.2



[PATCH v5 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-12 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v4:- No changes.
Changes from v3:- No changes.
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH v5 1/3] staging: rtl8192e: remove parentheses around boolean expression

2021-04-12 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' boolean expression as '!'
has higher precedance than '||'

Signed-off-by: Mitali Borkar 
---

Changes from v4:- No changes.
Changes from v3:- No changes.
Changes from v2:- Modified subject description. Changes has been made in
v3.
Changes from v1:- Removed unnecessary parentheses around boolean
expression. Changes has been made in v2.
 
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v5 0/3] staging: rtl8192e: Cleanup patchset for style issues in rtl819x_HTProc.c

2021-04-12 Thread Mitali Borkar
Changes from v4:-
[PATCH v4 1/3]:- No changes.
[PATCH v4 2/3]:- No changes.
[PATCH V4 3/3]:- Removed casts and parentheses.

Changes from v3:- Changed subject line to match prefix on the patches.
[PATCH v3 1/3]:- No changes.
[PATCH v3 2/3]:- No changes.
[PATCH V3 3/3]:- No changes.

Changes from v2:-
[PATCH v2 1/3]:- Modified subject description. Changes has been made in
v3.
[PATCH v2 2/3]:- No changes.
[PATCH v2 3/3]:- Rectified spelling mistake in subject description.
Changes has been made in v3.

Changes from v1:-
[PATCH 1/3]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/3]:- No changes.
[PATCH 3/3]:- No changes.

Mitali Borkar (3):
  staging: rtl8192e: remove parentheses around boolean expression
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove casts and parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c |  18 ++--
 1 file changed, 5 insertions(+), 13 deletions(-)


-- 
2.30.2



Re: [PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-12 Thread Mitali Borkar
On Mon, Apr 12, 2021 at 01:46:54PM -0700, Joe Perches wrote:
> On Mon, 2021-04-12 at 16:52 +0530, Mitali Borkar wrote:
> > Removed unnecessary parentheses because they must be used only when it
> > is necessary or they improve readability.
> > Reported by checkpatch.
> 
> I gave you feedback about the memset changes.
> Please use it.
> https://lore.kernel.org/lkml/f5fe04d62b22eb5e09c299e769d9b9d8917f119c.ca...@perches.com/
>
I am sorry Sir, I missed this. I will make required changes now.

> > Changes from v3:- No changes.
> > Changes from v2:- Rectified spelling mistake in subject description.
> > Changes has been made in v3.
> > Changes from v1:- No changes.
> []
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
> > b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> []
> > @@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
> >     pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
> >     pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
> >  
> > 
> > -   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
> > +   memset((void *)(>SelfHTCap), 0,
> >    sizeof(pHTInfo->SelfHTCap));
> 
>   memset(>SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap);
> 
> etc...
> 


Re: [Outreachy kernel] Re: [PATCH 2/6] staging: media: intel-ipu3: preferred __aligned(size) over __attribute__aligned(size)

2021-04-12 Thread Mitali Borkar
On Mon, Apr 12, 2021 at 12:43:15PM +0300, Sakari Ailus wrote:
> Hi Mitali,
> 
> On Mon, Apr 12, 2021 at 04:38:59AM +0530, Mitali Borkar wrote:
> > This patch fixes the warning identified by checkpatch.pl by replacing
> > __attribute__aligned(size) with __aligned(size)
> 
> Same comments on this than the 1st patch.
> 
> It's a staging driver so even if this is a user space header, it's not
> under include/uapi/linux.
>
Sir, I am not able to understandd what you are trying to say in this. As you
mentioned in patch 1/6, I removed and added header where BIT() macro under 
apprpriate userpace, but what should I modify in this patch?

> -- 
> Kind regards,
> 
> Sakari Ailus
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to outreachy-kernel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20210412094315.GJ3%40paasikivi.fi.intel.com.


Subject: [PATCH] staging: media: meson: vdec: declare u32 as static const

2021-04-12 Thread Mitali Borkar
Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant throughout 
execution.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/meson/vdec/codec_h264.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_h264.c 
b/drivers/staging/media/meson/vdec/codec_h264.c
index c61128fc4bb9..ea86e9e1c447 100644
--- a/drivers/staging/media/meson/vdec/codec_h264.c
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_h264 *h264 = sess->priv;
u32 mb_width, mb_height, mb_total;
+   static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
+   static const u32[] canvas4 = { 24, 0 };
 
-   amvdec_set_canvases(sess,
-   (u32[]){ ANC0_CANVAS_ADDR, 0 },
-   (u32[]){ 24, 0 });
+   amvdec_set_canvases(sess, canvas3, canvas4);
 
dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
h264->max_refs, sess->num_dst_bufs);
-- 
2.30.2



Re: [PATCH v2] staging: media: meson: vdec: declare u32 as const and static const

2021-04-12 Thread Mitali Borkar
On Mon, Apr 12, 2021 at 11:17:22AM +0200, Hans Verkuil wrote:
> On 10/04/2021 21:59, Mitali Borkar wrote:
> > Declared 32 bit unsigned int as static constant inside a function and
> > replaced u32[] {x,y} as canvas1, canvas2 in codec_mpeg12.c
> > This indicates the value of canvas indexes will remain constant throughout 
> > execution.
> > Replaced u32 reg_base and u32 reg_name with const u32 reg_base and const
> > u32 reg_name as it will contain data/registry bases to write static
> > const indexes declared above and will keep track of of contiguos
> > registers after each reg_base.
> > This makes code look better, neater. It improves readability.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  drivers/staging/media/meson/vdec/codec_mpeg12.c | 5 +++--
> 
> Also change drivers/staging/media/meson/vdec/codec_h264.c.
> 
> It's a nice improvement, so let's do this for both callers of 
> amvdec_set_canvases().
>
I have done chnages in codec_h264.c Now, should I send that as new
patch?

> Regards,
> 
>   Hans
> 
> >  drivers/staging/media/meson/vdec/vdec_helpers.c | 2 +-
> >  drivers/staging/media/meson/vdec/vdec_helpers.h | 2 +-
> >  3 files changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/staging/media/meson/vdec/codec_mpeg12.c 
> > b/drivers/staging/media/meson/vdec/codec_mpeg12.c
> > index 21e93a13356c..861d8584f22f 100644
> > --- a/drivers/staging/media/meson/vdec/codec_mpeg12.c
> > +++ b/drivers/staging/media/meson/vdec/codec_mpeg12.c
> > @@ -65,6 +65,8 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
> > struct amvdec_core *core = sess->core;
> > struct codec_mpeg12 *mpeg12;
> > int ret;
> > +   static const u32 canvas1[] = { AV_SCRATCH_0, 0 };
> > +   static const u32 canvas2[] = { 8, 0 }
> >  
> > mpeg12 = kzalloc(sizeof(*mpeg12), GFP_KERNEL);
> > if (!mpeg12)
> > @@ -80,8 +82,7 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
> > goto free_mpeg12;
> > }
> >  
> > -   ret = amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, 0 },
> > - (u32[]){ 8, 0 });
> > +   ret = amvdec_set_canvases(sess, canvas1, canvas2);
> > if (ret)
> > goto free_workspace;
> >  
> > diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c 
> > b/drivers/staging/media/meson/vdec/vdec_helpers.c
> > index 7f07a9175815..df5c27266c44 100644
> > --- a/drivers/staging/media/meson/vdec/vdec_helpers.c
> > +++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
> > @@ -177,7 +177,7 @@ static int set_canvas_nv12m(struct amvdec_session *sess,
> >  }
> >  
> >  int amvdec_set_canvases(struct amvdec_session *sess,
> > -   u32 reg_base[], u32 reg_num[])
> > +   const u32 reg_base[], const u32 reg_num[])
> >  {
> > struct v4l2_m2m_buffer *buf;
> > u32 pixfmt = sess->pixfmt_cap;
> > diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h 
> > b/drivers/staging/media/meson/vdec/vdec_helpers.h
> > index cfaed52ab526..ace8897c34fe 100644
> > --- a/drivers/staging/media/meson/vdec/vdec_helpers.h
> > +++ b/drivers/staging/media/meson/vdec/vdec_helpers.h
> > @@ -17,7 +17,7 @@
> >   * @reg_num: number of contiguous registers after each reg_base (including 
> > it)
> >   */
> >  int amvdec_set_canvases(struct amvdec_session *sess,
> > -   u32 reg_base[], u32 reg_num[]);
> > +   const u32 reg_base[], const u32 reg_num[]);
> >  
> >  /* Helpers to read/write to the various IPs (DOS, PARSER) */
> >  u32 amvdec_read_dos(struct amvdec_core *core, u32 reg);
> > 
> 


[PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-12 Thread Mitali Borkar
Removed unnecessary parentheses because they must be used only when it
is necessary or they improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes has been made in v3.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -287,7 +287,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
u8  EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-   pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+   pCapELE = (struct ht_capab_ele *)[4];
*len = 30 + 2;
} else {
pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+   memset((void *)(>SelfHTCap), 0,
   sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+   memset((void *)(>SelfHTInfo), 0,
   sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+   memset((void *)(>PeerHTCapBuf), 0,
   sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+   memset((void *)(>PeerHTInfoBuf), 0,
   sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->IOTRaFunc = 0;
 
{
-   u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+   u8 *RegHTSuppRateSets = >RegHTSuppRateSet[0];
 
RegHTSuppRateSets[0] = 0xFF;
RegHTSuppRateSets[1] = 0xFF;
-- 
2.30.2



[PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-12 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v3:- No changes.
Changes from v2:- No changes.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean expression

2021-04-12 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' boolean expression as '!'
has higher precedance than '||'

Signed-off-by: Mitali Borkar 
---
 
Changes from v3:- No changes.
Changes from v2:- Modified subject description. Changes has been made in
v3.
Changes from v1:- Removed unnecessary parentheses around boolean
expression. Changes has been made in v2.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v4 0/3] staging: rtl8192e: cleanup patchset for style issues

2021-04-12 Thread Mitali Borkar
Changes from v3:- Changed subject line to match prefix on the patches.
[PATCH v3 1/3]:- No changes.
[PATCH v3 2/3]:- No changes.
[PATCH V3 3/3]:- No changes.

Changes from v2:-
[PATCH v2 1/3]:- Modified subject description. Changes has been made in
v3.
[PATCH v2 2/3]:- No changes.
[PATCH v2 3/3]:- Rectified spelling mistake in subject description.
Changes has been made in v3.

Changes from v1:-
[PATCH 1/3]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/3]:- No changes.
[PATCH 3/3]:- No changes.

Mitali Borkar (6):
  staging: rtl8192e: remove parentheses around boolean expression
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove unnecessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c |  18 ++-
 1 file changed, 7 insertions(+), 11 deletions(-)

-- 
2.30.2



[PATCH v2 2/2] staging: vc04_services: rectify spelling mistake

2021-04-12 Thread Mitali Borkar
Corrected the misspelled word.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v1:- No changes.

 drivers/staging/vc04_services/interface/TODO | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/TODO 
b/drivers/staging/vc04_services/interface/TODO
index adb28f46ba67..39810ce017cd 100644
--- a/drivers/staging/vc04_services/interface/TODO
+++ b/drivers/staging/vc04_services/interface/TODO
@@ -37,7 +37,7 @@ This should be fixed.
 
 Even the VPU firmware doesn't support a VCHI re-connect, the driver
 should properly handle a module unload. This also includes that all
-resouces must be freed (kthreads, debugfs entries, ...) and global
+resources must be freed (kthreads, debugfs entries, ...) and global
 variables avoided.
 
 5) Cleanup logging mechanism
-- 
2.30.2



[PATCH v2 1/2] staging: vc04_services: remove trailing whitespace

2021-04-12 Thread Mitali Borkar
Removed trailing whitespace to adhere to linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v1:- No changes.

 drivers/staging/vc04_services/interface/TODO | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/TODO 
b/drivers/staging/vc04_services/interface/TODO
index 0bcb8f158afc..adb28f46ba67 100644
--- a/drivers/staging/vc04_services/interface/TODO
+++ b/drivers/staging/vc04_services/interface/TODO
@@ -27,8 +27,8 @@ unused.
 3) Make driver more portable
 
 Building this driver with arm/multi_v7_defconfig or arm64/defconfig
-leads to data corruption during the following command: 
-  
+leads to data corruption during the following command:
+
   vchiq_test -f 1
 
 This should be fixed.
-- 
2.30.2



[PATCH v2 0/2] staging: vc04_services: cleanup patchset for style issues

2021-04-12 Thread Mitali Borkar
Changes from v1:- Threaded mails properly and changed the subject line
to match prefix on patches.
[PATCH 1/2]:- No changes.
[PATCH 2/2]:- No changes.

Mitali Borkar (2):
  staging: vc04_services: remove trailing whitespace
  staging: vc04_services: rectify spelling mistake

 drivers/staging/vc04_services/interface/TODO | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.30.2



Re: [PATCH] staging: rtl8188eu: replaced msleep() by usleep_range()

2021-04-12 Thread Mitali Borkar
On Mon, Apr 12, 2021 at 08:19:02AM +0200, Greg KH wrote:
> On Mon, Apr 12, 2021 at 11:40:53AM +0530, Mitali Borkar wrote:
> > Fixed the warning:-msleep < 20ms can sleep for up to 20ms by replacing
> > msleep(unsigned long msecs) by usleep_range(unsigned long min, unsigned 
> > long max)
> > in usecs as msleep(1ms~20ms) can sleep for upto 20 ms.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
> > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> > index 50d3c3631be0..6afbb5bf8118 100644
> > --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> > @@ -5396,7 +5396,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned 
> > char *pbuf)
> > return H2C_SUCCESS;
> >  
> > if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 
> > 0)) {
> > -   msleep(10);/*  10ms, ATIM(HIQ) Windows */
> > +   usleep_range(1 , 2);/*  10ms, ATIM(HIQ) Windows 
> > */
> 
> How do you know you can sleep for 2 here?
>

When i ran checkpatch.pl it warned that msleep<20 ms can sleep for 20ms.
I checked Documentation, it stated that msleep(1ms~20ms) will often
sleep longer, ~20ms for any value given in between 1~20ms. 

That's why I took 20msec/2usec as max sleep value. 


> And given that you just changed how the sleep works, are you sure the
> functionality is the same now?

I am still learning, I am not sure about this.
> 
> Only change this type of warning if you have the hardware and can test
> the change properly.
> 
> thanks,
> 
> greg k-h


[PATCH] staging: rtl8188eu: replaced msleep() by usleep_range()

2021-04-12 Thread Mitali Borkar
Fixed the warning:-msleep < 20ms can sleep for up to 20ms by replacing
msleep(unsigned long msecs) by usleep_range(unsigned long min, unsigned long 
max)
in usecs as msleep(1ms~20ms) can sleep for upto 20 ms.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 50d3c3631be0..6afbb5bf8118 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -5396,7 +5396,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char 
*pbuf)
return H2C_SUCCESS;
 
if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 
0)) {
-   msleep(10);/*  10ms, ATIM(HIQ) Windows */
+   usleep_range(1 , 2);/*  10ms, ATIM(HIQ) Windows 
*/
spin_lock_bh(_bmc->sleep_q.lock);
 
xmitframe_phead = get_list_head(_bmc->sleep_q);
-- 
2.30.2



[PATCH 6/6] staging: media: intel-ipu3: remove space before tabs

2021-04-11 Thread Mitali Borkar
Removed unnecessary space before tabs to adhere to  linux kernel coding
style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 0451f8b7ba4f..340d97160bbb 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -631,7 +631,7 @@ struct ipu3_uapi_bnr_static_config_wb_gains_thr_config {
  * @cg:Gain coefficient for threshold calculation, [0, 31], default 8.
  * @ci:Intensity coefficient for threshold calculation. range [0, 0x1f]
  * default 6.
- * format: u3.2 (3 most significant bits represent whole number,
+ * format: u3.2 (3 most significant bits represent whole number,
  * 2 least significant bits represent the fractional part
  * with each count representing 0.25)
  * e.g. 6 in binary format is 00110, that translates to 1.5
-- 
2.30.2



[PATCH 5/6] staging: media: intel-ipu3: line should not end with '['

2021-04-11 Thread Mitali Borkar
Fixed the issue of line should not end with '[' by moving arguments
from next line to line ending with '['
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 53f8e5dec8f5..0451f8b7ba4f 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -246,8 +246,7 @@ struct ipu3_uapi_ae_ccm {
  */
 struct ipu3_uapi_ae_config {
struct ipu3_uapi_ae_grid_config grid_cfg __aligned(32);
-   struct ipu3_uapi_ae_weight_elem weights[
-   IPU3_UAPI_AE_WEIGHTS] __aligned(32);
+   struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS] 
__aligned(32);
struct ipu3_uapi_ae_ccm ae_ccm __aligned(32);
 } __packed;
 
-- 
2.30.2



[PATCH 4/6] staging: media: intel-ipu3: reduce length of line

2021-04-11 Thread Mitali Borkar
Reduced length of line as it was exceeding 100 characters by removing
comments from same line and adding it to previous line. This makes code
neater, and meets linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 335522e7fc08..53f8e5dec8f5 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -10,8 +10,10 @@
 /* from /drivers/staging/media/ipu3/include/videodev2.h */
 
 /* Vendor specific - used for IPU3 camera sub-system */
-#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p') /* IPU3 
processing parameters */
-#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's') /* IPU3 
3A statistics */
+/* IPU3 processing parameters */
+#define V4L2_META_FMT_IPU3_PARAMS  v4l2_fourcc('i', 'p', '3', 'p')
+/* IPU3 3A statistics */
+#define V4L2_META_FMT_IPU3_STAT_3A v4l2_fourcc('i', 'p', '3', 's')
 
 /* from include/uapi/linux/v4l2-controls.h */
 #define V4L2_CID_INTEL_IPU3_BASE   (V4L2_CID_USER_BASE + 0x10c0)
-- 
2.30.2



[PATCH 3/6] staging: media: intel-ipu3: remove unnecessary blank line

2021-04-11 Thread Mitali Borkar
Removed an unnecessary blank line to meet linux kernel coding style.
Reported by checkpatch.pl

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index d95ca9ebfafb..335522e7fc08 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -75,7 +75,6 @@ struct ipu3_uapi_grid_config {
(IPU3_UAPI_AWB_MAX_SETS * \
 (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))
 
-
 /**
  * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer
  *
-- 
2.30.2



[PATCH 1/6] staging: media: intel-ipu3: replace bit shifts with BIT() macro

2021-04-11 Thread Mitali Borkar
Added #include  and replaced bit shifts by BIT() macro.
This BIT() macro from linux/bitops.h is used to define IPU3_UAPI_GRID_Y_START_EN
and IPU3_UAPI_AWB_RGBS_THR_B_* bitmask.
Use of macro is better and neater. It maintains consistency.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/ipu3/include/intel-ipu3.h | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index edd8edda0647..589d5ccee3a7 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -5,6 +5,7 @@
 #define __IPU3_UAPI_H
 
 #include 
+#include 
 
 /* from /drivers/staging/media/ipu3/include/videodev2.h */
 
@@ -22,11 +23,11 @@
 #define IPU3_UAPI_MAX_BUBBLE_SIZE  10
 
 #define IPU3_UAPI_GRID_START_MASK  ((1 << 12) - 1)
-#define IPU3_UAPI_GRID_Y_START_EN  (1 << 15)
+#define IPU3_UAPI_GRID_Y_START_EN  BIT(15)
 
 /* controls generation of meta_data (like FF enable/disable) */
-#define IPU3_UAPI_AWB_RGBS_THR_B_EN(1 << 14)
-#define IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT  (1 << 15)
+#define IPU3_UAPI_AWB_RGBS_THR_B_ENBIT(14)
+#define IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT  BIT(15)
 
 /**
  * struct ipu3_uapi_grid_config - Grid plane config
-- 
2.30.2



[PATCH 2/6] staging: media: intel-ipu3: preferred __aligned(size) over __attribute__aligned(size)

2021-04-11 Thread Mitali Borkar
This patch fixes the warning identified by checkpatch.pl by replacing
__attribute__aligned(size) with __aligned(size)

Signed-off-by: Mitali Borkar 
---
 .../staging/media/ipu3/include/intel-ipu3.h   | 74 +--
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h 
b/drivers/staging/media/ipu3/include/intel-ipu3.h
index 589d5ccee3a7..d95ca9ebfafb 100644
--- a/drivers/staging/media/ipu3/include/intel-ipu3.h
+++ b/drivers/staging/media/ipu3/include/intel-ipu3.h
@@ -84,7 +84,7 @@ struct ipu3_uapi_grid_config {
  */
 struct ipu3_uapi_awb_raw_buffer {
__u8 meta_data[IPU3_UAPI_AWB_MAX_BUFFER_SIZE]
-   __attribute__((aligned(32)));
+   __aligned(32);
 } __packed;
 
 /**
@@ -105,7 +105,7 @@ struct ipu3_uapi_awb_config_s {
__u16 rgbs_thr_gb;
__u16 rgbs_thr_b;
struct ipu3_uapi_grid_config grid;
-} __attribute__((aligned(32))) __packed;
+}  __aligned(32) __packed;
 
 /**
  * struct ipu3_uapi_awb_config - AWB config wrapper
@@ -113,7 +113,7 @@ struct ipu3_uapi_awb_config_s {
  * @config: config for auto white balance as defined by _uapi_awb_config_s
  */
 struct ipu3_uapi_awb_config {
-   struct ipu3_uapi_awb_config_s config __attribute__((aligned(32)));
+   struct ipu3_uapi_awb_config_s config __aligned(32);
 } __packed;
 
 #define IPU3_UAPI_AE_COLORS4   /* R, G, B, Y */
@@ -138,7 +138,7 @@ struct ipu3_uapi_ae_raw_buffer {
  * @buff: _uapi_ae_raw_buffer to hold full frame meta data.
  */
 struct ipu3_uapi_ae_raw_buffer_aligned {
-   struct ipu3_uapi_ae_raw_buffer buff __attribute__((aligned(32)));
+   struct ipu3_uapi_ae_raw_buffer buff __aligned(32);
 } __packed;
 
 /**
@@ -244,10 +244,10 @@ struct ipu3_uapi_ae_ccm {
  * Calculate AE grid from image resolution, resample ae weights.
  */
 struct ipu3_uapi_ae_config {
-   struct ipu3_uapi_ae_grid_config grid_cfg __attribute__((aligned(32)));
+   struct ipu3_uapi_ae_grid_config grid_cfg __aligned(32);
struct ipu3_uapi_ae_weight_elem weights[
-   IPU3_UAPI_AE_WEIGHTS] __attribute__((aligned(32)));
-   struct ipu3_uapi_ae_ccm ae_ccm __attribute__((aligned(32)));
+   IPU3_UAPI_AE_WEIGHTS] __aligned(32);
+   struct ipu3_uapi_ae_ccm ae_ccm __aligned(32);
 } __packed;
 
 /**
@@ -389,7 +389,7 @@ struct ipu3_uapi_af_filter_config {
  * each cell.
  */
 struct ipu3_uapi_af_raw_buffer {
-   __u8 y_table[IPU3_UAPI_AF_Y_TABLE_MAX_SIZE] 
__attribute__((aligned(32)));
+   __u8 y_table[IPU3_UAPI_AF_Y_TABLE_MAX_SIZE] __aligned(32);
 } __packed;
 
 /**
@@ -402,9 +402,9 @@ struct ipu3_uapi_af_raw_buffer {
  *   grid size for large image and vice versa.
  */
 struct ipu3_uapi_af_config_s {
-   struct ipu3_uapi_af_filter_config filter_config 
__attribute__((aligned(32)));
+   struct ipu3_uapi_af_filter_config filter_config __aligned(32);
__u8 padding[4];
-   struct ipu3_uapi_grid_config grid_cfg __attribute__((aligned(32)));
+   struct ipu3_uapi_grid_config grid_cfg __aligned(32);
 } __packed;
 
 #define IPU3_UAPI_AWB_FR_MAX_SETS  24
@@ -425,7 +425,7 @@ struct ipu3_uapi_af_config_s {
  */
 struct ipu3_uapi_awb_fr_raw_buffer {
__u8 meta_data[IPU3_UAPI_AWB_FR_BAYER_TABLE_MAX_SIZE]
-   __attribute__((aligned(32)));
+   __aligned(32);
 } __packed;
 
 /**
@@ -463,12 +463,12 @@ struct ipu3_uapi_awb_fr_config_s {
  * @awb_fr_config: _uapi_awb_fr_config_s, default resolution 16x16
  */
 struct ipu3_uapi_4a_config {
-   struct ipu3_uapi_awb_config_s awb_config __attribute__((aligned(32)));
+   struct ipu3_uapi_awb_config_s awb_config __aligned(32);
struct ipu3_uapi_ae_grid_config ae_grd_config;
__u8 padding[20];
struct ipu3_uapi_af_config_s af_config;
struct ipu3_uapi_awb_fr_config_s awb_fr_config
-   __attribute__((aligned(32)));
+   __aligned(32);
 } __packed;
 
 /**
@@ -487,7 +487,7 @@ struct ipu3_uapi_4a_config {
  * @padding3: padding bytes.
  */
 struct ipu3_uapi_bubble_info {
-   __u32 num_of_stripes __attribute__((aligned(32)));
+   __u32 num_of_stripes __aligned(32);
__u8 padding[28];
__u32 num_sets;
__u8 padding1[28];
@@ -519,7 +519,7 @@ struct ipu3_uapi_stats_3a_bubble_info_per_stripe {
  * @padding3: padding config
  */
 struct ipu3_uapi_ff_status {
-   __u32 awb_en __attribute__((aligned(32)));
+   __u32 awb_en __aligned(32);
__u8 padding[28];
__u32 ae_en;
__u8 padding1[28];
@@ -992,8 +992,8 @@ struct ipu3_uapi_gamma_corr_lut {
  * @gc_lut: lookup table of gamma correction _uapi_gamma_corr_lut
  */
 struct ipu3_uapi_gamma_config {
-   struct ipu3_uapi_gamma_corr_ctrl gc_ctrl __attribute__((aligned(32)));
-   struct ipu3_uapi_gamma_corr_lut gc_lut __attribute__((aligned(32)));
+   struct

[PATCH 0/6] staging: media: intel-ipu3: cleanup patchset for style issues

2021-04-11 Thread Mitali Borkar
tian.shu@intel.com, mche...@kernel.org, gre...@linuxfoundation.org
Cc: linux-me...@vger.kernel.org, linux-stag...@lists.linux.dev, 
linux-kernel@vger.kernel.org, outreachy-ker...@googlegroups.com, 
mital...@me.iitr.ac.in
Subject: [PATCH 0/6] cleanup patchset for style issues
Message-ID: 

This pacthset fixes the style issues reported by checkpatch.pl

Mitali Borkar (6):
  staging: media: intel-ipu3: replace bit shifts with BIT() macro
  staging: media: intel-ipu3: preferred __aligned(size) over
__attribute__aligned(size)
  staging: media: intel-ipu3: remove unnecessary blank line
  staging: media: intel-ipu3: reduce length of line
  staging: media: intel-ipu3: line should not end with '['
  staging: media: intel-ipu3: remove space before tabs

 .../staging/media/ipu3/include/intel-ipu3.h   | 91 ++-
 1 file changed, 46 insertions(+), 45 deletions(-)

-- 
2.30.2



[PATCH 2/2] staging: vc04_services: rectify spelling mistake

2021-04-11 Thread Mitali Borkar
Corrected the misspelled word.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/vc04_services/interface/TODO | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/TODO 
b/drivers/staging/vc04_services/interface/TODO
index adb28f46ba67..39810ce017cd 100644
--- a/drivers/staging/vc04_services/interface/TODO
+++ b/drivers/staging/vc04_services/interface/TODO
@@ -37,7 +37,7 @@ This should be fixed.
 
 Even the VPU firmware doesn't support a VCHI re-connect, the driver
 should properly handle a module unload. This also includes that all
-resouces must be freed (kthreads, debugfs entries, ...) and global
+resources must be freed (kthreads, debugfs entries, ...) and global
 variables avoided.
 
 5) Cleanup logging mechanism
-- 
2.30.2



[PATCH 1/2] staging: vc04_services: remove trailing whitespace

2021-04-11 Thread Mitali Borkar
Removed trailing whitespace to adhere to linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/vc04_services/interface/TODO | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/TODO 
b/drivers/staging/vc04_services/interface/TODO
index 0bcb8f158afc..adb28f46ba67 100644
--- a/drivers/staging/vc04_services/interface/TODO
+++ b/drivers/staging/vc04_services/interface/TODO
@@ -27,8 +27,8 @@ unused.
 3) Make driver more portable
 
 Building this driver with arm/multi_v7_defconfig or arm64/defconfig
-leads to data corruption during the following command: 
-  
+leads to data corruption during the following command:
+
   vchiq_test -f 1
 
 This should be fixed.
-- 
2.30.2



[PATCH 0/2] remove whitespace and rectify spelling error

2021-04-11 Thread Mitali Borkar
This patch fixes whitespace and spelling mistake issue.

Mitali Borkar (2):
  staging: vc04_services: remove trailing whitespace
  staging: vc04_services: rectify spelling mistake

 drivers/staging/vc04_services/interface/TODO | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.30.2



[PATCH] staging: rts5208: remove unnecessary ftrace-like logging

2021-04-11 Thread Mitali Borkar
Removed unnecessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rts5208/xd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 0f369935fb6c..a305e15dfb9c 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -1628,7 +1628,6 @@ static int xd_finish_write(struct rtsx_chip *chip,
int retval, zone_no;
u16 log_off;
 
-   dev_dbg(rtsx_dev(chip), "%s ", __func__);
dev_dbg(rtsx_dev(chip), "old_blk = 0x%x, ", old_blk);
dev_dbg(rtsx_dev(chip), "new_blk = 0x%x, ", new_blk);
dev_dbg(rtsx_dev(chip), "log_blk = 0x%x\n", log_blk);
@@ -1806,7 +1805,6 @@ int xd_delay_write(struct rtsx_chip *chip)
int retval;
 
if (delay_write->delay_write_flag) {
-   dev_dbg(rtsx_dev(chip), "%s\n", __func__);
retval = xd_switch_clock(chip);
if (retval != STATUS_SUCCESS)
return STATUS_FAIL;
-- 
2.30.2



Re: [PATCH] staging: media: zoran: reduce length of a line

2021-04-11 Thread Mitali Borkar
On Fri, Apr 09, 2021 at 09:26:48AM +0200, Hans Verkuil wrote:
> Hi Mitali,
> 
> Something to improve:
> 
> On 08/04/2021 23:21, Mitali Borkar wrote:
> > Reduced length of a line which exceed the 100 columns limit by splitting
> > the line into two statements and commenting it with '*'
> > Reported by checkpatch.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> >  drivers/staging/media/zoran/zr36060.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/zoran/zr36060.c 
> > b/drivers/staging/media/zoran/zr36060.c
> > index 4f9eb9ff2c42..035634fc1c6d 100644
> > --- a/drivers/staging/media/zoran/zr36060.c
> > +++ b/drivers/staging/media/zoran/zr36060.c
> > @@ -249,7 +249,9 @@ static const char zr36060_ta[8] = { 0, 1, 1, 0, 0, 0, 
> > 0, 0 };   //table idx's AC
> >  static const char zr36060_decimation_h[8] = { 2, 1, 1, 0, 0, 0, 0, 0 };
> >  static const char zr36060_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 };
> >  
> > -/* SOF (start of frame) segment depends on width, height and sampling 
> > ratio of each color component */
> > +/* SOF (start of frame) segment depends on width,
> > + * height and sampling ratio of each color component
> > + */
> 
> See the coding style guidelines: the preferred style for long comments is:
> 
> /*
>  * text
>  * text
>  */
>
I have sent v2 patch two days ago and I have not got reply till now,
Should I resend this?

> Regards,
> 
>   Hans
> 
> >  static int zr36060_set_sof(struct zr36060 *ptr)
> >  {
> > char sof_data[34];  // max. size of register set
> > 
> 


Re: [PATCH v2] staging: media: zoran: remove and add '*' in long(multi-line) comments

2021-04-11 Thread Mitali Borkar
On Fri, Apr 09, 2021 at 12:53:35PM +0200, Hans Verkuil wrote:
> On 09/04/2021 12:49, Mitali Borkar wrote:
> > Added '*' before every line inside long(multi-line) comments. Removed
> > '*/' from end of the comment line and added to next line as per linux
> > kernel coding style. Aligned '*' accordingly to make code neater.
> > 
> > Signed-off-by: Mitali Borkar 
> > ---
> > 
> > Changes from v1:- Changes made in code according to linux kernel coding
> > style for long(multi-line) comments.
> > 
> > drivers/staging/media/zoran/zr36050.c | 138 +++---
> >  1 file changed, 81 insertions(+), 57 deletions(-)
> > 
> > diff --git a/drivers/staging/media/zoran/zr36050.c 
> > b/drivers/staging/media/zoran/zr36050.c
> > index 663ac2b3434e..703064009c6b 100644
> > --- a/drivers/staging/media/zoran/zr36050.c
> > +++ b/drivers/staging/media/zoran/zr36050.c
> > @@ -25,7 +25,8 @@
> >  #include "videocodec.h"
> >  
> >  /* it doesn't make sense to have more than 20 or so,
> 
> The coding style says that /* is on a line of its own. So change that too.
>

Sir, I have sent v3 patch for this two days ago and didnt received reply
til now, should I resend that patch?

> Regards,
> 
>   Hans
> 
> > - * just to prevent some unwanted loops */
> > + * just to prevent some unwanted loops
> > + */
> >  #define MAX_CODECS 20
> >  
> >  /* amount of chips attached via this driver */
> > @@ -44,9 +45,10 @@ MODULE_PARM_DESC(debug, "Debug level (0-4)");
> >  
> >  /* 
> > =
> >   *  Local hardware I/O functions:
> > -
> > -   read/write via codec layer (registers are located in the master device)
> > -   
> > = */
> > + *
> > + *  read/write via codec layer (registers are located in the master device)
> > + * 
> > =
> > + */
> >  
> >  /* read and write functions */
> >  static u8 zr36050_read(struct zr36050 *ptr, u16 reg)
> > @@ -81,9 +83,10 @@ static void zr36050_write(struct zr36050 *ptr, u16 reg, 
> > u8 value)
> >  
> >  /* 
> > =
> >   *  Local helper function:
> > -
> > -   status read
> > -   
> > = */
> > + *
> > + *  status read
> > + * 
> > =
> > + */
> >  
> >  /* status is kept in datastructure */
> >  static u8 zr36050_read_status1(struct zr36050 *ptr)
> > @@ -96,9 +99,10 @@ static u8 zr36050_read_status1(struct zr36050 *ptr)
> >  
> >  /* 
> > =
> >   *  Local helper function:
> > -
> > -   scale factor read
> > -   
> > = */
> > + *
> > + *  scale factor read
> > + * 
> > =
> > + */
> >  
> >  /* scale factor is kept in datastructure */
> >  static u16 zr36050_read_scalefactor(struct zr36050 *ptr)
> > @@ -113,9 +117,10 @@ static u16 zr36050_read_scalefactor(struct zr36050 
> > *ptr)
> >  
> >  /* 
> > =
> >   *  Local helper function:
> > -
> > -   wait if codec is ready to proceed (end of processing) or time is over
> > -   
> > = */
> > + *
> > + *  wait if codec is ready to proceed (end of processing) or time is over
> > + * 
> > =
> > + */
> >  
> >  static void zr36050_wait_end(struct zr36050 *ptr)
> >  {
> > @@ -134,9 +139,10 @@ static void zr36050_wait_end(struct zr36050 *ptr)
> >  
> >  /* 
> > =
> >   *  Local helper function:
> > -
> > -   basic test of "connectivity", writes/reads to/from memory the SOF marker
> > -   
> > = */
> > + *
> > + *  basic test of "connectivity", writes/reads to/fr

[PATCH v4 3/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-11 Thread Mitali Borkar
Removed unnecessary parentheses because they must be used only when it
is necessary or they improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v3:- No changes.
Changes from v2:- Rectified spelling mistake in subject description.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -287,7 +287,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
u8  EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-   pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+   pCapELE = (struct ht_capab_ele *)[4];
*len = 30 + 2;
} else {
pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+   memset((void *)(>SelfHTCap), 0,
   sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+   memset((void *)(>SelfHTInfo), 0,
   sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+   memset((void *)(>PeerHTCapBuf), 0,
   sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+   memset((void *)(>PeerHTInfoBuf), 0,
   sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->IOTRaFunc = 0;
 
{
-   u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+   u8 *RegHTSuppRateSets = >RegHTSuppRateSet[0];
 
RegHTSuppRateSets[0] = 0xFF;
RegHTSuppRateSets[1] = 0xFF;
-- 
2.30.2



[PATCH v4 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-11 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v3:- No changes.
Changes from v2:- No changes.
Changes from v1:- NO changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH v4 1/3] staging: rtl8192e: remove parentheses around boolean experssion

2021-04-11 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' boolean expression as '!'
has higher precedance than '||'

Signed-off-by: Mitali Borkar 
---

Changes from v3:- Modified log message. 
Changes from v2:- Modified subject description.
Changes from v1:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v4 0/3] staging: rtl8192e: modified log message

2021-04-11 Thread Mitali Borkar
This patch fixes style issues
Changes from v3:-
[PATCH v3 1/3]:- Modified log message.
[PATCH V3 2/3]:- No changes.
[PATCH v3 3/3]:- No changes

Changes from v2:-
[PATCH v2 1/3]:- Modified subject description.
[PATCH V2 2/3]:- No changes.
[PATCH v2 3/3]:- Rectified spelling mistake in subject description.

Changes from v1:-
[PATCH 1/3]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/3]:- No changes.
[PATCH 3/3]:- No changes.

Mitali Borkar (3):
staging: rtl8192e: remove parentheses around boolean expression
staging: rtl8192e: remove unnecessary ftrace-like logging
staging: rtl8192e: remove unnecessary parentheses

drivers/staging/rtl8192e/rtl819x_HTProc.c | 18 ++-
1 files changed, 7 insertions(+), 11 deletions(-)


-- 
2.30.2



[PATCH v3 3/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-11 Thread Mitali Borkar
Removed unnecessary parentheses because they must be used only when it
is necessary or they improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v2:- Rectified spelling mistake in subject description.
Changes from v1:- No changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -287,7 +287,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
u8  EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-   pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+   pCapELE = (struct ht_capab_ele *)[4];
*len = 30 + 2;
} else {
pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+   memset((void *)(>SelfHTCap), 0,
   sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+   memset((void *)(>SelfHTInfo), 0,
   sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+   memset((void *)(>PeerHTCapBuf), 0,
   sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+   memset((void *)(>PeerHTInfoBuf), 0,
   sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->IOTRaFunc = 0;
 
{
-   u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+   u8 *RegHTSuppRateSets = >RegHTSuppRateSet[0];
 
RegHTSuppRateSets[0] = 0xFF;
RegHTSuppRateSets[1] = 0xFF;
-- 
2.30.2



[PATCH v3 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-11 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 
Changes from v2:- No changes.
Changes from v1:- NO changes.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH v3 1/3] staging: rtl8192e: remove parentheses around boolean expression

2021-04-11 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' boolean expression as '!' has 
higher
precedance than '||'

Signed-off-by: Mitali Borkar 
---
 
Changes from v2:- Modified subject description.
Changes from v1:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v3 0/3] Modify subject description and rectify spelling mistake.

2021-04-11 Thread Mitali Borkar
This patch fixes style issues
Changes from v2:-
[PATCH v2 1/3]:- Modified subject description.
[PATCH V2 2/3]:- No changes.
[PATCH v2 3/3]:- Rectified spelling mistake in subject description.

Changes from v1:- 
[PATCH 1/3]:- Removed unnecessary parentheses around boolean expression.
Changes has been made in v2.
[PATCH 2/3]:- No changes.
[PATCH 3/3]:- No changes.

Mitali Borkar (3):
  staging: rtl8192e: remove parentheses around boolean expression
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove unnecessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c |  18 ++-
 1 files changed, 7 insertions(+), 11 deletions(-)

-- 
2.30.2



[PATCH v2 3/3] staging: rtl8192e: remove unncessary parentheses

2021-04-10 Thread Mitali Borkar
Removed unnecessary parentheses because they must be used only when it
is necessary or they improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v1:- No changes. 

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -287,7 +287,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
u8  EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-   pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+   pCapELE = (struct ht_capab_ele *)[4];
*len = 30 + 2;
} else {
pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+   memset((void *)(>SelfHTCap), 0,
   sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+   memset((void *)(>SelfHTInfo), 0,
   sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+   memset((void *)(>PeerHTCapBuf), 0,
   sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+   memset((void *)(>PeerHTInfoBuf), 0,
   sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->IOTRaFunc = 0;
 
{
-   u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+   u8 *RegHTSuppRateSets = >RegHTSuppRateSet[0];
 
RegHTSuppRateSets[0] = 0xFF;
RegHTSuppRateSets[1] = 0xFF;
-- 
2.30.2



[PATCH v2 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-10 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---

Changes from v1:- No changes made.

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH v2 1/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-10 Thread Mitali Borkar
Removed unnecessary parentheses around '!xyz' as '!' has higher
precedance than '||'

Signed-off-by: Mitali Borkar 
---

Changes from v1:- removed unnecessary parentheses around boolean
expression

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index b1fa8e9a4f28..431202927036 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((!posHTCap) || (!pHT)) {
+   if (!posHTCap || !pHT) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
-- 
2.30.2



[PATCH v2 0/3] staging: rtl8192e: remove unnecessary parentheses

2021-04-10 Thread Mitali Borkar
This patch fixes style issues
Changes from v1:-
[Patch 1/3]:- Removed unnecessary parentheses around boolean expressions
[Patch 2/3]:- No changes
[Patch 3/3]:- No changes

Mitali Borkar (3):
  staging: rtl8192e: remove unnecessary parentheses
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove unncessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.2



[PATCH v2] staging: media: meson: vdec: declare u32 as const and static const

2021-04-10 Thread Mitali Borkar
Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas1, canvas2 in codec_mpeg12.c
This indicates the value of canvas indexes will remain constant throughout 
execution.
Replaced u32 reg_base and u32 reg_name with const u32 reg_base and const
u32 reg_name as it will contain data/registry bases to write static
const indexes declared above and will keep track of of contiguos
registers after each reg_base.
This makes code look better, neater. It improves readability.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/meson/vdec/codec_mpeg12.c | 5 +++--
 drivers/staging/media/meson/vdec/vdec_helpers.c | 2 +-
 drivers/staging/media/meson/vdec/vdec_helpers.h | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/meson/vdec/codec_mpeg12.c 
b/drivers/staging/media/meson/vdec/codec_mpeg12.c
index 21e93a13356c..861d8584f22f 100644
--- a/drivers/staging/media/meson/vdec/codec_mpeg12.c
+++ b/drivers/staging/media/meson/vdec/codec_mpeg12.c
@@ -65,6 +65,8 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_mpeg12 *mpeg12;
int ret;
+   static const u32 canvas1[] = { AV_SCRATCH_0, 0 };
+   static const u32 canvas2[] = { 8, 0 }
 
mpeg12 = kzalloc(sizeof(*mpeg12), GFP_KERNEL);
if (!mpeg12)
@@ -80,8 +82,7 @@ static int codec_mpeg12_start(struct amvdec_session *sess)
goto free_mpeg12;
}
 
-   ret = amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, 0 },
- (u32[]){ 8, 0 });
+   ret = amvdec_set_canvases(sess, canvas1, canvas2);
if (ret)
goto free_workspace;
 
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c 
b/drivers/staging/media/meson/vdec/vdec_helpers.c
index 7f07a9175815..df5c27266c44 100644
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
@@ -177,7 +177,7 @@ static int set_canvas_nv12m(struct amvdec_session *sess,
 }
 
 int amvdec_set_canvases(struct amvdec_session *sess,
-   u32 reg_base[], u32 reg_num[])
+   const u32 reg_base[], const u32 reg_num[])
 {
struct v4l2_m2m_buffer *buf;
u32 pixfmt = sess->pixfmt_cap;
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h 
b/drivers/staging/media/meson/vdec/vdec_helpers.h
index cfaed52ab526..ace8897c34fe 100644
--- a/drivers/staging/media/meson/vdec/vdec_helpers.h
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h
@@ -17,7 +17,7 @@
  * @reg_num: number of contiguous registers after each reg_base (including it)
  */
 int amvdec_set_canvases(struct amvdec_session *sess,
-   u32 reg_base[], u32 reg_num[]);
+   const u32 reg_base[], const u32 reg_num[]);
 
 /* Helpers to read/write to the various IPs (DOS, PARSER) */
 u32 amvdec_read_dos(struct amvdec_core *core, u32 reg);
-- 
2.30.2



[PATCH v3 2/2] staging: media: zoran: align code appropriately

2021-04-10 Thread Mitali Borkar
Aligned the code properly by using tabs to make code neater and improve
readability.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/media/zoran/zr36057.h | 108 +-
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/drivers/staging/media/zoran/zr36057.h 
b/drivers/staging/media/zoran/zr36057.h
index 198d344a8879..db42f445248f 100644
--- a/drivers/staging/media/zoran/zr36057.h
+++ b/drivers/staging/media/zoran/zr36057.h
@@ -13,28 +13,28 @@
 /* Zoran ZR36057 registers */
 
 /* Video Front End, Horizontal Configuration Register */
-#define ZR36057_VFEHCR 0x000
+#define ZR36057_VFEHCR 0x000
 #define ZR36057_VFEHCR_HS_POL  BIT(30)
-#define ZR36057_VFEHCR_H_START 10
-#define ZR36057_VFEHCR_H_END   0
-#define ZR36057_VFEHCR_HMASK   0x3ff
+#define ZR36057_VFEHCR_H_START 10
+#define ZR36057_VFEHCR_H_END   0
+#define ZR36057_VFEHCR_HMASK   0x3ff
 
 /* Video Front End, Vertical Configuration Register */
-#define ZR36057_VFEVCR 0x004
+#define ZR36057_VFEVCR 0x004
 #define ZR36057_VFEVCR_VS_POL  BIT(30)
-#define ZR36057_VFEVCR_V_START 10
-#define ZR36057_VFEVCR_V_END   0
-#define ZR36057_VFEVCR_VMASK   0x3ff
+#define ZR36057_VFEVCR_V_START 10
+#define ZR36057_VFEVCR_V_END   0
+#define ZR36057_VFEVCR_VMASK   0x3ff
 
 /* Video Front End, Scaler and Pixel Format Register */
 #define ZR36057_VFESPFR0x008
 #define ZR36057_VFESPFR_EXT_FL BIT(26)
 #define ZR36057_VFESPFR_TOP_FIELD  BIT(25)
 #define ZR36057_VFESPFR_VCLK_POL   BIT(24)
-#define ZR36057_VFESPFR_H_FILTER   21
+#define ZR36057_VFESPFR_H_FILTER   21
 #define ZR36057_VFESPFR_HOR_DCM14
 #define ZR36057_VFESPFR_VER_DCM8
-#define ZR36057_VFESPFR_DISP_MODE  6
+#define ZR36057_VFESPFR_DISP_MODE  6
 #define ZR36057_VFESPFR_YUV422 (0 << 3)
 #define ZR36057_VFESPFR_RGB888 BIT(3)
 #define ZR36057_VFESPFR_RGB565 (2 << 3)
@@ -44,34 +44,34 @@
 #define ZR36057_VFESPFR_LITTLE_ENDIAN  BIT(0)
 
 /* Video Display "Top" Register */
-#define ZR36057_VDTR   0x00c
+#define ZR36057_VDTR   0x00c
 
 /* Video Display "Bottom" Register */
-#define ZR36057_VDBR   0x010
+#define ZR36057_VDBR   0x010
 
 /* Video Stride, Status, and Frame Grab Register */
-#define ZR36057_VSSFGR 0x014
-#define ZR36057_VSSFGR_DISP_STRIDE 16
+#define ZR36057_VSSFGR 0x014
+#define ZR36057_VSSFGR_DISP_STRIDE 16
 #define ZR36057_VSSFGR_VID_OVF BIT(8)
 #define ZR36057_VSSFGR_SNAP_SHOT   BIT(1)
 #define ZR36057_VSSFGR_FRAME_GRAB  BIT(0)
 
 /* Video Display Configuration Register */
-#define ZR36057_VDCR   0x018
+#define ZR36057_VDCR   0x018
 #define ZR36057_VDCR_VID_ENBIT(31)
-#define ZR36057_VDCR_MIN_PIX   24
+#define ZR36057_VDCR_MIN_PIX   24
 #define ZR36057_VDCR_TRITONBIT(24)
 #define ZR36057_VDCR_VID_WIN_HT12
-#define ZR36057_VDCR_VID_WIN_WID   0
+#define ZR36057_VDCR_VID_WIN_WID   0
 
 /* Masking Map "Top" Register */
-#define ZR36057_MMTR   0x01c
+#define ZR36057_MMTR   0x01c
 
 /* Masking Map "Bottom" Register */
-#define ZR36057_MMBR   0x020
+#define ZR36057_MMBR   0x020
 
 /* Overlay Control Register */
-#define ZR36057_OCR0x024
+#define ZR36057_OCR0x024
 #define ZR36057_OCR_OVL_ENABLE BIT(15)
 #define ZR36057_OCR_MASK_STRIDE0
 
@@ -83,42 +83,42 @@
 #define ZR36057_GPPGCR10x02c
 
 /* MPEG Code Source Address Register */
-#define ZR36057_MCSAR  0x030
+#define ZR36057_MCSAR  0x030
 
 /* MPEG Code Transfer Control Register */
-#define ZR36057_MCTCR  0x034
+#define ZR36057_MCTCR  0x034
 #define ZR36057_MCTCR_COD_TIME BIT(30)
 #define ZR36057_MCTCR_C_EMPTY  BIT(29)
 #define ZR36057_MCTCR_C_FLUSH  BIT(28)
-#define ZR36057_MCTCR_COD_GUEST_ID 20
-#define ZR36057_MCTCR_COD_GUEST_REG16
+#define ZR36057_MCTCR_COD_GUEST_ID 20
+#define ZR36057_MCTCR_COD_GUEST_REG16
 
 /* MPEG Code Memory Pointer Register */
-#define ZR36057_MCMPR  0x038
+#define ZR36057_MCMPR  0x038
 
 /* Interrupt Status Register */
-#define ZR360

[PATCH v3 1/2] media: zoran: add spaces around '<<'

2021-04-10 Thread Mitali Borkar
Signed-off-by: Mitali Borkar 
---
Changes from v2:- No changes. 
Changes from v1:- NO changes.

 drivers/staging/media/zoran/zr36057.h | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/media/zoran/zr36057.h 
b/drivers/staging/media/zoran/zr36057.h
index 71b651add35a..a2a75fd9f535 100644
--- a/drivers/staging/media/zoran/zr36057.h
+++ b/drivers/staging/media/zoran/zr36057.h
@@ -30,13 +30,13 @@
 #define ZR36057_VFESPFR_HOR_DCM  14
 #define ZR36057_VFESPFR_VER_DCM  8
 #define ZR36057_VFESPFR_DISP_MODE6
-#define ZR36057_VFESPFR_YUV422  (0<<3)
-#define ZR36057_VFESPFR_RGB888  (1<<3)
-#define ZR36057_VFESPFR_RGB565  (2<<3)
-#define ZR36057_VFESPFR_RGB555  (3<<3)
-#define ZR36057_VFESPFR_ERR_DIF  (1<<2)
-#define ZR36057_VFESPFR_PACK24  (1<<1)
-#define ZR36057_VFESPFR_LITTLE_ENDIAN(1<<0)
+#define ZR36057_VFESPFR_YUV422  (0 << 3)
+#define ZR36057_VFESPFR_RGB888  (1 << 3)
+#define ZR36057_VFESPFR_RGB565  (2 << 3)
+#define ZR36057_VFESPFR_RGB555  (3 << 3)
+#define ZR36057_VFESPFR_ERR_DIF  (1 << 2)
+#define ZR36057_VFESPFR_PACK24  (1 << 1)
+#define ZR36057_VFESPFR_LITTLE_ENDIAN(1 << 0)
 
 #define ZR36057_VDTR0x00c  /* Video Display "Top" Register */
 
-- 
2.30.2



[PATCH v3 0/2] staging: media: zoran: aligned the code.

2021-04-10 Thread Mitali Borkar
This patch fix the alignment of code in proper manner

Changes from v2:- Aligned the code using tabs.
Changes from v1:- Aligned the code using tabs and readjusted the
comments line.

Mitali Borkar (2):
  media: zoran: add spaces around '<<'
  staging: media: zoran: align code appropriately

 drivers/staging/media/zoran/zr36057.h | 108 +-
 1 file changed, 54 insertions(+), 54 deletions(-)

-- 
2.30.2



[PATCH v4] staging: rtl8192e: fixed pointer error by adding '*'

2021-04-10 Thread Mitali Borkar
Fixed pointer error by adding '*' to the function.

Signed-off-by: Mitali Borkar 
Reported-by: Julia Lawall 
---

Changes from v3:- added reported by tag in proper manner.
Changes from v2:- changed the patch nody to describe changes.
Changes from v1:- added pointer to the function.

 drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 4457c1acfbf6..78b5b4eaec5f 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -327,7 +327,7 @@ bool GetTs(struct rtllib_device *ieee, struct 
ts_common_info **ppTS,
}
 
*ppTS = SearchAdmitTRStream(ieee, Addr, UP, TxRxSelect);
-   if (ppTS)
+   if (*ppTS)
return true;
 
if (!bAddNewTs) {
-- 
2.30.2



[PATCH v3] staging: rtl8192e: fixed pointer error by adding '*'

2021-04-10 Thread Mitali Borkar
Fixed pointer error by adding '*' to the function.
Reported by Julia.

Signed-off-by: Mitali Borkar 
---
Changes from v2:- modified patch body but writing commit message
clearly.
Changes from v1:- added pointer to the function.

 drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 4457c1acfbf6..78b5b4eaec5f 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -327,7 +327,7 @@ bool GetTs(struct rtllib_device *ieee, struct 
ts_common_info **ppTS,
}
 
*ppTS = SearchAdmitTRStream(ieee, Addr, UP, TxRxSelect);
-   if (ppTS)
+   if (*ppTS)
return true;
 
if (!bAddNewTs) {
-- 
2.30.2



Re: [PATCH v2] staging: rtl8192e: fixed pointer error by adding '*'

2021-04-10 Thread Mitali Borkar
On Sat, Apr 10, 2021 at 03:14:24PM +0200, Greg KH wrote:
> On Sat, Apr 10, 2021 at 06:30:38PM +0530, Mitali Borkar wrote:
> > Fixed Comparison to NULL can be written as '!...' by replacing it with
> > simpler form i.e. boolean expression. This makes code more readable
> > alternative.
> > Reported by checkpatch.
> 
> Checkpatch did not report this specific problem, Julia did :)
> 
> And this changelog text does not reflect the commit you made here.
> 
Making the changes now.

> > 
> > Signed-off-by: Mitali Borkar 
> 
> We need a "Reported-by:" line here to reflect that someone reported the
> problem as well.
>
I am resending this as patch v3. I have to add reprted by Julia, right?

> Ideally it will have a "Fixes:" tag also, but I can add that if you
> don't know how to do that just yet.
> 
> thanks,
> 
> greg k-h


Re: [Outreachy kernel] [PATCH v2 2/2] staging: media: zoran: remove and add comments; align code

2021-04-10 Thread Mitali Borkar
On Sat, Apr 10, 2021 at 01:56:24PM +0200, Julia Lawall wrote:
> 
> 
> On Sat, 10 Apr 2021, Mitali Borkar wrote:
> 
> > On Fri, Apr 09, 2021 at 10:12:12PM +0200, Julia Lawall wrote:
> > >
> > >
> > > On Sat, 10 Apr 2021, Mitali Borkar wrote:
> > >
> > > > Removed comments from the same line and added them to new line above the
> > > > blocks, aligned everything properly by using tabs to make code neater
> > > > and improve readability.
> > > >
> > > > Signed-off-by: Mitali Borkar 
> > > > ---
> > > >  drivers/staging/media/zoran/zr36057.h | 293 ++
> > > >  1 file changed, 162 insertions(+), 131 deletions(-)
> > > >
> > > > diff --git a/drivers/staging/media/zoran/zr36057.h 
> > > > b/drivers/staging/media/zoran/zr36057.h
> > > > index 93075459f910..198d344a8879 100644
> > > > --- a/drivers/staging/media/zoran/zr36057.h
> > > > +++ b/drivers/staging/media/zoran/zr36057.h
> > > > @@ -12,145 +12,176 @@
> > > >
> > > >  /* Zoran ZR36057 registers */
> > > >
> > > > -#define ZR36057_VFEHCR  0x000  /* Video Front End, Horizontal 
> > > > Configuration Register */
> > > > -#define ZR36057_VFEHCR_HS_POL BIT(30)
> > > > -#define ZR36057_VFEHCR_H_START   10
> > > > +/* Video Front End, Horizontal Configuration Register */
> > > > +#define ZR36057_VFEHCR 0x000
> > > > +#define ZR36057_VFEHCR_HS_POL  BIT(30)
> > >
> > > It looks like the alignment didn't work out here?  Check that the use of
> > > tabs is the same as on the nearby lines.
> > >
> > Do I need to align BIT(30), 10, 0x000 and rest in same column or should I
> > align them separately?
> 
> If there are a bunch of #defines with no blank line between them and
> similar names (these all start with ZR36057_VFEHCR), then it can be nice
> to line them all up.
> 
> >
> > > > +#define ZR36057_VFEHCR_H_START 10
> > > >  #define ZR36057_VFEHCR_H_END   0
> > > >  #define ZR36057_VFEHCR_HMASK   0x3ff
> > > >
> > > > -#define ZR36057_VFEVCR  0x004  /* Video Front End, Vertical 
> > > > Configuration Register */
> > > > -#define ZR36057_VFEVCR_VS_POL BIT(30)
> > > > -#define ZR36057_VFEVCR_V_START   10
> > > > +/* Video Front End, Vertical Configuration Register */
> > > > +#define ZR36057_VFEVCR 0x004
> > > > +#define ZR36057_VFEVCR_VS_POL  BIT(30)
> > > > +#define ZR36057_VFEVCR_V_START 10
> > > >  #define ZR36057_VFEVCR_V_END   0
> > > >  #define ZR36057_VFEVCR_VMASK   0x3ff
> > > >
> > > > -#define ZR36057_VFESPFR 0x008  /* Video Front End, Scaler and 
> > > > Pixel Format Register */
> > > > -#define ZR36057_VFESPFR_EXT_FLBIT(26)
> > > > -#define ZR36057_VFESPFR_TOP_FIELD BIT(25)
> > > > -#define ZR36057_VFESPFR_VCLK_POL  BIT(24)
> > > > -#define ZR36057_VFESPFR_H_FILTER 21
> > > > -#define ZR36057_VFESPFR_HOR_DCM  14
> > > > -#define ZR36057_VFESPFR_VER_DCM  8
> > > > -#define ZR36057_VFESPFR_DISP_MODE6
> > > > -#define ZR36057_VFESPFR_YUV422  (0 << 3)
> > > > -#define ZR36057_VFESPFR_RGB888  BIT(3)
> > > > -#define ZR36057_VFESPFR_RGB565  (2 << 3)
> > > > -#define ZR36057_VFESPFR_RGB555  (3 << 3)
> > > > -#define ZR36057_VFESPFR_ERR_DIF  BIT(2)
> > > > -#define ZR36057_VFESPFR_PACK24  BIT(1)
> > > > -#define ZR36057_VFESPFR_LITTLE_ENDIANBIT(0)
> > > > -
> > > > -#define ZR36057_VDTR0x00c  /* Video Display "Top" Register 
> > > > */
> > > > -
> > > > -#define ZR36057_VDBR0x010  /* Video Display "Bottom" 
> > > > Register */
> > > > -
> > > > -#define ZR36057_VSSFGR  0x014  /* Video Stride, Status, and 
> > > > Frame Grab Register */
> > > > -#define ZR36057_VSSFGR_DISP_STRIDE   16
> > > > -#define ZR36057_VSSFGR_VID_OVFBIT(8)
> > > > -#define ZR36057_VSSFGR_SNAP_SHOT  BIT(1)
> > > > -#define ZR36057_VSSFGR_F

[PATCH v2] staging: rtl8192e: fixed pointer error by adding '*'

2021-04-10 Thread Mitali Borkar
Fixed Comparison to NULL can be written as '!...' by replacing it with
simpler form i.e. boolean expression. This makes code more readable
alternative.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
Changes from v1:- added pointer to the function, which was missed during
fixing v1.

 drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 4457c1acfbf6..78b5b4eaec5f 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -327,7 +327,7 @@ bool GetTs(struct rtllib_device *ieee, struct 
ts_common_info **ppTS,
}
 
*ppTS = SearchAdmitTRStream(ieee, Addr, UP, TxRxSelect);
-   if (ppTS)
+   if (*ppTS)
return true;
 
if (!bAddNewTs) {
-- 
2.30.2



Re: [Outreachy kernel] [PATCH] staging: rtl8192e: replace comparison to NULL by bool

2021-04-10 Thread Mitali Borkar
On Sat, Apr 10, 2021 at 02:10:38PM +0200, Greg KH wrote:
> On Sat, Apr 10, 2021 at 02:08:30PM +0200, Julia Lawall wrote:
> > 
> > 
> > On Sat, 10 Apr 2021, Mitali Borkar wrote:
> > 
> > > Fixed Comparison to NULL can be written as '!...' by replacing it with
> > > simpler form i.e boolean expression. This makes code more readable 
> > > alternative.
> > > Reported by checkpatch.
> > >
> > > Signed-off-by: Mitali Borkar 
> > > ---
> > >  drivers/staging/rtl8192e/rtl819x_TSProc.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
> > > b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > index 65eac33aaa5b..476875125e87 100644
> > > --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
> > > @@ -269,12 +269,12 @@ static void MakeTSEntry(struct ts_common_info 
> > > *pTsCommonInfo, u8 *Addr,
> > >  {
> > >   u8  count;
> > >
> > > - if (pTsCommonInfo == NULL)
> > > + if (!pTsCommonInfo)
> > >   return;
> > >
> > >   memcpy(pTsCommonInfo->Addr, Addr, 6);
> > >
> > > - if (pTSPEC != NULL)
> > > + if (pTSPEC)
> > >   memcpy((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC,
> > >  sizeof(union tspec_body));
> > >
> > > @@ -328,7 +328,7 @@ bool GetTs(struct rtllib_device *ieee, struct 
> > > ts_common_info **ppTS,
> > >   }
> > >
> > >   *ppTS = SearchAdmitTRStream(ieee, Addr, UP, TxRxSelect);
> > > - if (*ppTS != NULL)
> > > + if (ppTS)
> > 
> > You lost a * here.
> 
> Ugh, good catch.
> 
> Mitali, can you send me a fix-up patch for this, or do you want me to
> drop your original patch from my tree?
>
Yes Sir, I am making corrections right now in this patch. Will send the
fix up patch in an hour.


> thanks,
> 
> greg k-h


Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis

2021-04-09 Thread Mitali Borkar
On Fri, Apr 09, 2021 at 07:07:09PM -0700, Joe Perches wrote:
> On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> > Matched the alignment with open parenthesis to meet linux kernel coding
> > style.
> > Reported by checkpatch.
> []
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
> > b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> []
> > @@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
> >     (net->ralink_cap_exist))
> >     retValue = true;
> >     else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
> > -   !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> > +!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
> >     !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
> >     (net->broadcom_cap_exist))
> 
> checkpatch is a stupid script.
> Look further at the code not just at what checkpatch reports.
> Align all the contination lines, not just the first one.
>
Sir, I have aligned them in last patch of this patchset.

> It might be sensible to add a generic function like
> 
> static inline bool ether_oui_equal(const u8 *addr, const u8 *oui)
> {
>   return addr[0] == oui[0] && addr[1] == oui[1] && addr[2] == oui[2];
> } 
> 
> to include/linux/etherdevice.h
> 
> (Maybe use & instead of && if it's speed sensitive)
> 
> so this would read
> 
>   else if (ether_oui_equal(net->bssid, UNKNOWN_BORADCOM) ||
>ether_oui_equal(net->bssid, 
> LINKSYSWRT330_LINKSYSWRT300_BROADCOM) ||
>ether_oui_equal(net->bssid, 
> LINKSYSWRT350_LINKSYSWRT150_BROADCOM) ||
>net->broacom_cap_exist)
> 
> and it'd also be good to correct the typo of UNKNOWN_BORADCOM globally.
>
I will look into this.

> > @@ -654,13 +654,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
> >     pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
> >  
> > 
> >     memset((void *)(&(pHTInfo->SelfHTCap)), 0,
> > -   sizeof(pHTInfo->SelfHTCap));
> > +  sizeof(pHTInfo->SelfHTCap));
> 
> Doesn't need casts or parentheses.
> 
>   memset(>SelfHTCap, 0, sizeof(pHTInfo->SelfHCap));
> 
Ok Sir, i am on it.

> >     memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
> > -   sizeof(pHTInfo->SelfHTInfo));
> > +  sizeof(pHTInfo->SelfHTInfo));
> 
> etc...
> 
> > @@ -815,7 +815,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)
> >     HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet,
> >     ieee->dot11HTOperationalRateSet);
> >     ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
> > -  ieee->dot11HTOperationalRateSet,
> > +  
> > ieee->dot11HTOperationalRateSet,
> >    MCS_FILTER_ALL);
> 
> multi line statement alignment etc...
>
Sir, I have aligned this patch 6/6
> 


[PATCH 3/3] staging: rtl8192e: remove unncessary parentheses

2021-04-09 Thread Mitali Borkar
Removed unnecessary parentheses because they must be used only when it
is necessary or they improve readability.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 89d0e9ec188d..b1fa8e9a4f28 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -287,7 +287,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
u8  EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
 
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-   pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
+   pCapELE = (struct ht_capab_ele *)[4];
*len = 30 + 2;
} else {
pCapELE = (struct ht_capab_ele *)posHTCap;
@@ -646,13 +646,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
-   memset((void *)(&(pHTInfo->SelfHTCap)), 0,
+   memset((void *)(>SelfHTCap), 0,
   sizeof(pHTInfo->SelfHTCap));
-   memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
+   memset((void *)(>SelfHTInfo), 0,
   sizeof(pHTInfo->SelfHTInfo));
-   memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
+   memset((void *)(>PeerHTCapBuf), 0,
   sizeof(pHTInfo->PeerHTCapBuf));
-   memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
+   memset((void *)(>PeerHTInfoBuf), 0,
   sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
@@ -668,7 +668,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->IOTRaFunc = 0;
 
{
-   u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]);
+   u8 *RegHTSuppRateSets = >RegHTSuppRateSet[0];
 
RegHTSuppRateSets[0] = 0xFF;
RegHTSuppRateSets[1] = 0xFF;
-- 
2.30.2



[PATCH 0/3] staging: rtl8192e: cleanup patchset for style issues

2021-04-09 Thread Mitali Borkar
These patches fix the cleanup style issues identified by checkpatch

Mitali Borkar (3):
  staging: rtl8192e: replace comparison to NULL by boolean expression
  staging: rtl8192e: remove unnecessary ftrace-like logging
  staging: rtl8192e: remove unncessary parentheses

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 26 ++-
 1 file changed, 11 insertions(+), 15 deletions(-)

-- 
2.30.2



[PATCH 2/3] staging: rtl8192e: remove unnecessary ftrace-like logging

2021-04-09 Thread Mitali Borkar
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0b1e92f17805..89d0e9ec188d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -630,7 +630,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
 
pHTInfo->bCurBW40MHz = false;
@@ -698,7 +697,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8  bIOTAction = 0;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
/* unmark bEnableHT flag here is the same reason why unmarked in
 * function rtllib_softmac_new_net. WB 2008.09.10
 */
@@ -832,8 +830,6 @@ static void HTSetConnectBwModeCallback(struct rtllib_device 
*ieee)
 {
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
-   netdev_vdbg(ieee->dev, "%s()\n", __func__);
-
if (pHTInfo->bCurBW40MHz) {
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev,
-- 
2.30.2



[PATCH 1/3] staging: rtl8192e: replace comparison to NULL by boolean

2021-04-09 Thread Mitali Borkar
Replaced comparison to NULL by boolean expressions
(here used boolean negations). This improves readability of code.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 65202dd53447..0b1e92f17805 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -276,7 +276,7 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_capab_ele *pCapELE = NULL;
 
-   if ((posHTCap == NULL) || (pHT == NULL)) {
+   if ((!posHTCap) || (!pHT)) {
netdev_warn(ieee->dev,
"%s(): posHTCap and pHTInfo are null\n", __func__);
return;
@@ -357,7 +357,7 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 
*posHTInfo,
struct rt_hi_throughput *pHT = ieee->pHTInfo;
struct ht_info_ele *pHTInfoEle = (struct ht_info_ele *)posHTInfo;
 
-   if ((posHTInfo == NULL) || (pHTInfoEle == NULL)) {
+   if ((!posHTInfo) || (!pHTInfoEle)) {
netdev_warn(ieee->dev,
"%s(): posHTInfo and pHTInfoEle are null\n",
__func__);
@@ -397,7 +397,7 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 
*posHTInfo,
 void HTConstructRT2RTAggElement(struct rtllib_device *ieee, u8 *posRT2RTAgg,
u8 *len)
 {
-   if (posRT2RTAgg == NULL) {
+   if (!posRT2RTAgg) {
netdev_warn(ieee->dev, "%s(): posRT2RTAgg is null\n", __func__);
return;
}
@@ -420,7 +420,7 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 
*pOperateMCS)
 {
u8 i;
 
-   if (pOperateMCS == NULL) {
+   if (!pOperateMCS) {
netdev_warn(ieee->dev, "%s(): pOperateMCS is null\n", __func__);
return false;
}
@@ -453,7 +453,7 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 
*pMCSRateSet,
u8  mcsRate = 0;
u8  availableMcsRate[16];
 
-   if (pMCSRateSet == NULL || pMCSFilter == NULL) {
+   if (!pMCSRateSet || !pMCSFilter) {
netdev_warn(ieee->dev,
"%s(): pMCSRateSet and pMCSFilter are null\n",
__func__);
-- 
2.30.2



[PATCH 6/6] staging: rtl8192e: align statements properly

2021-04-09 Thread Mitali Borkar
Aligned the statements properly in one line to make code neater and to
improve readability.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 2b9e275f42bb..65202dd53447 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -155,8 +155,8 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
retValue = true;
else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
 !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
-   !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
-   (net->broadcom_cap_exist))
+!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
+(net->broadcom_cap_exist))
retValue = true;
else if (net->bssht.bd_rt2rt_aggregation)
retValue = true;
@@ -809,7 +809,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)
ieee->dot11HTOperationalRateSet);
ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
   
ieee->dot11HTOperationalRateSet,
-  MCS_FILTER_ALL);
+  MCS_FILTER_ALL);
ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
 
} else {
-- 
2.30.2



[PATCH 5/6] staging: rtl8192e: removed multiple blank lines

2021-04-09 Thread Mitali Borkar
Removed multiple blank lines to make code better and neater.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 12f31ba9aa13..2b9e275f42bb 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -214,7 +214,6 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device 
*ieee, u8 *PeerMacAddr)
return 0;
 }
 
-
 static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
 {
return false;
@@ -236,7 +235,6 @@ static u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
 {
u8  retValue = 0;
 
-
if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM)
retValue = 1;
 
@@ -315,7 +313,6 @@ void HTConstructCapabilityElement(struct rtllib_device 
*ieee, u8 *posHTCap,
pCapELE->PSMP = 0;
pCapELE->LSigTxopProtect = 0;
 
-
netdev_dbg(ieee->dev,
   "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n",
   pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
@@ -390,7 +387,6 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 
*posHTInfo,
 
memset(pHTInfoEle->BasicMSC, 0, 16);
 
-
*len = 22 + 2;
 
} else {
@@ -541,7 +537,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
else
pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
 
-
 #ifdef VERBOSE_DEBUG
print_hex_dump_bytes("%s: ", __func__, DUMP_PREFIX_NONE,
 pPeerHTCap, sizeof(struct ht_capab_ele));
@@ -562,7 +557,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
   ((pPeerHTCap->DssCCk == 1) ? true :
   false) : false);
 
-
pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support;
 
nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize == 0) ? 3839 : 7935;
@@ -752,7 +746,6 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device 
*ieee,
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_ALL_2SS;
 
-
bIOTAction = HTIOTActIsDisableEDCATurbo(ieee, pNetwork->bssid);
if (bIOTAction)
pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_EDCA_TURBO;
-- 
2.30.2



[PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis

2021-04-09 Thread Mitali Borkar
Matched the alignment with open parenthesis to meet linux kernel coding
style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 20 ++--
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 18 +-
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0ded86da1562..12f31ba9aa13 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
(net->ralink_cap_exist))
retValue = true;
else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) ||
-   !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
+!memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||
!memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
(net->broadcom_cap_exist))
retValue = true;
@@ -547,7 +547,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 pPeerHTCap, sizeof(struct ht_capab_ele));
 #endif
HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth),
- (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
+  (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1) ?
 true : false);
 
@@ -574,9 +574,9 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 
pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable;
if (ieee->rtllib_ap_sec_type &&
-  (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
+   (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
if ((pHTInfo->IOTPeer == HT_IOT_PEER_ATHEROS) ||
-   (pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
+   (pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
pHTInfo->bCurrentAMPDUEnable = false;
}
 
@@ -626,7 +626,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
else
pMcsFilter = MCS_FILTER_ALL;
ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
-  ieee->dot11HTOperationalRateSet, pMcsFilter);
+  
ieee->dot11HTOperationalRateSet, pMcsFilter);
ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
 
pHTInfo->CurrentOpMode = pPeerHTInfo->OptMode;
@@ -654,13 +654,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 
memset((void *)(&(pHTInfo->SelfHTCap)), 0,
-   sizeof(pHTInfo->SelfHTCap));
+  sizeof(pHTInfo->SelfHTCap));
memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
-   sizeof(pHTInfo->SelfHTInfo));
+  sizeof(pHTInfo->SelfHTInfo));
memset((void *)(&(pHTInfo->PeerHTCapBuf)), 0,
-   sizeof(pHTInfo->PeerHTCapBuf));
+  sizeof(pHTInfo->PeerHTCapBuf));
memset((void *)(&(pHTInfo->PeerHTInfoBuf)), 0,
-   sizeof(pHTInfo->PeerHTInfoBuf));
+  sizeof(pHTInfo->PeerHTInfoBuf));
 
pHTInfo->bSwBwInProgress = false;
 
@@ -815,7 +815,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)
HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet,
ieee->dot11HTOperationalRateSet);
ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee,
-  ieee->dot11HTOperationalRateSet,
+  
ieee->dot11HTOperationalRateSet,
   MCS_FILTER_ALL);
ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
 
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 1b994a57633f..65eac33aaa5b 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -34,7 +34,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
while (!list_empty(>rx_pending_pkt_list)) {
pReorderEntry = (struct rx_reorder_entry *)

list_entry(pRxTs->rx_pending_pkt_list.prev,
-   struct rx_reorder_entry, List);
+  struct rx_reorder_entry, 
List);
if (index == 0)

[PATCH 3/6] staging: rtl8192e: remove unncessary blank line after brace

2021-04-09 Thread Mitali Borkar
Removed an exra blank line after close brace '{' as it was not
necessary.
Reported by checkpatch

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index e188e9e6b11e..0ded86da1562 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -492,7 +492,6 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 
*pMCSRateSet,
 static u8 HTFilterMCSRate(struct rtllib_device *ieee, u8 *pSupportMCS,
  u8 *pOperateMCS)
 {
-
u8 i;
 
for (i = 0; i <= 15; i++)
@@ -686,7 +685,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)
 
 void HTInitializeBssDesc(struct bss_ht *pBssHT)
 {
-
pBssHT->bd_support_ht = false;
memset(pBssHT->bd_ht_cap_buf, 0, sizeof(pBssHT->bd_ht_cap_buf));
pBssHT->bd_ht_cap_len = 0;
-- 
2.30.2



[PATCH 2/6] staging: rtl8192e: remove unnecessary blank line before brace

2021-04-09 Thread Mitali Borkar
Removed an extra blank line before close brace as it was not necessary.
Reported by checkpatch.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 --
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 7ed2ed9e63f6..e188e9e6b11e 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -263,7 +263,6 @@ static void HTIOTActDetermineRaFunc(struct rtllib_device 
*ieee, bool bPeerRx2ss)
 
if (pHTInfo->IOTAction & HT_IOT_ACT_AMSDU_ENABLE)
pHTInfo->IOTRaFunc |= HT_IOT_RAFUNC_TX_AMSDU;
-
 }
 
 void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo)
@@ -445,7 +444,6 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 
*pOperateMCS)
break;
default:
break;
-
}
 
return true;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index afcdb4b6a18e..1b994a57633f 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -193,7 +193,6 @@ void TSInitialize(struct rtllib_device *ieee)
break;
pRxReorderEntry = >RxReorderEntry[count + 1];
}
-
 }
 
 static void AdmitTS(struct rtllib_device *ieee,
@@ -254,7 +253,6 @@ static struct ts_common_info *SearchAdmitTRStream(struct 
rtllib_device *ieee,
pRet->TSpec.f.TSInfo.field.ucTSID == TID &&
pRet->TSpec.f.TSInfo.field.ucDirection == dir)
break;
-
}
if (>List  != psearch_list)
break;
-- 
2.30.2



[PATCH 1/6] staging: rtl8192e: add spaces around binary operators

2021-04-09 Thread Mitali Borkar
Added spaces around binary operators like '+', '*', '|', '-', '&',
to improve readability and to meet linux kernel coding style.

Signed-off-by: Mitali Borkar 
---
 drivers/staging/rtl8192e/rtl819x_HTProc.c | 8 
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c 
b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index cc761d965b1d..7ed2ed9e63f6 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -138,7 +138,7 @@ u16  TxCountToDataRate(struct rtllib_device *ieee, u8 
nDataRate)
is40MHz = 1;
isShortGI = 1;
}
-   return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate&0xf];
+   return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate & 0xf];
 }
 
 bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
@@ -479,8 +479,8 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 
*pMCSRateSet,
if (availableMcsRate[i] != 0) {
bitMap = availableMcsRate[i];
for (j = 0; j < 8; j++) {
-   if ((bitMap%2) != 0) {
-   if (HTMcsToDataRate(ieee, (8*i+j)) >
+   if ((bitMap % 2) != 0) {
+   if (HTMcsToDataRate(ieee, (8 * i + j)) >
HTMcsToDataRate(ieee, mcsRate))
mcsRate = 8 * i + j;
}
@@ -577,7 +577,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 
pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable;
if (ieee->rtllib_ap_sec_type &&
-  (ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP))) {
+  (ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
if ((pHTInfo->IOTPeer == HT_IOT_PEER_ATHEROS) ||
(pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN))
pHTInfo->bCurrentAMPDUEnable = false;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c 
b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index c294a6543e12..afcdb4b6a18e 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -104,7 +104,7 @@ static void ResetTsCommonInfo(struct ts_common_info 
*pTsCommonInfo)
 {
eth_zero_addr(pTsCommonInfo->Addr);
memset(>TSpec, 0, sizeof(union tspec_body));
-   memset(>TClass, 0, sizeof(union qos_tclas)*TCLAS_NUM);
+   memset(>TClass, 0, sizeof(union qos_tclas) * TCLAS_NUM);
pTsCommonInfo->TClasProc = 0;
pTsCommonInfo->TClasNum = 0;
 }
@@ -189,9 +189,9 @@ void TSInitialize(struct rtllib_device *ieee)
for (count = 0; count < REORDER_ENTRY_NUM; count++) {
list_add_tail(>List,
  >RxReorder_Unused_List);
-   if (count == (REORDER_ENTRY_NUM-1))
+   if (count == (REORDER_ENTRY_NUM - 1))
break;
-   pRxReorderEntry = >RxReorderEntry[count+1];
+   pRxReorderEntry = >RxReorderEntry[count + 1];
}
 
 }
@@ -518,7 +518,7 @@ void TsStartAddBaProcess(struct rtllib_device *ieee, struct 
tx_ts_record *pTxTS)
  msecs_to_jiffies(TS_ADDBA_DELAY));
} else {
netdev_dbg(ieee->dev, "Immediately Start ADDBA\n");
-   mod_timer(>TsAddBaTimer, jiffies+10);
+   mod_timer(>TsAddBaTimer, jiffies + 10);
}
} else
netdev_dbg(ieee->dev, "BA timer is already added\n");
-- 
2.30.2



[PATCH 0/6] staging: rtl8192e: cleanup patchset for style issues

2021-04-09 Thread Mitali Borkar
This patches fix the cleanup style issues.

Mitali Borkar (6):
  staging: rtl8192e: add spaces around binary operators
  staging: rtl8192e: remove unnecessary blank line before brace
  staging: rtl8192e: remove unncessary blank line after brace
  staging: rtl8192e: matched alignment with open parenthesis
  staging: rtl8192e: removed multiple blank lines
  staging: rtl8192e: align statements properly

 drivers/staging/rtl8192e/rtl819x_HTProc.c | 43 +--
 drivers/staging/rtl8192e/rtl819x_TSProc.c | 28 +++
 2 files changed, 29 insertions(+), 42 deletions(-)

-- 
2.30.2



  1   2   >