DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mana: fix uninitialized scalar variable
@ 2024-06-10 21:43 mmaatuq
  2024-06-12 18:23 ` [PATCH v3] " Mahmoud Maatuq
  2024-06-13 18:30 ` [PATCH v4] " Mahmoud Maatuq
  0 siblings, 2 replies; 7+ messages in thread
From: mmaatuq @ 2024-06-10 21:43 UTC (permalink / raw)
  To: Long Li; +Cc: dev, mmaatuq

in case we didn't enter or finished the loop without getting ifname we
ret shouldn't have an arbitray value.

Coverity issue: 424690

Signed-off-by: mmaatuq <mahmoudmatook.mm@gmail.com>
---
 drivers/net/mana/mana.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 68c625258e..c37c4e3444 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
 static int
 mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE])
 {
-	int ret;
+	int ret = -ENODEV;
 	DIR *dir;
 	struct dirent *dent;
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3] net/mana: fix uninitialized scalar variable
  2024-06-10 21:43 [PATCH] net/mana: fix uninitialized scalar variable mmaatuq
@ 2024-06-12 18:23 ` Mahmoud Maatuq
  2024-06-12 23:39   ` Long Li
  2024-06-13 13:44   ` Ferruh Yigit
  2024-06-13 18:30 ` [PATCH v4] " Mahmoud Maatuq
  1 sibling, 2 replies; 7+ messages in thread
From: Mahmoud Maatuq @ 2024-06-12 18:23 UTC (permalink / raw)
  To: Long Li; +Cc: dev, mmaatuq

From: mmaatuq <mahmoudmatook.mm@gmail.com>

in case we didn't enter or finished the loop without getting ifname we
ret shouldn't have an arbitrary value.

Coverity issue: 424690
Fixes: 84497839d9ca ("net/mana: support MTU update")
Cc: longli@microsoft.com

Signed-off-by: mmaatuq <mahmoudmatook.mm@gmail.com>
---
v3:
 * add Fixes and Cc tags
v2:
* Fixed typo in word "arbitrary"
---
 drivers/net/mana/mana.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 68c625258e..c37c4e3444 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
 static int
 mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE])
 {
-	int ret;
+	int ret = -ENODEV;
 	DIR *dir;
 	struct dirent *dent;

--
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v3] net/mana: fix uninitialized scalar variable
  2024-06-12 18:23 ` [PATCH v3] " Mahmoud Maatuq
@ 2024-06-12 23:39   ` Long Li
  2024-06-13 13:44   ` Ferruh Yigit
  1 sibling, 0 replies; 7+ messages in thread
From: Long Li @ 2024-06-12 23:39 UTC (permalink / raw)
  To: Mahmoud Maatuq; +Cc: dev

> Subject: [PATCH v3] net/mana: fix uninitialized scalar variable
> 
> [You don't often get email from mahmoudmatook.mm@gmail.com. Learn why
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> From: mmaatuq <mahmoudmatook.mm@gmail.com>
> 
> in case we didn't enter or finished the loop without getting ifname we ret
> shouldn't have an arbitrary value.
> 
> Coverity issue: 424690
> Fixes: 84497839d9ca ("net/mana: support MTU update")
> Cc: longli@microsoft.com
> 
> Signed-off-by: mmaatuq <mahmoudmatook.mm@gmail.com>

Thank you.

Reviewed-by: Long Li <longli@microsoft.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] net/mana: fix uninitialized scalar variable
  2024-06-12 18:23 ` [PATCH v3] " Mahmoud Maatuq
  2024-06-12 23:39   ` Long Li
@ 2024-06-13 13:44   ` Ferruh Yigit
  1 sibling, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2024-06-13 13:44 UTC (permalink / raw)
  To: Mahmoud Maatuq, Long Li; +Cc: dev

On 6/12/2024 7:23 PM, Mahmoud Maatuq wrote:
> From: mmaatuq <mahmoudmatook.mm@gmail.com>
> 
> in case we didn't enter or finished the loop without getting ifname we
> ret shouldn't have an arbitrary value.
> 
> Coverity issue: 424690
> Fixes: 84497839d9ca ("net/mana: support MTU update")
> Cc: longli@microsoft.com
> 
> Signed-off-by: mmaatuq <mahmoudmatook.mm@gmail.com>
>

Hi Mahmoud,

According to Developer Certificate of Origin [1] that DPDK adopts [2],
please use full name in the sign off.


[1]
http://developercertificate.org/

[2]
https://old.dpdk.org/dev#send


> ---
> v3:
>  * add Fixes and Cc tags
> v2:
> * Fixed typo in word "arbitrary"
> ---
>  drivers/net/mana/mana.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
> index 68c625258e..c37c4e3444 100644
> --- a/drivers/net/mana/mana.c
> +++ b/drivers/net/mana/mana.c
> @@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
>  static int
>  mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE])
>  {
> -	int ret;
> +	int ret = -ENODEV;
>  	DIR *dir;
>  	struct dirent *dent;
> 
> --
> 2.43.0
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v4] net/mana: fix uninitialized scalar variable
  2024-06-10 21:43 [PATCH] net/mana: fix uninitialized scalar variable mmaatuq
  2024-06-12 18:23 ` [PATCH v3] " Mahmoud Maatuq
@ 2024-06-13 18:30 ` Mahmoud Maatuq
  2024-06-14  5:47   ` Long Li
  1 sibling, 1 reply; 7+ messages in thread
From: Mahmoud Maatuq @ 2024-06-13 18:30 UTC (permalink / raw)
  To: Long Li; +Cc: dev, Mahmoud Maatuq

in case we didn't enter or finished the loop without getting ifname we
ret shouldn't have an arbitrary value.

Coverity issue: 424690
Fixes: 84497839d9ca ("net/mana: support MTU update")
Cc: longli@microsoft.com

Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
---
v4:
* used full name in the sign off
v3:
 * add Fixes and Cc tags
v2:
* Fixed typo in word "arbitrary"
---
 drivers/net/mana/mana.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 68c625258e..c37c4e3444 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)
 static int
 mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE])
 {
-	int ret;
+	int ret = -ENODEV;
 	DIR *dir;
 	struct dirent *dent;

--
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v4] net/mana: fix uninitialized scalar variable
  2024-06-13 18:30 ` [PATCH v4] " Mahmoud Maatuq
@ 2024-06-14  5:47   ` Long Li
  2024-07-05 21:10     ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Long Li @ 2024-06-14  5:47 UTC (permalink / raw)
  To: Mahmoud Maatuq; +Cc: dev

> Subject: [PATCH v4] net/mana: fix uninitialized scalar variable
> 
> [You don't often get email from mahmoudmatook.mm@gmail.com. Learn why
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> in case we didn't enter or finished the loop without getting ifname we ret
> shouldn't have an arbitrary value.
> 
> Coverity issue: 424690
> Fixes: 84497839d9ca ("net/mana: support MTU update")
> Cc: longli@microsoft.com
> 
> Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>

Reviewed-by: Long Li <longli@microsoft.com>

> ---
> v4:
> * used full name in the sign off
> v3:
>  * add Fixes and Cc tags
> v2:
> * Fixed typo in word "arbitrary"
> ---
>  drivers/net/mana/mana.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index
> 68c625258e..c37c4e3444 100644
> --- a/drivers/net/mana/mana.c
> +++ b/drivers/net/mana/mana.c
> @@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev
> __rte_unused)  static int  mana_get_ifname(const struct mana_priv *priv, char
> (*ifname)[IF_NAMESIZE])  {
> -       int ret;
> +       int ret = -ENODEV;
>         DIR *dir;
>         struct dirent *dent;
> 
> --
> 2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v4] net/mana: fix uninitialized scalar variable
  2024-06-14  5:47   ` Long Li
@ 2024-07-05 21:10     ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2024-07-05 21:10 UTC (permalink / raw)
  To: Long Li, Mahmoud Maatuq; +Cc: dev

On 6/14/2024 6:47 AM, Long Li wrote:
>> Subject: [PATCH v4] net/mana: fix uninitialized scalar variable
>>
>> [You don't often get email from mahmoudmatook.mm@gmail.com. Learn why
>> this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>
>> in case we didn't enter or finished the loop without getting ifname we ret
>> shouldn't have an arbitrary value.
>>
>> Coverity issue: 424690
>> Fixes: 84497839d9ca ("net/mana: support MTU update")
>> Cc: longli@microsoft.com
>>
>> Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@gmail.com>
> 
> Reviewed-by: Long Li <longli@microsoft.com>
> 

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-05 21:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10 21:43 [PATCH] net/mana: fix uninitialized scalar variable mmaatuq
2024-06-12 18:23 ` [PATCH v3] " Mahmoud Maatuq
2024-06-12 23:39   ` Long Li
2024-06-13 13:44   ` Ferruh Yigit
2024-06-13 18:30 ` [PATCH v4] " Mahmoud Maatuq
2024-06-14  5:47   ` Long Li
2024-07-05 21:10     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).