Re: [PATCH] staging: andriod: ashmem: Declared file operation with const keyword

2021-03-13 Thread B K Karthik
On Sat, Mar 13, 2021 at 10:57 PM namratajanawade
 wrote:
>
> Warning found by checkpatch.pl script.

That doesn't tell what you did or why you did it. Please write an
appropriate commit description and resend the patch.

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


[PATCH] staging: greybus: audio_helper.c: Replace strlcpy() with strscpy()

2021-01-09 Thread B K Karthik
In gbaudio_remove_controls() , replace the usage of strlcpy() with
strscpy() because strlcpy() only limits the *destination*
size, and the source is always read fully.

https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=v6a6g1ouzcprm...@mail.gmail.com/
was quoted by checkpatch while showing this warning.

Signed-off-by: B K Karthik 
---
 drivers/staging/greybus/audio_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_helper.c 
b/drivers/staging/greybus/audio_helper.c
index 3011b8abce38..1ed4772d2771 100644
--- a/drivers/staging/greybus/audio_helper.c
+++ b/drivers/staging/greybus/audio_helper.c
@@ -166,7 +166,7 @@ static int gbaudio_remove_controls(struct snd_card *card, 
struct device *dev,
snprintf(id.name, sizeof(id.name), "%s %s", prefix,
 control->name);
else
-   strlcpy(id.name, control->name, sizeof(id.name));
+   strscpy(id.name, control->name, sizeof(id.name));
id.numid = 0;
id.iface = control->iface;
id.device = control->device;
-- 
2.17.1



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


Re: [PATCH 2/4] staging: rtl8188eu: include: fixed multiple parentheses coding style issues

2020-07-19 Thread B K Karthik
On Sun, Jul 19, 2020 at 5:26 AM Greg Kroah-Hartman
 wrote:
>
> On Sat, Jul 18, 2020 at 05:16:26AM -0400, B K Karthik wrote:
> > fixed multiple parentheses coding style issues reported by checkpatch.
> >
> > Signed-off-by: B K Karthik 
> > ---
> >  drivers/staging/rtl8188eu/include/ieee80211.h |  4 +--
> >  .../staging/rtl8188eu/include/osdep_service.h |  4 +--
> >  drivers/staging/rtl8188eu/include/wifi.h  | 34 +--
> >  3 files changed, 21 insertions(+), 21 deletions(-)
>
> You can never add warnings to the build, like this patch did.  Always
> test-build your patches at the very least...

understood, I will definitely do that.
but these warnings are (mostly) [-Wunused-value] and [-Wformat].
that should not have (?) occurred due to the usage of parentheses.

anyways, I will try to fix these up and send a v2.
sorry if i wasted your time

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


Re: [PATCH 4/4] staging: rtl8188eu: include: placed constant on the right side of the test in comparisons

2020-07-18 Thread B K Karthik
On Sat, Jul 18, 2020 at 9:17 AM Joe Perches  wrote:
>
> On Sat, 2020-07-18 at 05:18 -0400, B K Karthik wrote:
> > placed constant on the right side of the test
> > to fix warnings issued by checkpatch
> []
> > diff --git a/drivers/staging/rtl8188eu/include/wifi.h 
> > b/drivers/staging/rtl8188eu/include/wifi.h
> []
> > @@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned 
> > char *pframe)
> >
> >  static inline int IsFrameTypeCtrl(unsigned char *pframe)
> >  {
> > - if (WIFI_CTRL_TYPE == GetFrameType(pframe))
> > + if (GetFrameType(pframe) == WIFI_CTRL_TYPE)
> >   return true;
> >   else
> >   return false;
>
> Always try to improve code instead of merely shutting
> up checkpatch warnings.
>
> This function should likely be written:
>
> static inline bool IsFrameTypeCtrl(unsigned char *pframe)
> {
> return GetFrameType(pframe) == WIFI_CTRL_TYPE;
> }
>
> and given it's used only once, it might be expanded
> in that place and removed altogether.
>
> Something like:
>
> (and the memcmp below could be ether_addr_equal instead
>  but I'm too lazy to find out if the addresses are both
>  guaranteed to be __aligned(2) which is likely)

Alright, I will try to do that and send a v2 asap :)
>
> ---
>  drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 +---
>  drivers/staging/rtl8188eu/include/wifi.h| 7 ---
>  2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c 
> b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
> index 7d0135fde795..a2994f9ecbde 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
> @@ -144,10 +144,12 @@ void update_recvframe_phyinfo_88e(struct recv_frame 
> *precvframe,
>
> wlanhdr = precvframe->pkt->data;
>
> -   pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
> -   !pattrib->icv_err && !pattrib->crc_err &&
> +   pkt_info.bPacketMatchBSSID =
> +   GetFrameType(wlanhdr) != WIFI_CTRL_TYPE &&
> +   !pattrib->icv_err &&
> +   !pattrib->crc_err &&
> !memcmp(get_hdr_bssid(wlanhdr),
> -get_bssid(>mlmepriv), ETH_ALEN));
> +   get_bssid(>mlmepriv), ETH_ALEN);
>
> pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID &&
>  (!memcmp(get_da(wlanhdr),
> diff --git a/drivers/staging/rtl8188eu/include/wifi.h 
> b/drivers/staging/rtl8188eu/include/wifi.h
> index 791f287a546d..3998d5633860 100644
> --- a/drivers/staging/rtl8188eu/include/wifi.h
> +++ b/drivers/staging/rtl8188eu/include/wifi.h
> @@ -324,13 +324,6 @@ static inline unsigned char *get_hdr_bssid(unsigned char 
> *pframe)
> return sa;
>  }
>
> -static inline int IsFrameTypeCtrl(unsigned char *pframe)
> -{
> -   if (WIFI_CTRL_TYPE == GetFrameType(pframe))
> -   return true;
> -   else
> -   return false;
> -}
>  
> /*-
> Below is for the security related definition
>  
> --*/

thank you for pointing me.

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


[PATCH 4/4] staging: rtl8188eu: include: placed constant on the right side of the test in comparisons

2020-07-18 Thread B K Karthik
placed constant on the right side of the test
to fix warnings issued by checkpatch

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_mlme.h | 4 ++--
 drivers/staging/rtl8188eu/include/wifi.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 010f0c42368a..1b74b32b8a81 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -266,7 +266,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, 
int state)
 {
pmlmepriv->fw_state |= state;
/* FOR HW integration */
-   if (_FW_UNDER_SURVEY == state)
+   if (state == _FW_UNDER_SURVEY)
pmlmepriv->bScanInProcess = true;
 }
 
@@ -274,7 +274,7 @@ static inline void _clr_fwstate_(struct mlme_priv 
*pmlmepriv, int state)
 {
pmlmepriv->fw_state &= ~state;
/* FOR HW integration */
-   if (_FW_UNDER_SURVEY == state)
+   if (state == _FW_UNDER_SURVEY)
pmlmepriv->bScanInProcess = false;
 }
 
diff --git a/drivers/staging/rtl8188eu/include/wifi.h 
b/drivers/staging/rtl8188eu/include/wifi.h
index 677827900607..dcef3da21970 100644
--- a/drivers/staging/rtl8188eu/include/wifi.h
+++ b/drivers/staging/rtl8188eu/include/wifi.h
@@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char 
*pframe)
 
 static inline int IsFrameTypeCtrl(unsigned char *pframe)
 {
-   if (WIFI_CTRL_TYPE == GetFrameType(pframe))
+   if (GetFrameType(pframe) == WIFI_CTRL_TYPE)
return true;
else
return false;
-- 
2.20.1



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


[PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops

2020-07-18 Thread B K Karthik
enclosed macros starting with if inside do-while loops to
avoid possible if-else logic defects

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/odm_debug.h | 28 +++
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h 
b/drivers/staging/rtl8188eu/include/odm_debug.h
index 857c64b8d2f4..c7a928d396b0 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -76,20 +76,24 @@
 #endif
 
 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)
\
-   if (((comp) & pDM_Odm->DebugComponents) &&  \
-   (level <= pDM_Odm->DebugLevel)) {   \
-   pr_info("[ODM-8188E] ");\
-   RT_PRINTK fmt;  \
-   }
+   do {
+   if (((comp) & pDM_Odm->DebugComponents) &&  
\
+   (level <= pDM_Odm->DebugLevel)) {   
\
+   pr_info("[ODM-8188E] ");
\
+   RT_PRINTK fmt;  
\
+   }
+   } while (0)
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)  \
-   if (!(expr)) {  \
-   pr_info("Assertion failed! %s at ..\n", #expr); \
-   pr_info("  ..%s,%s,line=%d\n", __FILE__,\
-   __func__, __LINE__);\
-   RT_PRINTK fmt;  \
-   ASSERT(false);  \
-   }
+   do {
+   if (!(expr)) {  
\
+   pr_info("Assertion failed! %s at ..\n", #expr); 
\
+   pr_info("  ..%s,%s,line=%d\n", __FILE__,
\
+   __func__, __LINE__);
\
+   RT_PRINTK fmt;  
\
+   ASSERT(false);  
\
+   }
+   } while (0)
 
 void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
 
-- 
2.20.1



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


[PATCH 2/4] staging: rtl8188eu: include: fixed multiple parentheses coding style issues

2020-07-18 Thread B K Karthik
fixed multiple parentheses coding style issues reported by checkpatch.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/ieee80211.h |  4 +--
 .../staging/rtl8188eu/include/osdep_service.h |  4 +--
 drivers/staging/rtl8188eu/include/wifi.h  | 34 +--
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h 
b/drivers/staging/rtl8188eu/include/ieee80211.h
index 83218e7ec0a9..a872a86f89ab 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -646,8 +646,8 @@ struct rtw_ieee80211_channel {
"flags:0x%08x" \
 
 #define CHAN_ARG(channel) \
-   (channel)->hw_value \
-   , (channel)->flags \
+   ((channel)->hw_value \
+   , (channel)->flags)
 
 /* Parsed Information Elements */
 struct rtw_ieee802_11_elems {
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 31d897f1d21f..2245cc430981 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -76,9 +76,9 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(void 
*old_priv);
 void rtw_free_netdev(struct net_device *netdev);
 
 #define FUNC_NDEV_FMT "%s(%s)"
-#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
+#define FUNC_NDEV_ARG(ndev) (__func__, (ndev)->name)
 #define FUNC_ADPT_FMT "%s(%s)"
-#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
+#define FUNC_ADPT_ARG(adapter) (__func__, (adapter)->pnetdev->name)
 
 /* Macros for handling unaligned memory accesses */
 
diff --git a/drivers/staging/rtl8188eu/include/wifi.h 
b/drivers/staging/rtl8188eu/include/wifi.h
index 791f287a546d..677827900607 100644
--- a/drivers/staging/rtl8188eu/include/wifi.h
+++ b/drivers/staging/rtl8188eu/include/wifi.h
@@ -143,57 +143,57 @@ enum WIFI_REG_DOMAIN {
 #define _ORDER_BIT(15)
 
 #define SetToDs(pbuf)  \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
 
 #define GetToDs(pbuf)  (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
 
 #define ClearToDs(pbuf)\
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)))
 
 #define SetFrDs(pbuf)  \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
 
 #define GetFrDs(pbuf)  (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
 
 #define ClearFrDs(pbuf)\
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)))
 
 #define get_tofr_ds(pframe)((GetToDs(pframe) << 1) | GetFrDs(pframe))
 
 #define SetMFrag(pbuf) \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
 
 #define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
 
 #define ClearMFrag(pbuf)   \
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
 
 #define SetRetry(pbuf) \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_))
 
 #define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
 
 #define ClearRetry(pbuf)   \
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)))
 
 #define SetPwrMgt(pbuf)\
-   *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
 
 #define GetPwrMgt(pbuf)(((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) 
!= 0)
 
 #define ClearPwrMgt(pbuf)  \
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)))
 
 #define SetMData(pbuf) \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
 
 #define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
 
 #define ClearMData(pbuf)   \
-   *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
+   (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)))
 
 #define SetPrivacy(pbuf)   \
-   *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
+   (*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
 
 #define GetPrivacy(pbuf)   \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
@@ -228,18 +228,18 @@ enum WIFI_REG_DOMAIN {
} while (0)
 
 #define SetDuration(pbuf, dur) \
-   *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0x & (dur))
+   (*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0x & (dur)))
 
 #define SetPriority(pbuf, tid) \
-   *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
+   

[PATCH 1/4] staging: rtl8188eu: include: fixed multiple blank space coding style issues

2020-07-18 Thread B K Karthik
fixed multiple blank space coding style issues
reported by checkpatch

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/hal_com.h   |  2 +-
 drivers/staging/rtl8188eu/include/osdep_service.h |  2 +-
 drivers/staging/rtl8188eu/include/rtl8188e_hal.h  |  2 +-
 drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 12 ++--
 drivers/staging/rtl8188eu/include/rtw_cmd.h   |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/hal_com.h 
b/drivers/staging/rtl8188eu/include/hal_com.h
index 542e6e93ff8e..da772a6ebad3 100644
--- a/drivers/staging/rtl8188eu/include/hal_com.h
+++ b/drivers/staging/rtl8188eu/include/hal_com.h
@@ -81,7 +81,7 @@
 #defineRATE_ALL_OFDM_AG(RATR_6M | RATR_9M | RATR_12M | 
RATR_18M | \
 RATR_24M | RATR_36M | RATR_48M | RATR_54M)
 #defineRATE_ALL_OFDM_1SS   (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 |
\
-RATR_MCS3 | RATR_MCS4 | RATR_MCS5|RATR_MCS6 | \
+RATR_MCS3 | RATR_MCS4 | RATR_MCS5 | RATR_MCS6 
| \
 RATR_MCS7)
 #defineRATE_ALL_OFDM_2SS   (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
 RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 0d3e4a6e7e85..31d897f1d21f 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -82,7 +82,7 @@ void rtw_free_netdev(struct net_device *netdev);
 
 /* Macros for handling unaligned memory accesses */
 
-#define RTW_GET_BE24(a) u32)(a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
+#define RTW_GET_BE24(a) u32)(a)[0]) << 16) | (((u32)(a)[1]) << 8) | \
 ((u32)(a)[2]))
 
 void rtw_buf_free(u8 **buf, u32 *buf_len);
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h
index ba7c98712934..3be28a6dbd49 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h
@@ -104,7 +104,7 @@ enum usb_rx_agg_mode {
(WMM_NORMAL_TX_TOTAL_PAGE_NUMBER + 1) /* 0xA9 */
 
 /* Chip specific */
-#define CHIP_BONDING_IDENTIFIER(_value)(((_value)>>22)&0x3)
+#define CHIP_BONDING_IDENTIFIER(_value)(((_value) >> 22) & 0x3)
 #define CHIP_BONDING_92C_1T2R  0x1
 #define CHIP_BONDING_88C_USB_MCARD 0x2
 #define CHIP_BONDING_88C_USB_HP0x1
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
index 49884cceb349..1472c597cc53 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
@@ -30,11 +30,11 @@
 #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) \
SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value)
 #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 0, 8, __Value)
 #define SET_EARLYMODE_LEN3(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 8, 12, __Value)
 #define SET_EARLYMODE_LEN4(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 20, 12, __Value)
 
 /*  */
 /* defined for TX DESC Operation */
@@ -100,7 +100,7 @@ enum TXDESC_SC {
 
 #define txdesc_set_ccx_sw_88e(txdesc, value) \
do { \
-   ((struct txdesc_88e *)(txdesc))->sw1 = (((value)>>8) & 0x0f); \
+   ((struct txdesc_88e *)(txdesc))->sw1 = (((value) >> 8) & 0x0f); 
\
((struct txdesc_88e *)(txdesc))->sw0 = ((value) & 0xff); \
} while (0)
 
@@ -138,9 +138,9 @@ struct txrpt_ccx_88e {
u8 sw0;
 };
 
-#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
+#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 << 
8))
 #define txrpt_ccx_qtime_88e(txrpt_ccx) \
-   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
+   ((txrpt_ccx)->ccx_qtime0 + ((txrpt_ccx)->ccx_qtime1 << 8))
 
 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
   u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h 
b/drivers/staging/rtl8188eu/include/rtw_cmd.h
index fa5e212fc9e0..002a797c6d0a 100644
--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
+++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
@@ -115,7 +115,7 @@ struct  setopmode_parm {
  */
 
 #define RTW_SSID_SCAN_AMOUNT

[PATCH v5] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-17 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from
void [noderef] __user * to unsigned int __force *
and a reverse cast in argument from
unsigned int * to  unsigned int __user * .

Signed-off-by: B K Karthik 
Reviewed-by: Ian Abbott 
---
v1 -> v2:
- Added a reverse cast in argument
v2 -> v3:
- Changed commit description
v3 -> v4:
- Added versioning info in commit description
v4 -> v5:
- Move versioning info below the divider line

 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 3f70e5dfac39..9cdc1e8a022d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
cmd->scan_end_arg = v32.scan_end_arg;
cmd->stop_src = v32.stop_src;
cmd->stop_arg = v32.stop_arg;
-   cmd->chanlist = compat_ptr(v32.chanlist);
+   cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist);
cmd->chanlist_len = v32.chanlist_len;
cmd->data = compat_ptr(v32.data);
cmd->data_len = v32.data_len;
@@ -2983,7 +2983,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct 
__user *cmd32,
v32.stop_src = cmd->stop_src;
v32.stop_arg = cmd->stop_arg;
/* Assume chanlist pointer is unchanged. */
-   v32.chanlist = ptr_to_compat(cmd->chanlist);
+   v32.chanlist = ptr_to_compat((unsigned int __user *)cmd->chanlist);
v32.chanlist_len = cmd->chanlist_len;
v32.data = ptr_to_compat(cmd->data);
v32.data_len = cmd->data_len;
-- 
2.20.1



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


[PATCH v4] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from
void [noderef] __user * to unsigned int __force *
and a reverse cast in argument from
unsigned int * to  unsigned int __user * .

v1 -> v2:
- Add a reverse cast in argument
v2 -> v3:
- Change commit description as suggested by Ian Abott
v3 -> v4:
- Add versioning information in commit description

Signed-off-by: B K Karthik 
---
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 3f70e5dfac39..9cdc1e8a022d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
cmd->scan_end_arg = v32.scan_end_arg;
cmd->stop_src = v32.stop_src;
cmd->stop_arg = v32.stop_arg;
-   cmd->chanlist = compat_ptr(v32.chanlist);
+   cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist);
cmd->chanlist_len = v32.chanlist_len;
cmd->data = compat_ptr(v32.data);
cmd->data_len = v32.data_len;
@@ -2983,7 +2983,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct 
__user *cmd32,
v32.stop_src = cmd->stop_src;
v32.stop_arg = cmd->stop_arg;
/* Assume chanlist pointer is unchanged. */
-   v32.chanlist = ptr_to_compat(cmd->chanlist);
+   v32.chanlist = ptr_to_compat((unsigned int __user *)cmd->chanlist);
v32.chanlist_len = cmd->chanlist_len;
v32.data = ptr_to_compat(cmd->data);
v32.data_len = cmd->data_len;
-- 
2.20.1



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


Re: [PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
On Thu, Jul 16, 2020 at 10:25 AM Greg Kroah-Hartman
 wrote:
>
> On Thu, Jul 16, 2020 at 10:17:47AM -0400, B K Karthik wrote:
> > fixed sparse warnings by adding a cast in assignment from
> > void [noderef] __user * to unsigned int __force *
> > and a reverse cast in argument from
> > unsigned int * to  unsigned int __user * .
> >
> > Signed-off-by: B K Karthik 
> > ---
> >  drivers/staging/comedi/comedi_fops.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> What changed from previous versions?

As Ian Abbott said "Minor quibble: the reverse cast is actually from
unsigned int * to"

Hence this is a change in the commit description.

>
> That always goes below the --- line.

I did not understand this sir, can you please clarify?

thanks,

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


[PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from
void [noderef] __user * to unsigned int __force *
and a reverse cast in argument from
unsigned int * to  unsigned int __user * .

Signed-off-by: B K Karthik 
---
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 3f70e5dfac39..9cdc1e8a022d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
cmd->scan_end_arg = v32.scan_end_arg;
cmd->stop_src = v32.stop_src;
cmd->stop_arg = v32.stop_arg;
-   cmd->chanlist = compat_ptr(v32.chanlist);
+   cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist);
cmd->chanlist_len = v32.chanlist_len;
cmd->data = compat_ptr(v32.data);
cmd->data_len = v32.data_len;
@@ -2983,7 +2983,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct 
__user *cmd32,
v32.stop_src = cmd->stop_src;
v32.stop_arg = cmd->stop_arg;
/* Assume chanlist pointer is unchanged. */
-   v32.chanlist = ptr_to_compat(cmd->chanlist);
+   v32.chanlist = ptr_to_compat((unsigned int __user *)cmd->chanlist);
v32.chanlist_len = cmd->chanlist_len;
v32.data = ptr_to_compat(cmd->data);
v32.data_len = cmd->data_len;
-- 
2.20.1



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


[PATCH v2] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-15 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from
void [noderef] __user * to unsigned int __force *
and a reverse cast in argument from
void [noderef] __user * to  unsigned int __user * .

Signed-off-by: B K Karthik 
---
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 3f70e5dfac39..9cdc1e8a022d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
cmd->scan_end_arg = v32.scan_end_arg;
cmd->stop_src = v32.stop_src;
cmd->stop_arg = v32.stop_arg;
-   cmd->chanlist = compat_ptr(v32.chanlist);
+   cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist);
cmd->chanlist_len = v32.chanlist_len;
cmd->data = compat_ptr(v32.data);
cmd->data_len = v32.data_len;
@@ -2983,7 +2983,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct 
__user *cmd32,
v32.stop_src = cmd->stop_src;
v32.stop_arg = cmd->stop_arg;
/* Assume chanlist pointer is unchanged. */
-   v32.chanlist = ptr_to_compat(cmd->chanlist);
+   v32.chanlist = ptr_to_compat((unsigned int __user *)cmd->chanlist);
v32.chanlist_len = cmd->chanlist_len;
v32.data = ptr_to_compat(cmd->data);
v32.data_len = cmd->data_len;
-- 
2.20.1



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


Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 7:19 AM Ian Abbott  wrote:
>
> On 15/07/2020 05:48, B K Karthik wrote:
> > fixed a sparse warning by changing the type in
> > assignment from void [noderef] __user * to unsigned int *
> > (different address space)
> >
> > Signed-off-by: B K Karthik 
> > ---
> >   drivers/staging/comedi/comedi_fops.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/comedi/comedi_fops.c 
> > b/drivers/staging/comedi/comedi_fops.c
> > index 3f70e5dfac39..4cc012e231b7 100644
> > --- a/drivers/staging/comedi/comedi_fops.c
> > +++ b/drivers/staging/comedi/comedi_fops.c
> > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
> >   cmd->scan_end_arg = v32.scan_end_arg;
> >   cmd->stop_src = v32.stop_src;
> >   cmd->stop_arg = v32.stop_arg;
> > - cmd->chanlist = compat_ptr(v32.chanlist);
> > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
>
> That should be:
>
> cmd->chanlist = (unsigned int __force *)compat_ptr(v32.chanlist);
>
> >   cmd->chanlist_len = v32.chanlist_len;
> >   cmd->data = compat_ptr(v32.data);
> >   cmd->data_len = v32.data_len;
> >
>
> A reverse cast is required in put_compat_cmd():
>
> v32.chanlist = ptr_to_compat((unsigned int __user *)cmd->chanlist);
>
> Those changes will get rid of the sparse warnings.

Thank you for the clarifications Ian. I will make the changes and submit a patch

thanks,

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


Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:29 AM Greg Kroah-Hartman
 wrote:
>
> On Wed, Jul 15, 2020 at 05:21:01AM -0400, B K Karthik wrote:
> > On Wed, Jul 15, 2020 at 5:14 AM Greg Kroah-Hartman
> >  wrote:
> > >
> > > On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote:
> > > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman
> > > >  wrote:
> > > > >
> > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote:
> > > > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman <
> > > > > > gre...@linuxfoundation.org> wrote:
> > > > > >
> > > > > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > > > > > > > fixed a sparse warning by changing the type in
> > > > > > > > assignment from void [noderef] __user * to unsigned int *
> > > > > > > > (different address space)
> > > > > > > >
> > > > > > > > Signed-off-by: B K Karthik 
> > > > > > > > ---
> > > > > > > >  drivers/staging/comedi/comedi_fops.c | 2 +-
> > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > >
> > > > > > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > > > > b/drivers/staging/comedi/comedi_fops.c
> > > > > > > > index 3f70e5dfac39..4cc012e231b7 100644
> > > > > > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > > > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > > > > > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct 
> > > > > > > > comedi_cmd *cmd,
> > > > > > > >   cmd->scan_end_arg = v32.scan_end_arg;
> > > > > > > >   cmd->stop_src = v32.stop_src;
> > > > > > > >   cmd->stop_arg = v32.stop_arg;
> > > > > > > > - cmd->chanlist = compat_ptr(v32.chanlist);
> > > > > > > > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> > > > > > > >   cmd->chanlist_len = v32.chanlist_len;
> > > > > > > >   cmd->data = compat_ptr(v32.data);
> > > > > > > >   cmd->data_len = v32.data_len;
> > > > > > >
> > > > > > > Always run your patches through checkpatch before sending them, 
> > > > > > > so you
> > > > > > > do not have a grumpy maintainer telling you that you have to run
> > > > > > > checkpatch on your patch before sending them.
> > > > > > >
> > > > > >
> > > > > > I will. Sorry for that.
> > > > > >
> > > > > > But the error that's being shown in this patch is something that 
> > > > > > comes up
> > > > > > on its own.
> > > > >
> > > > > No it is not.
> > > > >
> > > > > > git format-patch leaves trailing whitespace in blank lines.
> > > > >
> > > > > It does?  Where is any trailing whitespace here?  That's not the 
> > > > > issue.
> > > >
> > > > To give you an example,
> > > > https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/
> > > > was a patch i submitted recently.
> > > > This is what checkpatch has to say:
> > > >
> > > > $ perl scripts/checkpatch.pl -f
> > > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> > > > ERROR: trailing whitespace
> > > > #21: FILE: 
> > > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21:
> > > > + $
> > > >
> > > > ERROR: trailing whitespace
> > > > #23: FILE: 
> > > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23:
> > > > + $
> > > >
> > > > ERROR: trailing whitespace
> > > > #30: FILE: 
> > > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30:
> > > > + $
> > > >
> > > > ERROR: trailing whitespace
> > > > #37: FILE: 
> > > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37:
&g

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:19 AM Greg Kroah-Hartman
 wrote:
>
> On Wed, Jul 15, 2020 at 04:47:48AM -0400, B K Karthik wrote:
> > On Wed, Jul 15, 2020 at 4:41 AM B K Karthik  wrote:
> > >
> > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman
> > >  wrote:
> > > >
> > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote:
> > > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman <
> > > > > gre...@linuxfoundation.org> wrote:
> > > > >
> > > > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > > > > > > fixed a sparse warning by changing the type in
> > > > > > > assignment from void [noderef] __user * to unsigned int *
> > > > > > > (different address space)
> > > > > > >
> > > > > > > Signed-off-by: B K Karthik 
> > > > > > > ---
> > > > > > >  drivers/staging/comedi/comedi_fops.c | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > > > b/drivers/staging/comedi/comedi_fops.c
> > > > > > > index 3f70e5dfac39..4cc012e231b7 100644
> > > > > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > > > > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd 
> > > > > > > *cmd,
> > > > > > >   cmd->scan_end_arg = v32.scan_end_arg;
> > > > > > >   cmd->stop_src = v32.stop_src;
> > > > > > >   cmd->stop_arg = v32.stop_arg;
> > > > > > > - cmd->chanlist = compat_ptr(v32.chanlist);
> > > > > > > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> > > > > > >   cmd->chanlist_len = v32.chanlist_len;
> > > > > > >   cmd->data = compat_ptr(v32.data);
> > > > > > >   cmd->data_len = v32.data_len;
> > > > > >
> > > > > > Always run your patches through checkpatch before sending them, so 
> > > > > > you
> > > > > > do not have a grumpy maintainer telling you that you have to run
> > > > > > checkpatch on your patch before sending them.
> > > > > >
> > > > >
> > > > > I will. Sorry for that.
> > > > >
> > > > > But the error that's being shown in this patch is something that 
> > > > > comes up
> > > > > on its own.
> > > >
> > > > No it is not.
> > > >
> > > > > git format-patch leaves trailing whitespace in blank lines.
> > > >
> > > > It does?  Where is any trailing whitespace here?  That's not the issue.
> > >
> > > To give you an example,
> > > https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/
> > > was a patch i submitted recently.
> > > This is what checkpatch has to say:
> > >
> > > $ perl scripts/checkpatch.pl -f
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> > > ERROR: trailing whitespace
> > > #21: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21:
> > > + $
> > >
> > > ERROR: trailing whitespace
> > > #23: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23:
> > > + $
> > >
> > > ERROR: trailing whitespace
> > > #30: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30:
> > > + $
> > >
> > > ERROR: trailing whitespace
> > > #37: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37:
> > > + $
> > >
> > > ERROR: trailing whitespace
> > > #44: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:44:
> > > + $
> > >
> > > ERROR: trailing whitespace
> > > #51: FILE: 
> > > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:51:
> > > +-- $
> > >
> > > total: 6 errors, 0 warnings, 53 lines checked

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:14 AM Greg Kroah-Hartman
 wrote:
>
> On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote:
> > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman
> >  wrote:
> > >
> > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote:
> > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman <
> > > > gre...@linuxfoundation.org> wrote:
> > > >
> > > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > > > > > fixed a sparse warning by changing the type in
> > > > > > assignment from void [noderef] __user * to unsigned int *
> > > > > > (different address space)
> > > > > >
> > > > > > Signed-off-by: B K Karthik 
> > > > > > ---
> > > > > >  drivers/staging/comedi/comedi_fops.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > > b/drivers/staging/comedi/comedi_fops.c
> > > > > > index 3f70e5dfac39..4cc012e231b7 100644
> > > > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > > > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd 
> > > > > > *cmd,
> > > > > >   cmd->scan_end_arg = v32.scan_end_arg;
> > > > > >   cmd->stop_src = v32.stop_src;
> > > > > >   cmd->stop_arg = v32.stop_arg;
> > > > > > - cmd->chanlist = compat_ptr(v32.chanlist);
> > > > > > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> > > > > >   cmd->chanlist_len = v32.chanlist_len;
> > > > > >   cmd->data = compat_ptr(v32.data);
> > > > > >   cmd->data_len = v32.data_len;
> > > > >
> > > > > Always run your patches through checkpatch before sending them, so you
> > > > > do not have a grumpy maintainer telling you that you have to run
> > > > > checkpatch on your patch before sending them.
> > > > >
> > > >
> > > > I will. Sorry for that.
> > > >
> > > > But the error that's being shown in this patch is something that comes 
> > > > up
> > > > on its own.
> > >
> > > No it is not.
> > >
> > > > git format-patch leaves trailing whitespace in blank lines.
> > >
> > > It does?  Where is any trailing whitespace here?  That's not the issue.
> >
> > To give you an example,
> > https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/
> > was a patch i submitted recently.
> > This is what checkpatch has to say:
> >
> > $ perl scripts/checkpatch.pl -f
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> > ERROR: trailing whitespace
> > #21: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21:
> > + $
> >
> > ERROR: trailing whitespace
> > #23: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23:
> > + $
> >
> > ERROR: trailing whitespace
> > #30: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30:
> > + $
> >
> > ERROR: trailing whitespace
> > #37: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37:
> > + $
> >
> > ERROR: trailing whitespace
> > #44: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:44:
> > + $
> >
> > ERROR: trailing whitespace
> > #51: FILE: 
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:51:
> > +-- $
> >
> > total: 6 errors, 0 warnings, 53 lines checked
> >
> > NOTE: For some of the reported defects, checkpatch may be able to
> >   mechanically convert to the typical style using --fix or 
> > --fix-inplace.
> >
> > NOTE: Whitespace errors detected.
> >   You may wish to use scripts/cleanpatch or scripts/cleanfile
> >
> > ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> > has style problems, please review.
> >
> > NOTE: If any of the errors are false positives, please report
> >   them to the maintainer, see CHECKPATCH in MAINTAINERS.
> >
> > Does this happen only to patches I make? Am I making a silly mistake
> > while making a patch?
>
> I don't get that error at all, here's all I get with that patch:
this particular patch or
>
> $ ./scripts/checkpatch.pl x.patch
> WARNING: Missing Signed-off-by: line by nominal patch author ''
>
> total: 0 errors, 1 warnings, 0 checks, 30 lines checked

sorry, you've probably done this a million times more than me, but can
you try "perl scripts/checkpatch.pl -f x.patch" ?
checkpatch seems to behave differently this way.

thanks,

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


Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 4:41 AM B K Karthik  wrote:
>
> On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman
>  wrote:
> >
> > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote:
> > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman <
> > > gre...@linuxfoundation.org> wrote:
> > >
> > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > > > > fixed a sparse warning by changing the type in
> > > > > assignment from void [noderef] __user * to unsigned int *
> > > > > (different address space)
> > > > >
> > > > > Signed-off-by: B K Karthik 
> > > > > ---
> > > > >  drivers/staging/comedi/comedi_fops.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > > b/drivers/staging/comedi/comedi_fops.c
> > > > > index 3f70e5dfac39..4cc012e231b7 100644
> > > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd 
> > > > > *cmd,
> > > > >   cmd->scan_end_arg = v32.scan_end_arg;
> > > > >   cmd->stop_src = v32.stop_src;
> > > > >   cmd->stop_arg = v32.stop_arg;
> > > > > - cmd->chanlist = compat_ptr(v32.chanlist);
> > > > > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> > > > >   cmd->chanlist_len = v32.chanlist_len;
> > > > >   cmd->data = compat_ptr(v32.data);
> > > > >   cmd->data_len = v32.data_len;
> > > >
> > > > Always run your patches through checkpatch before sending them, so you
> > > > do not have a grumpy maintainer telling you that you have to run
> > > > checkpatch on your patch before sending them.
> > > >
> > >
> > > I will. Sorry for that.
> > >
> > > But the error that's being shown in this patch is something that comes up
> > > on its own.
> >
> > No it is not.
> >
> > > git format-patch leaves trailing whitespace in blank lines.
> >
> > It does?  Where is any trailing whitespace here?  That's not the issue.
>
> To give you an example,
> https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/
> was a patch i submitted recently.
> This is what checkpatch has to say:
>
> $ perl scripts/checkpatch.pl -f
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> ERROR: trailing whitespace
> #21: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21:
> + $
>
> ERROR: trailing whitespace
> #23: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23:
> + $
>
> ERROR: trailing whitespace
> #30: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30:
> + $
>
> ERROR: trailing whitespace
> #37: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37:
> + $
>
> ERROR: trailing whitespace
> #44: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:44:
> + $
>
> ERROR: trailing whitespace
> #51: FILE: 
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:51:
> +-- $
>
> total: 6 errors, 0 warnings, 53 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
>   mechanically convert to the typical style using --fix or --fix-inplace.
>
> NOTE: Whitespace errors detected.
>   You may wish to use scripts/cleanpatch or scripts/cleanfile
>
> ../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
> has style problems, please review.
>
> NOTE: If any of the errors are false positives, please report
>   them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
> Does this happen only to patches I make? Am I making a silly mistake
> while making a patch?
> I use 'git format-patch -1' to generate the patch file.
> If I am going wrong somewhere, please let me know.

Also, The patch I sent (this thread):
$ perl scripts/checkpatch.pl -f
./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch
ERROR: trailing whitespace
#29: FILE: ./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch:29:
+-- $

total: 1 errors, 0 warnings, 31 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
  mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
  You may wish to use scripts/cleanpatch or scripts/cleanfile

./0001-staging-comedi-comedi_fops.c-changed-void-__user-to-.patch has
style problems, please review.

NOTE: If any of the errors are false positives, please report
  them to the maintainer, see CHECKPATCH in MAINTAINERS.

Am I using 'git format-patch' or 'checkpatch.pl' the wrong way?

thanks,

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


Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman
 wrote:
>
> On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote:
> > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman <
> > gre...@linuxfoundation.org> wrote:
> >
> > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > > > fixed a sparse warning by changing the type in
> > > > assignment from void [noderef] __user * to unsigned int *
> > > > (different address space)
> > > >
> > > > Signed-off-by: B K Karthik 
> > > > ---
> > > >  drivers/staging/comedi/comedi_fops.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/comedi/comedi_fops.c
> > > b/drivers/staging/comedi/comedi_fops.c
> > > > index 3f70e5dfac39..4cc012e231b7 100644
> > > > --- a/drivers/staging/comedi/comedi_fops.c
> > > > +++ b/drivers/staging/comedi/comedi_fops.c
> > > > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
> > > >   cmd->scan_end_arg = v32.scan_end_arg;
> > > >   cmd->stop_src = v32.stop_src;
> > > >   cmd->stop_arg = v32.stop_arg;
> > > > - cmd->chanlist = compat_ptr(v32.chanlist);
> > > > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> > > >   cmd->chanlist_len = v32.chanlist_len;
> > > >   cmd->data = compat_ptr(v32.data);
> > > >   cmd->data_len = v32.data_len;
> > >
> > > Always run your patches through checkpatch before sending them, so you
> > > do not have a grumpy maintainer telling you that you have to run
> > > checkpatch on your patch before sending them.
> > >
> >
> > I will. Sorry for that.
> >
> > But the error that's being shown in this patch is something that comes up
> > on its own.
>
> No it is not.
>
> > git format-patch leaves trailing whitespace in blank lines.
>
> It does?  Where is any trailing whitespace here?  That's not the issue.

To give you an example,
https://lore.kernel.org/lkml/20200714132350.naekk4zqivpuaedi@pesu-pes-edu/
was a patch i submitted recently.
This is what checkpatch has to say:

$ perl scripts/checkpatch.pl -f
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
ERROR: trailing whitespace
#21: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:21:
+ $

ERROR: trailing whitespace
#23: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:23:
+ $

ERROR: trailing whitespace
#30: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:30:
+ $

ERROR: trailing whitespace
#37: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:37:
+ $

ERROR: trailing whitespace
#44: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:44:
+ $

ERROR: trailing whitespace
#51: FILE: 
../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch:51:
+-- $

total: 6 errors, 0 warnings, 53 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
  mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
  You may wish to use scripts/cleanpatch or scripts/cleanfile

../cbridge/1407d/1/0001-drivers-staging-media-atomisp-pci-css_2401_system-ho.patch
has style problems, please review.

NOTE: If any of the errors are false positives, please report
  them to the maintainer, see CHECKPATCH in MAINTAINERS.

Does this happen only to patches I make? Am I making a silly mistake
while making a patch?
I use 'git format-patch -1' to generate the patch file.
If I am going wrong somewhere, please let me know.

>
> > It has been reported to the maintainers.
>
> It was?  Where?

I am extremely sorry, I should have verified if it was indeed reported
before telling it out.
It has not been reported (yet).
I apologise for my mistake.

thanks,

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


Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 3:08 AM Greg Kroah-Hartman
 wrote:
>
> On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote:
> > fixed a sparse warning by changing the type in
> > assignment from void [noderef] __user * to unsigned int *
> > (different address space)
> >
> > Signed-off-by: B K Karthik 
> > ---
> >  drivers/staging/comedi/comedi_fops.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/comedi/comedi_fops.c 
> > b/drivers/staging/comedi/comedi_fops.c
> > index 3f70e5dfac39..4cc012e231b7 100644
> > --- a/drivers/staging/comedi/comedi_fops.c
> > +++ b/drivers/staging/comedi/comedi_fops.c
> > @@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
> >   cmd->scan_end_arg = v32.scan_end_arg;
> >   cmd->stop_src = v32.stop_src;
> >   cmd->stop_arg = v32.stop_arg;
> > - cmd->chanlist = compat_ptr(v32.chanlist);
> > + cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
> >   cmd->chanlist_len = v32.chanlist_len;
> >   cmd->data = compat_ptr(v32.data);
> >   cmd->data_len = v32.data_len;
>
> Always run your patches through checkpatch before sending them, so you
> do not have a grumpy maintainer telling you that you have to run
> checkpatch on your patch before sending them.

I will, Sorry for that.

But this particular error which showed up after running checkpatch is
something 'git format-patch' does unintentionally.
It has been reported to the maintainers.

thanks,

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


[PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-14 Thread B K Karthik
fixed a sparse warning by changing the type in
assignment from void [noderef] __user * to unsigned int *
(different address space)

Signed-off-by: B K Karthik 
---
 drivers/staging/comedi/comedi_fops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 3f70e5dfac39..4cc012e231b7 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2956,7 +2956,7 @@ static int get_compat_cmd(struct comedi_cmd *cmd,
cmd->scan_end_arg = v32.scan_end_arg;
cmd->stop_src = v32.stop_src;
cmd->stop_arg = v32.stop_arg;
-   cmd->chanlist = compat_ptr(v32.chanlist);
+   cmd->chanlist = (unsigned int *) compat_ptr(v32.chanlist);
cmd->chanlist_len = v32.chanlist_len;
cmd->data = compat_ptr(v32.data);
cmd->data_len = v32.data_len;
-- 
2.20.1



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


[PATCH v2] staging: media: atomisp: mark some csi_rx.c symbols static

2020-07-14 Thread B K Karthik
changed symbols N_SHORT_PACKET_LUT_ENTRIES, N_LONG_PACKET_ENTRIES,
N_CSI_RX_FE_CTRL_DLANES, N_CSI_RX_BE_SID_WIDTH to static because they
were not declared earlier.

Signed-off-by: B K Karthik 
---
 .../media/atomisp/pci/css_2401_system/host/csi_rx.c   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c 
b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
index 8e661091f7d9..4d2076db1240 100644
--- a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
+++ b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
@@ -15,26 +15,26 @@
 
 #include "system_global.h"
 
-const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
4,  /* 4 entries at CSI_RX_BACKEND0_ID*/
4,  /* 4 entries at CSI_RX_BACKEND1_ID*/
4   /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
8,  /* 8 entries at CSI_RX_BACKEND0_ID*/
4,  /* 4 entries at CSI_RX_BACKEND1_ID*/
4   /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
+static const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
N_CSI_RX_DLANE_ID,  /* 4 dlanes for CSI_RX_FR0NTEND0_ID */
N_CSI_RX_DLANE_ID,  /* 4 dlanes for CSI_RX_FR0NTEND1_ID */
N_CSI_RX_DLANE_ID   /* 4 dlanes for CSI_RX_FR0NTEND2_ID */
 };
 
 /* sid_width for CSI_RX_BACKEND_ID */
-const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
3,
2,
2
-- 
2.20.1



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


[PATCH] drivers: staging: media: atomisp: pci: css_2401_system: host: csi_rx.c: fixed a sparse warning by making undeclared symbols static

2020-07-14 Thread B K Karthik
changed symbols N_SHORT_PACKET_LUT_ENTRIES, N_LONG_PACKET_ENTRIES,
N_CSI_RX_FE_CTRL_DLANES, N_CSI_RX_BE_SID_WIDTH to static because they
were not declared earlier.

Signed-off-by: B K Karthik 
---
 .../media/atomisp/pci/css_2401_system/host/csi_rx.c   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c 
b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
index 8e661091f7d9..4d2076db1240 100644
--- a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
+++ b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c
@@ -15,26 +15,26 @@
 
 #include "system_global.h"
 
-const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
4,  /* 4 entries at CSI_RX_BACKEND0_ID*/
4,  /* 4 entries at CSI_RX_BACKEND1_ID*/
4   /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
8,  /* 8 entries at CSI_RX_BACKEND0_ID*/
4,  /* 4 entries at CSI_RX_BACKEND1_ID*/
4   /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
+static const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
N_CSI_RX_DLANE_ID,  /* 4 dlanes for CSI_RX_FR0NTEND0_ID */
N_CSI_RX_DLANE_ID,  /* 4 dlanes for CSI_RX_FR0NTEND1_ID */
N_CSI_RX_DLANE_ID   /* 4 dlanes for CSI_RX_FR0NTEND2_ID */
 };
 
 /* sid_width for CSI_RX_BACKEND_ID */
-const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
+static const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
3,
2,
2
-- 
2.20.1



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


[PATCH 2/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed a blank space coding style issue.

2020-07-02 Thread B K Karthik
add blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index c89328142731..b4cf0f1ce6d3 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME (1*HZ) /*  1 sec */
+#define LPS_DELAY_TIME (1 * HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
--
2.20.1



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


[PATCH 1/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed multiple parentheses coding style issues.

2020-07-02 Thread B K Karthik
add parentheses since complex valued macros must be enclosed within parentheses.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index 404634999e35..c89328142731 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME 1*HZ /*  1 sec */
+#define LPS_DELAY_TIME (1*HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
@@ -201,7 +201,7 @@ struct pwrctrl_priv {
 };

 #define rtw_get_ips_mode_req(pwrctrlpriv) \
-   (pwrctrlpriv)->ips_mode_req
+   ((pwrctrlpriv)->ips_mode_req)

 #define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
((pwrctrlpriv)->ips_mode_req = (ips_mode))
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtw_recv.h: fixed a blank space coding style issue.

2020-07-02 Thread B K Karthik
added blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index e383cb119e1b..b281b9e7fcea 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -13,7 +13,7 @@
 #define NR_RECVFRAME 256

 #define RXFRAME_ALIGN  8
-#define RXFRAME_ALIGN_SZ   (1<

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


[PATCH] staging: rtl8188eu: include: rtw_cmd.h: fixed a blank space coding style issue.

2020-07-02 Thread B K Karthik
add blank spaces for improved code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h 
b/drivers/staging/rtl8188eu/include/rtw_cmd.h
index fa5e212fc9e0..002a797c6d0a 100644
--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
+++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
@@ -115,7 +115,7 @@ struct  setopmode_parm {
  */

 #define RTW_SSID_SCAN_AMOUNT 9 /*  for WEXT_CSCAN_AMOUNT 9 */
-#define RTW_CHANNEL_SCAN_AMOUNT (14+37)
+#define RTW_CHANNEL_SCAN_AMOUNT (14 + 37)
 struct sitesurvey_parm {
int scan_mode;  /* active: 1, passive: 0 */
u8 ssid_num;
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtl8188e_xmit.h: fixed multiple blank space coding style issues

2020-07-02 Thread B K Karthik
added blank spaces to improve code readability. (coding style issue)

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
index 49884cceb349..c115007d883d 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
@@ -30,11 +30,11 @@
 #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) \
SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value)
 #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 0, 8, __Value)
 #define SET_EARLYMODE_LEN3(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 8, 12, __Value)
 #define SET_EARLYMODE_LEN4(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 20, 12, __Value)

 /*  */
 /* defined for TX DESC Operation */
@@ -100,7 +100,7 @@ enum TXDESC_SC {

 #define txdesc_set_ccx_sw_88e(txdesc, value) \
do { \
-   ((struct txdesc_88e *)(txdesc))->sw1 = (((value)>>8) & 0x0f); \
+   ((struct txdesc_88e *)(txdesc))->sw1 = (((value) >> 8) & 0x0f); 
\
((struct txdesc_88e *)(txdesc))->sw0 = ((value) & 0xff); \
} while (0)

@@ -138,9 +138,9 @@ struct txrpt_ccx_88e {
u8 sw0;
 };

-#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
+#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 << 
8))
 #define txrpt_ccx_qtime_88e(txrpt_ccx) \
-   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
+   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1 << 8))

 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
   u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
--
2.20.1



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


[PATCH 2/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed a blank space coding style issue.

2020-07-01 Thread B K Karthik
add blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index c89328142731..b4cf0f1ce6d3 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME (1*HZ) /*  1 sec */
+#define LPS_DELAY_TIME (1 * HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
--
2.20.1



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


[PATCH 1/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed multiple parentheses coding style issues.

2020-07-01 Thread B K Karthik
add parentheses since complex valued macros must be enclosed within parentheses.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index 404634999e35..c89328142731 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME 1*HZ /*  1 sec */
+#define LPS_DELAY_TIME (1*HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
@@ -201,7 +201,7 @@ struct pwrctrl_priv {
 };

 #define rtw_get_ips_mode_req(pwrctrlpriv) \
-   (pwrctrlpriv)->ips_mode_req
+   ((pwrctrlpriv)->ips_mode_req)

 #define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
((pwrctrlpriv)->ips_mode_req = (ips_mode))
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtl8188e_xmit.h: fixed multiple blank space coding style issues

2020-07-01 Thread B K Karthik
added blank spaces to improve code readability. (coding style issue)

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
index 49884cceb349..c115007d883d 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
@@ -30,11 +30,11 @@
 #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) \
SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value)
 #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 0, 8, __Value)
 #define SET_EARLYMODE_LEN3(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 8, 12, __Value)
 #define SET_EARLYMODE_LEN4(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 20, 12, __Value)

 /*  */
 /* defined for TX DESC Operation */
@@ -100,7 +100,7 @@ enum TXDESC_SC {

 #define txdesc_set_ccx_sw_88e(txdesc, value) \
do { \
-   ((struct txdesc_88e *)(txdesc))->sw1 = (((value)>>8) & 0x0f); \
+   ((struct txdesc_88e *)(txdesc))->sw1 = (((value) >> 8) & 0x0f); 
\
((struct txdesc_88e *)(txdesc))->sw0 = ((value) & 0xff); \
} while (0)

@@ -138,9 +138,9 @@ struct txrpt_ccx_88e {
u8 sw0;
 };

-#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
+#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 << 
8))
 #define txrpt_ccx_qtime_88e(txrpt_ccx) \
-   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
+   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1 << 8))

 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
   u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtw_recv.h: fixed a blank space coding style issue.

2020-07-01 Thread B K Karthik
added blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_recv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h 
b/drivers/staging/rtl8188eu/include/rtw_recv.h
index e383cb119e1b..b281b9e7fcea 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -13,7 +13,7 @@
 #define NR_RECVFRAME 256

 #define RXFRAME_ALIGN  8
-#define RXFRAME_ALIGN_SZ   (1<

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


[PATCH 2/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed a blank space coding style issue.

2020-07-01 Thread B K Karthik
add blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index c89328142731..b4cf0f1ce6d3 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME (1*HZ) /*  1 sec */
+#define LPS_DELAY_TIME (1 * HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
--
2.20.1



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


[PATCH 1/2] staging: rtl8188eu: include: rtw_pwrctrl.h: fixed multiple parentheses coding style issues.

2020-07-01 Thread B K Karthik
add parentheses since complex valued macros must be enclosed within parentheses.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h 
b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index 404634999e35..c89328142731 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -84,7 +84,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
 };

-#define LPS_DELAY_TIME 1*HZ /*  1 sec */
+#define LPS_DELAY_TIME (i*HZ) /*  1 sec */

 #define EXE_PWR_NONE   0x01
 #define EXE_PWR_IPS0x02
@@ -201,7 +201,7 @@ struct pwrctrl_priv {
 };

 #define rtw_get_ips_mode_req(pwrctrlpriv) \
-   (pwrctrlpriv)->ips_mode_req
+   ((pwrctrlpriv)->ips_mode_req)

 #define rtw_ips_mode_req(pwrctrlpriv, ips_mode) \
((pwrctrlpriv)->ips_mode_req = (ips_mode))
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtw_cmd.h: fixed a blank space coding style issue.

2020-07-01 Thread B K Karthik
add blank spaces for improved code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h 
b/drivers/staging/rtl8188eu/include/rtw_cmd.h
index fa5e212fc9e0..002a797c6d0a 100644
--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
+++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
@@ -115,7 +115,7 @@ struct  setopmode_parm {
  */

 #define RTW_SSID_SCAN_AMOUNT 9 /*  for WEXT_CSCAN_AMOUNT 9 */
-#define RTW_CHANNEL_SCAN_AMOUNT (14+37)
+#define RTW_CHANNEL_SCAN_AMOUNT (14 + 37)
 struct sitesurvey_parm {
int scan_mode;  /* active: 1, passive: 0 */
u8 ssid_num;
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: rtl8188e_xmit.h: fixed multiple blank space coding style issues

2020-07-01 Thread B K Karthik
added blank spaces to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h 
b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
index 49884cceb349..c115007d883d 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
@@ -30,11 +30,11 @@
 #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) \
SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value)
 #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAdd r +4, 0, 8, __Value)
 #define SET_EARLYMODE_LEN3(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 8, 12, __Value)
 #define SET_EARLYMODE_LEN4(__pAddr, __Value)   \
-   SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value)
+   SET_BITS_TO_LE_4BYTE(__pAddr + 4, 20, 12, __Value)

 /*  */
 /* defined for TX DESC Operation */
@@ -100,7 +100,7 @@ enum TXDESC_SC {

 #define txdesc_set_ccx_sw_88e(txdesc, value) \
do { \
-   ((struct txdesc_88e *)(txdesc))->sw1 = (((value)>>8) & 0x0f); \
+   ((struct txdesc_88e *)(txdesc))->sw1 = (((value) >> 8) & 0x0f); 
\
((struct txdesc_88e *)(txdesc))->sw0 = ((value) & 0xff); \
} while (0)

@@ -138,9 +138,9 @@ struct txrpt_ccx_88e {
u8 sw0;
 };

-#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
+#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 << 
8))
 #define txrpt_ccx_qtime_88e(txrpt_ccx) \
-   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
+   ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1 << 8))

 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
   u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
--
2.20.1



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


Re: [PATCH] staging: media: atomisp: i2c: atomisp-ov2680.c: fixed a brace coding style issue.

2020-06-29 Thread B K Karthik
Did this get burried in along with a bunch of other patches? I am sending this 
email only because I did not recieve a negetive acknowledgement on the patch.

I apologize if this message was hurtful / disrespectfull in any manner,
thank you for reading this message.

karthik

On 20/06/28 12:38AM, B K Karthik wrote:
> Fixed a coding style issue.
> 
> Signed-off-by: B K Karthik 
> ---
>  drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c 
> b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
> index 90d125ba080f..c90730513438 100644
> --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
> +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
> @@ -495,11 +495,11 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 
> value)
>   ret = ov2680_read_reg(client, 1, OV2680_MIRROR_REG, );
>   if (ret)
>   return ret;
> - if (value) {
> + if (value)
>   val |= OV2680_FLIP_MIRROR_BIT_ENABLE;
> - } else {
> + else
>   val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
> - }
> +
>   ret = ov2680_write_reg(client, 1,
>  OV2680_MIRROR_REG, val);
>   if (ret)
> --
> 2.20.1




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


[PATCH] staging: rtl8188eu: include: ieee80211.h: fixed multiple blank line coding style issues.

2020-06-29 Thread B K Karthik
removed multiple blank lines to improve code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/ieee80211.h | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h 
b/drivers/staging/rtl8188eu/include/ieee80211.h
index 75f0ebe0faf5..93fd0e9c49dc 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -90,7 +90,6 @@ enum {
 #define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED   6
 #define IEEE_CRYPT_ERR_CARD_CONF_FAILED7

-
 #defineIEEE_CRYPT_ALG_NAME_LEN 16

 #define WPA_CIPHER_NONEBIT(0)
@@ -99,8 +98,6 @@ enum {
 #define WPA_CIPHER_TKIPBIT(3)
 #define WPA_CIPHER_CCMPBIT(4)

-
-
 #define WPA_SELECTOR_LEN 4
 extern u8 RTW_WPA_OUI_TYPE[];
 extern u8 WPA_AUTH_KEY_MGMT_NONE[];
@@ -113,7 +110,6 @@ extern u8 WPA_CIPHER_SUITE_WRAP[];
 extern u8 WPA_CIPHER_SUITE_CCMP[];
 extern u8 WPA_CIPHER_SUITE_WEP104[];

-
 #define RSN_HEADER_LEN 4
 #define RSN_SELECTOR_LEN 4

@@ -192,7 +188,6 @@ enum NETWORK_TYPE {
 #define IsSupportedTxMCS(NetType)  \
((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? true : false)

-
 struct ieee_param {
u32 cmd;
u8 sta_addr[ETH_ALEN];
@@ -270,11 +265,9 @@ struct sta_data {
  * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro)
  */

-
 #define IEEE80211_HLEN 30
 #define IEEE80211_FRAME_LEN(IEEE80211_DATA_LEN + IEEE80211_HLEN)

-
 /* this is stolen from ipw2200 driver */
 #define IEEE_IBSS_MAC_HASH_SIZE 31

@@ -297,7 +290,6 @@ enum eap_type {
 #define RTW_IEEE80211_SCTL_FRAG0x000F
 #define RTW_IEEE80211_SCTL_SEQ 0xFFF0

-
 #define RTW_ERP_INFO_NON_ERP_PRESENT BIT(0)
 #define RTW_ERP_INFO_USE_PROTECTION BIT(1)
 #define RTW_ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
@@ -354,7 +346,6 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_CCK_RATE_LEN 4
 #define IEEE80211_NUM_OFDM_RATESLEN8

-
 #define IEEE80211_CCK_RATE_1MB 0x02
 #define IEEE80211_CCK_RATE_2MB 0x04
 #define IEEE80211_CCK_RATE_5MB 0x0B
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: odm.h: fixed a blank space coding style issue.

2020-06-29 Thread B K Karthik
added blank space and enclosed a complex valued macro within parentheses for 
improved code readability.

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8188eu/include/odm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/odm.h 
b/drivers/staging/rtl8188eu/include/odm.h
index 9d39fe13626a..27bffc2ead66 100644
--- a/drivers/staging/rtl8188eu/include/odm.h
+++ b/drivers/staging/rtl8188eu/include/odm.h
@@ -244,7 +244,7 @@ struct odm_rate_adapt {

 #define AVG_THERMAL_NUM8
 #define IQK_Matrix_REG_NUM 8
-#define IQK_Matrix_Settings_NUM1+24+21
+#define IQK_Matrix_Settings_NUM(1 + 24 + 21)

 #defineDM_Type_ByFWi   0
 #defineDM_Type_ByDriver1
--
2.20.1



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


[PATCH] staging: rtl8188eu: include: hal8188e_rate_adaptive.h: fixed a blank space coding style issue

2020-06-28 Thread B K Karthik
added blank space around arithmetic operators to improve readability

Signed-off-by: B K Karthik 
---
 .../rtl8188eu/include/hal8188e_rate_adaptive.h   | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/hal8188e_rate_adaptive.h 
b/drivers/staging/rtl8188eu/include/hal8188e_rate_adaptive.h
index 5b59c25e4c8a..79c0d2f9961e 100644
--- a/drivers/staging/rtl8188eu/include/hal8188e_rate_adaptive.h
+++ b/drivers/staging/rtl8188eu/include/hal8188e_rate_adaptive.h
@@ -35,17 +35,17 @@
 #define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr)   \
LE_BITS_TO_4BYTE(__pAddr, 0, 16)
 #define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr)   \
-   LE_BITS_TO_1BYTE(__pAddr+2, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 2, 0, 8)
 #define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr)   \
-   LE_BITS_TO_1BYTE(__pAddr+3, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 3, 0, 8)
 #define GET_TX_REPORT_TYPE1_RERTY_3(__pAddr)   \
-   LE_BITS_TO_1BYTE(__pAddr+4, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 4, 0, 8)
 #define GET_TX_REPORT_TYPE1_RERTY_4(__pAddr)   \
-   LE_BITS_TO_1BYTE(__pAddr+4+1, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 4 + 1, 0, 8)
 #define GET_TX_REPORT_TYPE1_DROP_0(__pAddr)\
-   LE_BITS_TO_1BYTE(__pAddr+4+2, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 4 + 2, 0, 8)
 #define GET_TX_REPORT_TYPE1_DROP_1(__pAddr)\
-   LE_BITS_TO_1BYTE(__pAddr+4+3, 0, 8)
+   LE_BITS_TO_1BYTE(__pAddr + 4 + 3, 0, 8)
 
 /*  End rate adaptive define */
 
-- 
2.20.1



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


[PATCH] staging: media: atomisp: i2c: atomisp-ov2680.c: fixed a brace coding style issue.

2020-06-27 Thread B K Karthik
Fixed a coding style issue.

Signed-off-by: B K Karthik 
---
 drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c 
b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
index 90d125ba080f..c90730513438 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
@@ -495,11 +495,11 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 
value)
ret = ov2680_read_reg(client, 1, OV2680_MIRROR_REG, );
if (ret)
return ret;
-   if (value) {
+   if (value)
val |= OV2680_FLIP_MIRROR_BIT_ENABLE;
-   } else {
+   else
val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
-   }
+
ret = ov2680_write_reg(client, 1,
   OV2680_MIRROR_REG, val);
if (ret)
--
2.20.1


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


Re: [PATCH] staging: media: usbvision: removing prohibited space before ',' (ctx:WxW)

2020-06-27 Thread B K Karthik
Thank you for the information.
I will take care of all these things from the next time.

sorry for wasting your time

thanks,

karthik

On Sat, Jun 27, 2020 at 4:49 AM Greg Kroah-Hartman
 wrote:
>
> On Sat, Jun 27, 2020 at 10:28:31AM +0200, Hans Verkuil wrote:
> > On 27/06/2020 07:07, Greg Kroah-Hartman wrote:
> > >
> > > A: http://en.wikipedia.org/wiki/Top_post
> > > Q: Were do I find info about this thing called top-posting?
> > > A: Because it messes up the order in which people normally read text.
> > > Q: Why is top-posting such a bad thing?
> > > A: Top-posting.
> > > Q: What is the most annoying thing in e-mail?
> > >
> > > A: No.
> > > Q: Should I include quotations after my reply?
> > >
> > > http://daringfireball.net/2007/07/on_top
> > >
> > > On Fri, Jun 26, 2020 at 11:42:49AM -0400, B K KARTHIK 
> > > PES2201800185STUDENT ECE DeptPESU EC Campus wrote:
> > >> Oh, I'm sorry but wouldn't it be helpful if we had a file that lists
> > >> all drivers that are scheduled for removal?
> > >
> > > The TODO file in the directory for the driver should have this
> > > information in it.  I don't know if all of the media drivers have this,
> > > if not, then there is no way you could have known this.
> >
> > They have, and in addition the Kconfig entry will mention that the driver
> > is deprecated.
> >
> > TODO of usbvision:
> >
> > The driver is deprecated and scheduled for removal by the end
> > of 2020.
> >
> > In order to prevent removal the following actions would have to
> > be taken:
> >
> > - clean up the code
> > - convert to the vb2 framework
> > - fix the disconnect and free-on-last-user handling (i.e., add
> >   a release callback for struct v4l2_device and rework the code
> >   to use that correctly).
>
> Ah, great, nevermind then!
>
> B K, your wish is already granted, the text is present, you just needed
> to have noticed it :)
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8712: rtl8712_recv.h: Removing unnecessary blank line

2020-06-27 Thread B K Karthik
Removing unnecessary blank line

Signed-off-by: B K Karthik 
---
 drivers/staging/rtl8712/rtl8712_recv.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.h 
b/drivers/staging/rtl8712/rtl8712_recv.h
index 3e385b2242d8..69d3d5b287d3 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.h
+++ b/drivers/staging/rtl8712/rtl8712_recv.h
@@ -84,7 +84,6 @@ union recvstat {
unsigned int value[RXDESC_SIZE>>2];
 };
 
-
 struct recv_buf {
struct list_head list;
spinlock_t recvbuf_lock;
-- 
2.20.1



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


[PATCH] qlge.h: Adding the missing blank line after declarations

2020-06-27 Thread B K Karthik
Signed-off-by: B K Karthik 
---
 drivers/staging/qlge/qlge.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/qlge/qlge.h b/drivers/staging/qlge/qlge.h
index fc8c5ca8935d..0b971a633001 100644
--- a/drivers/staging/qlge/qlge.h
+++ b/drivers/staging/qlge/qlge.h
@@ -2224,6 +2224,7 @@ static inline void ql_write_db_reg_relaxed(u32 val, void 
__iomem *addr)
 static inline u32 ql_read_sh_reg(__le32  *addr)
 {
u32 reg;
+
reg =  le32_to_cpu(*addr);
rmb();
return reg;
-- 
2.20.1



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


[PATCH] fbtft-bus.c: Removing that prohibited space before ')'

2020-06-26 Thread B K Karthik
fbtft-bus.c:

fixing ERROR: space prohibited before that close parenthesis ')' by removing 
that space and ',' in line 65 and 67.

Signed-off-by: B K Karthik 
---
 drivers/staging/fbtft/fbtft-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c 
b/drivers/staging/fbtft/fbtft-bus.c
index 63c65dd67b17..847cbfbbd766 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:  
  \
 } \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
-- 
2.20.1



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


[PATCH] fbtft-bus.c:

2020-06-26 Thread B K Karthik
fbtft-bus.c:

fixing ERROR: space prohibited before that close parenthesis ')' by removing 
that space and ',' in line 65 and 67.

Signed-off-by: B K Karthik 
---
 drivers/staging/fbtft/fbtft-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-bus.c 
b/drivers/staging/fbtft/fbtft-bus.c
index 63c65dd67b17..847cbfbbd766 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -62,9 +62,9 @@ out:  
  \
 } \
 EXPORT_SYMBOL(func);
 
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8)
 define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16)
 
 void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
 {
-- 
2.20.1



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


Re: [PATCH] staging: media: usbvision: removing prohibited space before ',' (ctx:WxW)

2020-06-26 Thread B K KARTHIK PES2201800185STUDENT ECE DeptPESU EC Campus
Oh, I'm sorry but wouldn't it be helpful if we had a file that lists
all drivers that are scheduled for removal? I personally feel that it
would help out all kernel newbies.
I've been trying to complete task10 in the eudyptula challenge, and
the patches either get thrown out by greg's patch-bot, or the driver
is scheduled for removal.

Please do think about adding a file that lists all drivers scheduled
for removal.

I apologize if my message was hurtful or disrespectful in any way.

Thank you for reading this message,
Karthik

On Fri, Jun 26, 2020 at 10:32 AM B K Karthik  wrote:
>
> fixing ERROR: space prohibited before that ',' (ctx:WxW)
>
> Signed-off-by: B K Karthik 
> ---
>  drivers/staging/media/usbvision/usbvision-i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/usbvision/usbvision-i2c.c 
> b/drivers/staging/media/usbvision/usbvision-i2c.c
> index 6e4df3335b1b..010ad03c6ec1 100644
> --- a/drivers/staging/media/usbvision/usbvision-i2c.c
> +++ b/drivers/staging/media/usbvision/usbvision-i2c.c
> @@ -32,7 +32,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");
>  #define PDEBUG(level, fmt, args...) { \
> if (i2c_debug & (level)) \
> printk(KERN_INFO KBUILD_MODNAME ":[%s:%d] " fmt, \
> -   __func__, __LINE__ , ## args); \
> +   __func__, __LINE__, ## args); \
> }
>
>  static int usbvision_i2c_write(struct usb_usbvision *usbvision, unsigned 
> char addr, char *buf,
> --
> 2.20.1
>


-- 
B K Karthik

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


[PATCH] staging: media: usbvision: removing prohibited space before ',' (ctx:WxW)

2020-06-26 Thread B K Karthik
fixing ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: B K Karthik 
---
 drivers/staging/media/usbvision/usbvision-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/usbvision/usbvision-i2c.c 
b/drivers/staging/media/usbvision/usbvision-i2c.c
index 6e4df3335b1b..010ad03c6ec1 100644
--- a/drivers/staging/media/usbvision/usbvision-i2c.c
+++ b/drivers/staging/media/usbvision/usbvision-i2c.c
@@ -32,7 +32,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");
 #define PDEBUG(level, fmt, args...) { \
if (i2c_debug & (level)) \
printk(KERN_INFO KBUILD_MODNAME ":[%s:%d] " fmt, \
-   __func__, __LINE__ , ## args); \
+   __func__, __LINE__, ## args); \
}
 
 static int usbvision_i2c_write(struct usb_usbvision *usbvision, unsigned char 
addr, char *buf,
-- 
2.20.1



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


[PATCH] fixing ERROR: Macros with complex values must be enclosed within parentheses.

2020-06-25 Thread B K Karthik
soc_camera.c:

fixing ERROR: Macros with complex values must be enclused within parentheses.

Signed-off-by: B K Karthik 
---
 drivers/staging/media/soc_camera/soc_camera.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/soc_camera/soc_camera.c 
b/drivers/staging/media/soc_camera/soc_camera.c
index 39f513f69b89..f609ecf6691c 100644
--- a/drivers/staging/media/soc_camera/soc_camera.c
+++ b/drivers/staging/media/soc_camera/soc_camera.c
@@ -238,8 +238,7 @@ unsigned long soc_camera_apply_board_flags(struct 
soc_camera_subdev_desc *ssdd,
 }
 EXPORT_SYMBOL(soc_camera_apply_board_flags);
 
-#define pixfmtstr(x) (x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
-   ((x) >> 24) & 0xff
+#define pixfmtstr(x) ((x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, ((x) 
>> 24) & 0xff)
 
 static int soc_camera_try_fmt(struct soc_camera_device *icd,
  struct v4l2_format *f)
-- 
2.20.1



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


[PATCH 1/1] staging: media: soc_camera: Adding parentheses to macro defination at line 241, Clearing alignment issues at lines 410 and 1270, fixing return values at EPOLLERR

2020-06-25 Thread B K Karthik
staging: media: soc_camera: soc_camera.c: Clearing coding-style problem
"Macros with complex values should be enclosed in parentheses" in line 241 by 
adding parentheses.
staging: media: soc_camera: soc_camera.c: Clearing coding-style problem
"Alignment should match open parenthesis" by adding tab spaces in line 410.
staging: media: soc_camera: soc_camera.c: Clearing coding-style problem
"return of an errno should typically be negative" by adding a "-" in front of 
EPOLLER in line 812.
staging: media: soc_camera: soc_camera.c: Clearing coding-style problem
"Alignment should match open parenthesis" by adding tab spaces in line 1270.

Signed-off-by: B K Karthik 
---
 drivers/staging/media/soc_camera/soc_camera.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/soc_camera/soc_camera.c 
b/drivers/staging/media/soc_camera/soc_camera.c
index 39f513f69b89..66a14ebd8093 100644
--- a/drivers/staging/media/soc_camera/soc_camera.c
+++ b/drivers/staging/media/soc_camera/soc_camera.c
@@ -238,8 +238,8 @@ unsigned long soc_camera_apply_board_flags(struct 
soc_camera_subdev_desc *ssdd,
 }
 EXPORT_SYMBOL(soc_camera_apply_board_flags);
 
-#define pixfmtstr(x) (x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
-   ((x) >> 24) & 0xff
+#define pixfmtstr(x) ((x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, \
+   ((x) >> 24) & 0xff)
 
 static int soc_camera_try_fmt(struct soc_camera_device *icd,
  struct v4l2_format *f)
@@ -407,7 +407,7 @@ static int soc_camera_dqbuf(struct file *file, void *priv,
 }
 
 static int soc_camera_create_bufs(struct file *file, void *priv,
-   struct v4l2_create_buffers *create)
+   struct v4l2_create_buffers *create)
 {
struct soc_camera_device *icd = file->private_data;
int ret;
@@ -806,10 +806,10 @@ static __poll_t soc_camera_poll(struct file *file, 
poll_table *pt)
 {
struct soc_camera_device *icd = file->private_data;
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
-   __poll_t res = EPOLLERR;
+   __poll_t res = -EPOLLERR;
 
if (icd->streamer != file)
-   return EPOLLERR;
+   return -EPOLLERR;
 
mutex_lock(>host_lock);
res = ici->ops->poll(file, pt);
@@ -1267,7 +1267,7 @@ static int soc_camera_i2c_init(struct soc_camera_device 
*icd,
}
 
subdev = v4l2_i2c_new_subdev_board(>v4l2_dev, adap,
-   shd->board_info, NULL);
+   shd->board_info, NULL);
if (!subdev) {
ret = -ENODEV;
goto ei2cnd;
-- 
2.20.1



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


[PATCH] staging: nvec: changed coding style, line should not end with a (

2020-06-25 Thread B K Karthik
Signed-off-by: B K Karthik 
---
 drivers/staging/nvec/nvec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 360ec0407740..16afbe1dfdeb 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -382,8 +382,8 @@ static void nvec_request_master(struct work_struct *work)
msg = list_first_entry(>tx_data, struct nvec_msg, node);
spin_unlock_irqrestore(>tx_lock, flags);
nvec_gpio_set_value(nvec, 0);
-   err = wait_for_completion_interruptible_timeout(
-   >ec_transfer, msecs_to_jiffies(5000));
+   err = 
wait_for_completion_interruptible_timeout(>ec_transfer,
+   msecs_to_jiffies(5000));
 
if (err == 0) {
dev_warn(nvec->dev, "timeout waiting for ec 
transfer\n");
-- 
2.20.1



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