[PATCH] staging: mt7621-pci: avoid to set 'iomem_resource' addresses

2020-03-22 Thread Sergio Paracuellos
Setting up kernel resource 'iomem_resource' for PCI with
addresses parsed from device tree gots into a conflict within
the usb xhci driver:

xhci-mtk 1e1c.xhci: can't request region for resource [mem 
0x1e1c-0x1e1c0fff]
xhci-mtk: probe of 1e1c.xhci failed with error -16

Don't assign it and maintain the default addresses for this
resource seems to fix the problem. Checking legacy driver it
is being only  setting the 'ioport_resource'.

Fixes: 09dd629eeabb ("staging: mt7621-pci: fix io space and properly set 
resource limits")
Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c 
b/drivers/staging/mt7621-pci/pci-mt7621.c
index 1282a0815102..f1b35153ddd1 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -682,8 +682,6 @@ static int mt7621_pci_probe(struct platform_device *pdev)
}
 
/* set resources limits */
-   iomem_resource.start = pcie->mem.start;
-   iomem_resource.end = pcie->mem.end;
ioport_resource.start = pcie->io.start;
ioport_resource.end = pcie->io.end;
 
-- 
2.25.1

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


Re: WARNING in hwahc_probe

2020-03-22 Thread Qiujun Huang
The return value of snprintf is longer than expected if the string is
truncated. Bytes need to be checked here.

diff --git a/drivers/staging/wusbcore/host/hwa-hc.c
b/drivers/staging/wusbcore/host/hwa-hc.c
index 8d959e9..1475a48 100644
--- a/drivers/staging/wusbcore/host/hwa-hc.c
+++ b/drivers/staging/wusbcore/host/hwa-hc.c
@@ -680,10 +680,12 @@ static int hwahc_security_create(struct hwahc *hwahc)
break;
}
itr += etd->bLength;
-   bytes += snprintf(buf + bytes, sizeof(buf) - bytes,
- "%s (0x%02x) ",
- wusb_et_name(etd->bEncryptionType),
- etd->bEncryptionValue);
+
+   if (sizeof(buf) > bytes)
+   bytes += snprintf(buf + bytes, sizeof(buf) - bytes,
+   "%s (0x%02x) ",
+   wusb_et_name(etd->bEncryptionType),
+   etd->bEncryptionValue);
wusbhc->ccm1_etd = etd;
}
dev_info(dev, "supported encryption types: %s\n", buf);
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: WARNING in hwahc_probe

2020-03-22 Thread Greg KH
On Sun, Mar 22, 2020 at 03:53:44PM +0800, Qiujun Huang wrote:
> The return value of snprintf is longer than expected if the string is
> truncated. Bytes need to be checked here.
> 
> diff --git a/drivers/staging/wusbcore/host/hwa-hc.c
> b/drivers/staging/wusbcore/host/hwa-hc.c
> index 8d959e9..1475a48 100644
> --- a/drivers/staging/wusbcore/host/hwa-hc.c
> +++ b/drivers/staging/wusbcore/host/hwa-hc.c

This file is no longer in the linux-next tree and will be deleted in the
next kernel release.

Also, no one has this hardware so there's no real security issue here at
all.

And finally, you forgot a signed-off-by line on your patch :(

thanks,

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


Re: WARNING in hwahc_probe

2020-03-22 Thread Qiujun Huang
On Sun, Mar 22, 2020 at 3:58 PM Greg KH  wrote:
>
> On Sun, Mar 22, 2020 at 03:53:44PM +0800, Qiujun Huang wrote:
> > The return value of snprintf is longer than expected if the string is
> > truncated. Bytes need to be checked here.
> >
> > diff --git a/drivers/staging/wusbcore/host/hwa-hc.c
> > b/drivers/staging/wusbcore/host/hwa-hc.c
> > index 8d959e9..1475a48 100644
> > --- a/drivers/staging/wusbcore/host/hwa-hc.c
> > +++ b/drivers/staging/wusbcore/host/hwa-hc.c
>
> This file is no longer in the linux-next tree and will be deleted in the
> next kernel release.
>
> Also, no one has this hardware so there's no real security issue here at
> all.
>
> And finally, you forgot a signed-off-by line on your patch :(

Get that, thanks.

>
> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: vt6656: remove unneeded variable: ret

2020-03-22 Thread John B. Wyatt IV
Remove unneeded variable ret; replace with 0 for the return value.

Update function documentation (comment) on the return status as
suggested by Julia Lawall .

Issue reported by coccinelle (coccicheck).

Signed-off-by: John B. Wyatt IV 
---
 drivers/staging/vt6656/card.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index dc3ab10eb630..05b57a2489a0 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -716,13 +716,11 @@ int vnt_radio_power_off(struct vnt_private *priv)
  *  Out:
  *  none
  *
- * Return Value: true if success; otherwise false
+ * Return Value: 0
  *
  */
 int vnt_radio_power_on(struct vnt_private *priv)
 {
-   int ret = 0;
-
vnt_exit_deep_sleep(priv);
 
vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
@@ -741,7 +739,7 @@ int vnt_radio_power_on(struct vnt_private *priv)
 
vnt_mac_reg_bits_off(priv, MAC_REG_GPIOCTL1, GPIO3_INTMD);
 
-   return ret;
+   return 0;
 }
 
 void vnt_set_bss_mode(struct vnt_private *priv)
-- 
2.25.1

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


[PATCH] staging: vt6656: Use DIV_ROUND_UP macro instead of specific code

2020-03-22 Thread Oscar Carter
Use DIV_ROUND_UP macro instead of specific code with the same purpose.
Also, remove the unused variables.

Signed-off-by: Oscar Carter 
---
 drivers/staging/vt6656/baseband.c | 21 -
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.c 
b/drivers/staging/vt6656/baseband.c
index f18e059ce66b..e2eb2b98a73d 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -22,6 +22,7 @@
  *
  */

+#include 
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
@@ -132,7 +133,6 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 
pkt_type,
 {
unsigned int frame_time;
unsigned int preamble;
-   unsigned int tmp;
unsigned int rate = 0;

if (tx_rate > RATE_54M)
@@ -146,20 +146,11 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 
pkt_type,
else
preamble = 192;

-   frame_time = (frame_length * 80) / rate;
-   tmp = (frame_time * rate) / 80;
-
-   if (frame_length != tmp)
-   frame_time++;
-
+   frame_time = DIV_ROUND_UP(frame_length * 80, rate);
return preamble + frame_time;
}
-   frame_time = (frame_length * 8 + 22) / rate;
-   tmp = ((frame_time * rate) - 22) / 8;
-
-   if (frame_length != tmp)
-   frame_time++;

+   frame_time = DIV_ROUND_UP(frame_length * 8 + 22, rate);
frame_time = frame_time * 4;

if (pkt_type != PK_TYPE_11A)
@@ -213,11 +204,7 @@ void vnt_get_phy_field(struct vnt_private *priv, u32 
frame_length,

break;
case RATE_5M:
-   count = (bit_count * 10) / 55;
-   tmp = (count * 55) / 10;
-
-   if (tmp != bit_count)
-   count++;
+   count = DIV_ROUND_UP(bit_count * 10, 55);

if (preamble_type == 1)
phy->signal = 0x0a;
--
2.20.1

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


Re: [PATCH] staging: vt6656: remove unneeded variable: ret

2020-03-22 Thread Greg Kroah-Hartman
On Sun, Mar 22, 2020 at 02:23:03AM -0700, John B. Wyatt IV wrote:
> Remove unneeded variable ret; replace with 0 for the return value.
> 
> Update function documentation (comment) on the return status as
> suggested by Julia Lawall .
> 
> Issue reported by coccinelle (coccicheck).
> 
> Signed-off-by: John B. Wyatt IV 
> ---
>  drivers/staging/vt6656/card.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
> index dc3ab10eb630..05b57a2489a0 100644
> --- a/drivers/staging/vt6656/card.c
> +++ b/drivers/staging/vt6656/card.c
> @@ -716,13 +716,11 @@ int vnt_radio_power_off(struct vnt_private *priv)
>   *  Out:
>   *  none
>   *
> - * Return Value: true if success; otherwise false
> + * Return Value: 0

If this always returns something, why have it return anything at all?

Why not make this a patch series, doing this, and then fixing up the
callers and the function to not return anything.

thanks,

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


Re: [Outreachy kernel] [PATCH 01/11] Staging: rtl8188eu: hal_com: Add space around operators

2020-03-22 Thread Greg KH
On Sun, Mar 22, 2020 at 03:51:13AM +0530, Shreeya Patel wrote:
> Add space around operators for improving the code
> readability.
> Reported by checkpatch.pl
> 
> git diff -w shows no difference.
> diff of the .o files before and after the changes shows no difference.

There is no need to have these two lines on every changelog comment in
this series :(

And pick a column to line wrap on (usually 72) and stick with that.  You
are using two different ones here, and for this whole series, and it
looks very odd, don't you think?

thanks,

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


Re: [Outreachy kernel] [PATCH 01/11] Staging: rtl8188eu: hal_com: Add space around operators

2020-03-22 Thread Joe Perches
On Sun, 2020-03-22 at 12:27 +0100, Greg KH wrote:
> On Sun, Mar 22, 2020 at 03:51:13AM +0530, Shreeya Patel wrote:
> > Add space around operators for improving the code
> > readability.
> > Reported by checkpatch.pl
> > 
> > git diff -w shows no difference.
> > diff of the .o files before and after the changes shows no difference.
> 
> There is no need to have these two lines on every changelog comment in
> this series :(

In my opinion, there's no need for a series here.

Whitespace only changes _should_ be done all at once.

Whitespace changes _could_ have changed string constants.

So noting that the patch in only whitespace and that
there isn't a difference in object files is useful as
it shows any change has been compiled and tested.


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


[PATCH] staging: greybus: tools: Fix braces {} style

2020-03-22 Thread Simran Singhal
This patch fixes the check reported by checkpatch.pl
for braces {} should be used on all arms of this statement.

Signed-off-by: Simran Singhal 
---
 drivers/staging/greybus/tools/loopback_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/tools/loopback_test.c 
b/drivers/staging/greybus/tools/loopback_test.c
index ba6f905f26fa..d46721502897 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
write_sysfs_val(t->devices[i].sysfs_entry,
"outstanding_operations_max",
t->async_outstanding_operations);
-   } else
+   } else {
write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
+   }
}
 }
 
-- 
2.17.1

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


Re: [greybus-dev] [PATCH] staging: greybus: tools: Fix braces {} style

2020-03-22 Thread Alex Elder
On 3/22/20 12:30 PM, Simran Singhal wrote:
> This patch fixes the check reported by checkpatch.pl
> for braces {} should be used on all arms of this statement.
> 
> Signed-off-by: Simran Singhal 

Looks fine to me.  And I saw no other instances of this in the
Greybus code.  Thanks for the patch.

Reviewed-by: Alex Elder 

> ---
>  drivers/staging/greybus/tools/loopback_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/tools/loopback_test.c 
> b/drivers/staging/greybus/tools/loopback_test.c
> index ba6f905f26fa..d46721502897 100644
> --- a/drivers/staging/greybus/tools/loopback_test.c
> +++ b/drivers/staging/greybus/tools/loopback_test.c
> @@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
>   write_sysfs_val(t->devices[i].sysfs_entry,
>   "outstanding_operations_max",
>   t->async_outstanding_operations);
> - } else
> + } else {
>   write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
> + }
>   }
>  }
>  
> 

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


[PATCH] staging: rtl8723bs: Remove comparisons to NULL in conditionals

2020-03-22 Thread Simran Singhal
Remove comparisons to NULL in conditionals in
drivers/staging/rtl8723bs/core/rtw_ap.c
Issues reported by checkpatch.pl as:
CHECK: Comparison to NULL could be written

Signed-off-by: Simran Singhal 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 30 -
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index a76e81330756..82b977c07205 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -79,7 +79,7 @@ static void update_BCNTIM(struct adapter *padapter)
&tim_ielen,
pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_
);
-   if (p != NULL && tim_ielen > 0) {
+   if (p && tim_ielen > 0) {
tim_ielen += 2;
 
premainder_ie = p + tim_ielen;
@@ -103,7 +103,7 @@ static void update_BCNTIM(struct adapter *padapter)
&tmp_len,
(pnetwork_mlmeext->IELength - 
_BEACON_IE_OFFSET_)
);
-   if (p != NULL)
+   if (p)
offset += tmp_len + 2;
 
/*  get supported rates len */
@@ -112,7 +112,7 @@ static void update_BCNTIM(struct adapter *padapter)
_SUPPORTEDRATES_IE_, &tmp_len,
(pnetwork_mlmeext->IELength - 
_BEACON_IE_OFFSET_)
);
-   if (p !=  NULL)
+   if (p)
offset += tmp_len + 2;
 
/* DS Parameter Set IE, len =3 */
@@ -1036,7 +1036,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
*pbuf,  int len)
&ie_len,
(pbss_network->IELength - _BEACON_IE_OFFSET_)
);
-   if (p !=  NULL) {
+   if (p) {
memcpy(supportRate, p + 2, ie_len);
supportRateNum = ie_len;
}
@@ -1048,7 +1048,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
*pbuf,  int len)
&ie_len,
pbss_network->IELength - _BEACON_IE_OFFSET_
);
-   if (p !=  NULL) {
+   if (p) {
memcpy(supportRate + supportRateNum, p + 2, ie_len);
supportRateNum += ie_len;
}
@@ -1136,8 +1136,8 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
*pbuf,  int len)
break;
}
 
-   if ((p == NULL) || (ie_len == 0))
-   break;
+   if (!p || ie_len == 0)
+   break;
}
 
/* wmm */
@@ -1165,7 +1165,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
*pbuf,  int len)
break;
}
 
-   if ((p == NULL) || (ie_len == 0))
+   if (!p || ie_len == 0)
break;
}
}
@@ -1296,7 +1296,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
*pbuf,  int len)
psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->MacAddress);
if (!psta) {
psta = rtw_alloc_stainfo(&padapter->stapriv, 
pbss_network->MacAddress);
-   if (psta == NULL)
+   if (!psta)
return _FAIL;
}
 
@@ -1453,7 +1453,7 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, 
struct sta_info *psta)
}
 
psetstakey_para = rtw_zmalloc(sizeof(struct set_stakey_parm));
-   if (psetstakey_para == NULL) {
+   if (!psetstakey_para) {
kfree(ph2c);
res = _FAIL;
goto exit;
@@ -1491,12 +1491,12 @@ static int rtw_ap_set_key(
/* DBG_871X("%s\n", __func__); */
 
pcmd = rtw_zmalloc(sizeof(struct cmd_obj));
-   if (pcmd == NULL) {
+   if (!pcmd) {
res = _FAIL;
goto exit;
}
psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm));
-   if (psetkeyparm == NULL) {
+   if (!psetkeyparm) {
kfree(pcmd);
res = _FAIL;
goto exit;
@@ -1668,11 +1668,11 @@ static void update_bcn_wps_ie(struct adapter *padapter)
&wps_ielen
);
 
-   if (pwps_ie == NULL || wps_ielen == 0)
+   if (!pwps_ie || wps_ielen == 0)
return;
 
pwps_ie_src = pmlmepriv->wps_beacon_ie;
-   if (pwps_ie_src == NULL)
+   if (!pwps_ie_src)
return;
 
wps_offset = (uint)(pwps_ie - ie);
@@ -2322,7 +2322,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
for (i = 0; i < chk_alive_num; i++) {
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
 
-   if (psta == NULL) {
+  

Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove comparisons to NULL in conditionals

2020-03-22 Thread Julia Lawall



On Mon, 23 Mar 2020, Simran Singhal wrote:

> Remove comparisons to NULL in conditionals in
> drivers/staging/rtl8723bs/core/rtw_ap.c
> Issues reported by checkpatch.pl as:
> CHECK: Comparison to NULL could be written

The patch also drops some parentheses that are completely unrelated to the
change described here.  These changes should not be done in this patch.

There is no need to give the name of the file in the log message.  One can
see that directly in the patch.  Likewise, it is not necessary to give the
complete message from checkpatch.  Saying that checkpatch identified the
problem is good enough.

A good commit log message should say what you have done and why.  The
message above is missing the "why" part.  Why is it a good idea to remove
the NULL comparisons, beyond that checkpatch said that it was something to
check?

julia

>
> Signed-off-by: Simran Singhal 
> ---
>  drivers/staging/rtl8723bs/core/rtw_ap.c | 30 -
>  1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
> b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index a76e81330756..82b977c07205 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -79,7 +79,7 @@ static void update_BCNTIM(struct adapter *padapter)
>   &tim_ielen,
>   pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_
>   );
> - if (p != NULL && tim_ielen > 0) {
> + if (p && tim_ielen > 0) {
>   tim_ielen += 2;
>
>   premainder_ie = p + tim_ielen;
> @@ -103,7 +103,7 @@ static void update_BCNTIM(struct adapter *padapter)
>   &tmp_len,
>   (pnetwork_mlmeext->IELength - 
> _BEACON_IE_OFFSET_)
>   );
> - if (p != NULL)
> + if (p)
>   offset += tmp_len + 2;
>
>   /*  get supported rates len */
> @@ -112,7 +112,7 @@ static void update_BCNTIM(struct adapter *padapter)
>   _SUPPORTEDRATES_IE_, &tmp_len,
>   (pnetwork_mlmeext->IELength - 
> _BEACON_IE_OFFSET_)
>   );
> - if (p !=  NULL)
> + if (p)
>   offset += tmp_len + 2;
>
>   /* DS Parameter Set IE, len =3 */
> @@ -1036,7 +1036,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
> *pbuf,  int len)
>   &ie_len,
>   (pbss_network->IELength - _BEACON_IE_OFFSET_)
>   );
> - if (p !=  NULL) {
> + if (p) {
>   memcpy(supportRate, p + 2, ie_len);
>   supportRateNum = ie_len;
>   }
> @@ -1048,7 +1048,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
> *pbuf,  int len)
>   &ie_len,
>   pbss_network->IELength - _BEACON_IE_OFFSET_
>   );
> - if (p !=  NULL) {
> + if (p) {
>   memcpy(supportRate + supportRateNum, p + 2, ie_len);
>   supportRateNum += ie_len;
>   }
> @@ -1136,8 +1136,8 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
> *pbuf,  int len)
>   break;
>   }
>
> - if ((p == NULL) || (ie_len == 0))
> - break;
> + if (!p || ie_len == 0)
> + break;
>   }
>
>   /* wmm */
> @@ -1165,7 +1165,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
> *pbuf,  int len)
>   break;
>   }
>
> - if ((p == NULL) || (ie_len == 0))
> + if (!p || ie_len == 0)
>   break;
>   }
>   }
> @@ -1296,7 +1296,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 
> *pbuf,  int len)
>   psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->MacAddress);
>   if (!psta) {
>   psta = rtw_alloc_stainfo(&padapter->stapriv, 
> pbss_network->MacAddress);
> - if (psta == NULL)
> + if (!psta)
>   return _FAIL;
>   }
>
> @@ -1453,7 +1453,7 @@ u8 rtw_ap_set_pairwise_key(struct adapter *padapter, 
> struct sta_info *psta)
>   }
>
>   psetstakey_para = rtw_zmalloc(sizeof(struct set_stakey_parm));
> - if (psetstakey_para == NULL) {
> + if (!psetstakey_para) {
>   kfree(ph2c);
>   res = _FAIL;
>   goto exit;
> @@ -1491,12 +1491,12 @@ static int rtw_ap_set_key(
>   /* DBG_871X("%s\n", __func__); */
>
>   pcmd = rtw_zmalloc(sizeof(struct cmd_obj));
> - if (pcmd == NULL) {
> + if (!pcmd) {
>   res = _FAIL;
>   goto exit;
>   }
>   psetkeyparm = rtw_zmalloc(sizeof(struct setkey_parm));
> - if (psetkeyparm == NULL) {
> + if (!psetkeyparm

Re: [Outreachy kernel] [PATCH 01/11] Staging: rtl8188eu: hal_com: Add space around operators

2020-03-22 Thread Shreeya Patel
On Sun, 2020-03-22 at 08:09 -0700, Joe Perches wrote:
> On Sun, 2020-03-22 at 12:27 +0100, Greg KH wrote:

Hi Greg and Joe,

> > On Sun, Mar 22, 2020 at 03:51:13AM +0530, Shreeya Patel wrote:
> > > Add space around operators for improving the code
> > > readability.
> > > Reported by checkpatch.pl
> > > 
> > > git diff -w shows no difference.
> > > diff of the .o files before and after the changes shows no
> > > difference.
> > 
> > There is no need to have these two lines on every changelog comment
> > in
> > this series :(
> 
Yes I get that.

> In my opinion, there's no need for a series here.
> 
> Whitespace only changes _should_ be done all at once.
> 
> Whitespace changes _could_ have changed string constants.
> 
> So noting that the patch in only whitespace and that
> there isn't a difference in object files is useful as
> it shows any change has been compiled and tested.
> 

Joe, I feel the same thing, there is no need of a patch series
for it but I was given a suggestion that it becomes difficult for the
reviewers to review the patch so it is good to send a patchset instead.

But as you said, we are testing that there is no change in the object
file so we can go ahead with a single patch for all the whitespace
changes.

If you feel this is right then can I go ahead and send a single patch
for it? ( need your or Greg's confirmation before I do it )

Thanks

> 

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


Re: [PATCH v2 08/10] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

2020-03-22 Thread Kuninori Morimoto


Hi Alex

Thank you for your pa

> As all known variants of the Salvator board have the HDMI decoder
> chip (the ADV7482) connected to the SSI4 on R-Car SoC, the ADV7482
> endpoint and the connection definitions are placed in the common board
> file.
> For the same reason, the CLK_C clock line and I2C configuration (similar
> to the ak4613, on the same interface) are added into the common file.
> 
> Signed-off-by: Alexander Riesen 
> Reviewed-by: Geert Uytterhoeven 
(snip)
> @@ -758,8 +769,19 @@ &rcar_sound {
><&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
><&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
><&audio_clk_a>, <&cs2000>,
> -  <&audio_clk_c>,
> +  <&adv7482_hdmi_in>,
><&cpg CPG_CORE CPG_AUDIO_CLK_I>;
> + clock-names = "ssi-all",
> +   "ssi.9", "ssi.8", "ssi.7", "ssi.6",
> +   "ssi.5", "ssi.4", "ssi.3", "ssi.2",
> +   "ssi.1", "ssi.0",
> +   "src.9", "src.8", "src.7", "src.6",
> +   "src.5", "src.4", "src.3", "src.2",
> +   "src.1", "src.0",
> +   "mix.1", "mix.0",
> +   "ctu.1", "ctu.0",
> +   "dvc.0", "dvc.1",
> +   "clk_a", "clk_b", "clk_c", "clk_i";

I think you don't need to overwrite clock-names here in this case ?

Thank you for your help !!

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


Re: [Outreachy kernel] [PATCH] staging: kpc2000: Removing multiple blank lines

2020-03-22 Thread Stefano Brivio
On Sat, 21 Mar 2020 19:34:31 +0530
Simran Singhal  wrote:

> This patch fixes the checkpatch warning by removing multiple blank
> lines.

Actually, you're removing just one. Can you please re-post fixing the
description? Mind that it's going to be a "v2", that is, the second
version of this patch. Please see recent examples on this list about
that.

-- 
Stefano

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


Re: [Outreachy kernel] [PATCH 01/11] Staging: rtl8188eu: hal_com: Add space around operators

2020-03-22 Thread Stefano Brivio
Hi Shreeya,

On Mon, 23 Mar 2020 04:48:08 +0530
Shreeya Patel  wrote:

> On Sun, 2020-03-22 at 08:09 -0700, Joe Perches wrote:
> > On Sun, 2020-03-22 at 12:27 +0100, Greg KH wrote:  
> 
> Hi Greg and Joe,
> 
> > > On Sun, Mar 22, 2020 at 03:51:13AM +0530, Shreeya Patel wrote:  
> > > > Add space around operators for improving the code
> > > > readability.
> > > > Reported by checkpatch.pl
> > > > 
> > > > git diff -w shows no difference.
> > > > diff of the .o files before and after the changes shows no
> > > > difference.  
> > > 
> > > There is no need to have these two lines on every changelog comment
> > > in
> > > this series :(  
> >   
> Yes I get that.
> 
> > In my opinion, there's no need for a series here.
> > 
> > Whitespace only changes _should_ be done all at once.
> > 
> > Whitespace changes _could_ have changed string constants.
> > 
> > So noting that the patch in only whitespace and that
> > there isn't a difference in object files is useful as
> > it shows any change has been compiled and tested.
> >   
> 
> Joe, I feel the same thing, there is no need of a patch series
> for it but I was given a suggestion that it becomes difficult for the
> reviewers to review the patch so it is good to send a patchset instead.

In this case, reviewing the 224 lines you're touching in one shot feels
the same as reviewing them over 11 patches, as the change is always of
the same type. Maybe a single patch is actually even a bit quicker to
review.

Are you sure the suggestion was referring to this, and it wasn't about
different type of changes in the same patch?

-- 
Stefano

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


BUSINESS PROPOSAL !!!

2020-03-22 Thread Abdul Kareem
Dearest Friend

I am Mr Abdul Kareem working with Emirate NBD Bank Dubai,United Arab Emirate as 
Finance Manager.
I have a very profitable Business that relate to you and will benefit both of 
us after completion.
Kindly get back to me for more details.
Awaiting your response.
Regards
Abdul Kareem
DISCLAIMER: This email and any files transmitted with it are intended for the 
named recipient(s) only. It may contain confidential, proprietary or legally 
privileged information. If you are not the intended recipient(s), please 
immediately delete it and you should not read, print, re-transmit or act in 
reliance on any of the contents of this e-mail.This email has been swept by a 
virus software product for the presence of computer viruses. Lee Kum Kee and 
its affiliates will not be liable as a result of any computer virus being 
passed on. -Love the Earth. Think before printing this e-mail.-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 16/17] dt: bindings: net: add microchip,wilc1000.yaml

2020-03-22 Thread Ajay.Kathat
Hi Rob,

On 20/03/20 11:29 pm, Rob Herring wrote:
> 
> On Wed, Mar 11, 2020 at 12:18:50PM +, ajay.kat...@microchip.com wrote:
>> From: Ajay Singh 
>>
>> This file describes the binding details to connect wilc1000 device. It's
>> moved from staging to 'Documentation/devicetree/bindings/net/wireless'
>> path.
>>
>> Signed-off-by: Ajay Singh 
>> ---
>>  .../net/wireless/microchip,wilc1000.yaml  | 72 +++
>>  1 file changed, 72 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml 
>> b/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
>> new file mode 100644
>> index ..bc6cc5d3f347
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml
>> @@ -0,0 +1,72 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/wireless/microchip,wilc1000.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Microchip WILC wireless devicetree bindings
>> +
>> +maintainers:
>> +  - Adham Abozaeid 
>> +  - Ajay Singh 
>> +
>> +description:
>> +  The wilc1000 chips can be connected via SPI or SDIO. This document
>> +  describes the binding to connect wilc devices.
>> +
>> +properties:
>> +  compatible:
>> +const: microchip,wilc1000
>> +
>> +  spi-max-frequency: true
>> +
>> +  interrupts:
>> +maxItems: 1
>> +
>> +  clocks:
>> +description: phandle to the clock connected on rtc clock line.
>> +maxItems: 1
>> +
>> +  clock-names:
>> +const: rtc
>> +
>> +required:
>> +  - compatible
>> +  - interrupts
>> +
>> +examples:
>> +  - |
>> +spi1: spi@fc018000 {
> 
> spi {
> 
>> +  #address-cells = <1>;
>> +  #size-cells = <0>;
>> +  cs-gpios = <&pioB 21 0>;
> 
> Drop this. Not relevant to the example.

Ok.

> 
>> +  wifi@0 {
>> +compatible = "microchip,wilc1000";
>> +spi-max-frequency = <4800>;
>> +reg = <0>;
>> +interrupt-parent = <&pioC>;
>> +interrupts = <27 0>;
>> +clocks = <&pck1>;
>> +clock-names = "rtc";
>> +  };
>> +};
>> +
>> +  - |
>> +mmc1: mmc@fc00 {
> 
> Drop the label. Either drop the unit address or add a 'reg' property to
> match.

Ok. I will drop the label and unit address in this.


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