DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] raw/skeleton: remove useless check
@ 2022-10-04  8:00 David Marchand
  2022-10-04 12:19 ` Hemant Agrawal
  2022-10-05 19:36 ` David Marchand
  0 siblings, 2 replies; 3+ messages in thread
From: David Marchand @ 2022-10-04  8:00 UTC (permalink / raw)
  To: dev; +Cc: Sachin Saxena, Hemant Agrawal

As reported by Coverity, this check is pointless since dev is already
dereferenced earlier. Besides, dev is passed by the rawdev layer and
can't be NULL.

Note: the issue was probably present before the incriminated commit.
It is unclear why Coverity would start complaining about this now.

Coverity issue: 380991
Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/raw/skeleton/skeleton_rawdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 1d043bec5d..b2ca1cc5cd 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -475,9 +475,6 @@ static int skeleton_rawdev_firmware_status_get(struct rte_rawdev *dev,
 
 	skeldev = skeleton_rawdev_get_priv(dev);
 
-	if (dev == NULL)
-		return -EINVAL;
-
 	if (status_info)
 		memcpy(status_info, &skeldev->fw.firmware_state,
 			sizeof(enum skeleton_firmware_state));
-- 
2.37.3


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

* RE: [PATCH] raw/skeleton: remove useless check
  2022-10-04  8:00 [PATCH] raw/skeleton: remove useless check David Marchand
@ 2022-10-04 12:19 ` Hemant Agrawal
  2022-10-05 19:36 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: Hemant Agrawal @ 2022-10-04 12:19 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: Sachin Saxena (OSS)

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

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

* Re: [PATCH] raw/skeleton: remove useless check
  2022-10-04  8:00 [PATCH] raw/skeleton: remove useless check David Marchand
  2022-10-04 12:19 ` Hemant Agrawal
@ 2022-10-05 19:36 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2022-10-05 19:36 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Sachin Saxena, Hemant Agrawal

On Tue, Oct 4, 2022 at 10:00 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> As reported by Coverity, this check is pointless since dev is already
> dereferenced earlier. Besides, dev is passed by the rawdev layer and
> can't be NULL.
>
> Note: the issue was probably present before the incriminated commit.
> It is unclear why Coverity would start complaining about this now.
>
> Coverity issue: 380991
> Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied, thanks.

-- 
David Marchand


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

end of thread, other threads:[~2022-10-05 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  8:00 [PATCH] raw/skeleton: remove useless check David Marchand
2022-10-04 12:19 ` Hemant Agrawal
2022-10-05 19:36 ` David Marchand

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).