netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] octeontx2-af: cn10k: Identical code for different branches
@ 2021-02-12 20:01 Gustavo A. R. Silva
  2021-02-14  2:46 ` [EXT] " Geethasowjanya Akula
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2021-02-12 20:01 UTC (permalink / raw)
  To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
	hariprasad, Subbaraya Sundeep, David S. Miller, Jakub Kicinski
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

Hi,

In file drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c, function rvu_dbg_init()
the same code is executed for both branches:

2431         if (is_rvu_otx2(rvu))
2432                 debugfs_create_file("rvu_pf_cgx_map", 0444, rvu->rvu_dbg.root,
2433                                     rvu, &rvu_dbg_rvu_pf_cgx_map_fops);
2434         else
2435                 debugfs_create_file("rvu_pf_cgx_map", 0444, rvu->rvu_dbg.root,
2436                                     rvu, &rvu_dbg_rvu_pf_cgx_map_fops);

This issue was introduced by commit 91c6945ea1f9 ("octeontx2-af: cn10k: Add RPM MAC support")

What's the right solution for this?

Thanks
---
Gustavo

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

* Re: [EXT] [bug report] octeontx2-af: cn10k: Identical code for different branches
  2021-02-12 20:01 [bug report] octeontx2-af: cn10k: Identical code for different branches Gustavo A. R. Silva
@ 2021-02-14  2:46 ` Geethasowjanya Akula
  0 siblings, 0 replies; 2+ messages in thread
From: Geethasowjanya Akula @ 2021-02-14  2:46 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Sunil Kovvuri Goutham, Linu Cherian,
	Jerin Jacob Kollanukkaran, Hariprasad Kelam,
	Subbaraya Sundeep Bhatta, David S. Miller, Jakub Kicinski
  Cc: netdev, linux-kernel

Hi Gustavo,

Please see inline.


________________________________________
>From: Gustavo A. R. Silva <gustavoars@kernel.org>
>Sent: Saturday, February 13, 2021 1:31 AM
>To: Sunil Kovvuri Goutham; Linu Cherian; Geethasowjanya Akula; Jerin Jacob >Kollanukkaran; Hariprasad Kelam; Subbaraya Sundeep Bhatta; David S. Miller; Jakub >Kicinski
>Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Gustavo A. R. Silva
>Subject: [EXT] [bug report] octeontx2-af: cn10k: Identical code for different branches

>External Email

----------------------------------------------------------------------
Hi,

>In file drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c, function rvu_dbg_init()
>the same code is executed for both branches:

>2431         if (is_rvu_otx2(rvu))
>2432                 debugfs_create_file("rvu_pf_cgx_map", 0444, rvu->rvu_dbg.root,
>2433                                     rvu, &rvu_dbg_rvu_pf_cgx_map_fops);
>2434         else
>2435                 debugfs_create_file("rvu_pf_cgx_map", 0444, rvu->rvu_dbg.root,
>2436                                     rvu, &rvu_dbg_rvu_pf_cgx_map_fops);

>This issue was introduced by commit 91c6945ea1f9 ("octeontx2-af: cn10k: Add RPM >MAC support")

>What's the right solution for this?
Thanks Gustavo for pointing out.  below is the right cod for else conduction.

else
      debugfs_create_file("rvu_pf_rpm_map", 0444, rvu->rvu_dbg.root,
                                    rvu, &rvu_dbg_rvu_pf_cgx_map_fops);

Thanks
---
Gustavo

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

end of thread, other threads:[~2021-02-14  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 20:01 [bug report] octeontx2-af: cn10k: Identical code for different branches Gustavo A. R. Silva
2021-02-14  2:46 ` [EXT] " Geethasowjanya Akula

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