* [PATCH] common/cnxk: fix incorrect error checking
@ 2021-12-21 8:02 Weiguo Li
2022-01-21 19:28 ` Tomasz Duszynski
2022-01-22 6:49 ` [PATCH v2] " Weiguo Li
0 siblings, 2 replies; 4+ messages in thread
From: Weiguo Li @ 2021-12-21 8:02 UTC (permalink / raw)
To: jerinj; +Cc: tduszynski, dev
Fixes: 804c108b039a ("common/cnxk: set BPHY IRQ handler")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/common/cnxk/roc_bphy_irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
index f4e9b341af..5ba73c98dc 100644
--- a/drivers/common/cnxk/roc_bphy_irq.c
+++ b/drivers/common/cnxk/roc_bphy_irq.c
@@ -261,9 +261,9 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num,
CPU_SET(curr_cpu, &intr_cpuset);
retval = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
&intr_cpuset);
- if (rc < 0) {
+ if (retval < 0) {
plt_err("Failed to set affinity mask");
- return rc;
+ return retval;
}
irq_usr.isr_base = (uint64_t)roc_bphy_intr_handler;
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] common/cnxk: fix incorrect error checking
2021-12-21 8:02 [PATCH] common/cnxk: fix incorrect error checking Weiguo Li
@ 2022-01-21 19:28 ` Tomasz Duszynski
2022-01-22 6:49 ` [PATCH v2] " Weiguo Li
1 sibling, 0 replies; 4+ messages in thread
From: Tomasz Duszynski @ 2022-01-21 19:28 UTC (permalink / raw)
To: Weiguo Li; +Cc: dev, jerinj
On Tue, Dec 21, 2021 at 04:02:20PM +0800, Weiguo Li wrote:
> Fixes: 804c108b039a ("common/cnxk: set BPHY IRQ handler")
>
> Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
> ---
> drivers/common/cnxk/roc_bphy_irq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
> index f4e9b341af..5ba73c98dc 100644
> --- a/drivers/common/cnxk/roc_bphy_irq.c
> +++ b/drivers/common/cnxk/roc_bphy_irq.c
> @@ -261,9 +261,9 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num,
> CPU_SET(curr_cpu, &intr_cpuset);
> retval = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
> &intr_cpuset);
Use rc instead. This will generate less changes and will match
local conventions.
> - if (rc < 0) {
> + if (retval < 0) {
> plt_err("Failed to set affinity mask");
> - return rc;
> + return retval;
> }
>
> irq_usr.isr_base = (uint64_t)roc_bphy_intr_handler;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] common/cnxk: fix incorrect error checking
2021-12-21 8:02 [PATCH] common/cnxk: fix incorrect error checking Weiguo Li
2022-01-21 19:28 ` Tomasz Duszynski
@ 2022-01-22 6:49 ` Weiguo Li
2022-01-23 12:42 ` Jerin Jacob
1 sibling, 1 reply; 4+ messages in thread
From: Weiguo Li @ 2022-01-22 6:49 UTC (permalink / raw)
To: jerinj; +Cc: tduszynski, dev
Fixes: 804c108b039a ("common/cnxk: set BPHY IRQ handler")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/common/cnxk/roc_bphy_irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
index f4e9b341af..f4954d2a28 100644
--- a/drivers/common/cnxk/roc_bphy_irq.c
+++ b/drivers/common/cnxk/roc_bphy_irq.c
@@ -259,7 +259,7 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num,
CPU_ZERO(&intr_cpuset);
CPU_SET(curr_cpu, &intr_cpuset);
- retval = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
+ rc = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
&intr_cpuset);
if (rc < 0) {
plt_err("Failed to set affinity mask");
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] common/cnxk: fix incorrect error checking
2022-01-22 6:49 ` [PATCH v2] " Weiguo Li
@ 2022-01-23 12:42 ` Jerin Jacob
0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2022-01-23 12:42 UTC (permalink / raw)
To: Weiguo Li, Ferruh Yigit; +Cc: Jerin Jacob, Tomasz Duszynski, dpdk-dev
On Sat, Jan 22, 2022 at 12:20 PM Weiguo Li <liwg06@foxmail.com> wrote:
>
> Fixes: 804c108b039a ("common/cnxk: set BPHY IRQ handler")
Cc: stable@dpdk.org
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> ---
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
> drivers/common/cnxk/roc_bphy_irq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
> index f4e9b341af..f4954d2a28 100644
> --- a/drivers/common/cnxk/roc_bphy_irq.c
> +++ b/drivers/common/cnxk/roc_bphy_irq.c
> @@ -259,7 +259,7 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num,
>
> CPU_ZERO(&intr_cpuset);
> CPU_SET(curr_cpu, &intr_cpuset);
> - retval = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
> + rc = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
> &intr_cpuset);
> if (rc < 0) {
> plt_err("Failed to set affinity mask");
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-23 12:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 8:02 [PATCH] common/cnxk: fix incorrect error checking Weiguo Li
2022-01-21 19:28 ` Tomasz Duszynski
2022-01-22 6:49 ` [PATCH v2] " Weiguo Li
2022-01-23 12:42 ` Jerin Jacob
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).