diff mbox series

[net-next,5/8] net: dsa: felix: remove confusing/incorrect comment from felix_setup()

Message ID 20230412124737.2243527-6-vladimir.oltean@nxp.com (mailing list archive)
State Accepted
Commit a9afc3e41c61688e26ba526a1f6c574608ae42d5
Delegated to: Netdev Maintainers
Headers show
Series Ocelot/Felix driver cleanup | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Vladimir Oltean April 12, 2023, 12:47 p.m. UTC
That comment was written prior to knowing that what I was actually
seeing was a manifestation of the bug fixed in commit b4024c9e5c57
("felix: Fix initialization of ioremap resources").

There isn't any particular reason now why the hardware initialization is
done in felix_setup(), so just delete that comment to avoid spreading
misinformation.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/ocelot/felix.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Jacob Keller April 12, 2023, 9:18 p.m. UTC | #1
On 4/12/2023 5:47 AM, Vladimir Oltean wrote:
> That comment was written prior to knowing that what I was actually
> seeing was a manifestation of the bug fixed in commit b4024c9e5c57
> ("felix: Fix initialization of ioremap resources").
> 
> There isn't any particular reason now why the hardware initialization is
> done in felix_setup(), so just delete that comment to avoid spreading
> misinformation.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/dsa/ocelot/felix.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
> index 6dcebcfd71e7..80861ac090ae 100644
> --- a/drivers/net/dsa/ocelot/felix.c
> +++ b/drivers/net/dsa/ocelot/felix.c
> @@ -1550,11 +1550,6 @@ static int felix_connect_tag_protocol(struct dsa_switch *ds,
>  	}
>  }
>  
> -/* Hardware initialization done here so that we can allocate structures with
> - * devm without fear of dsa_register_switch returning -EPROBE_DEFER and causing
> - * us to allocate structures twice (leak memory) and map PCI memory twice
> - * (which will not work).
> - */
>  static int felix_setup(struct dsa_switch *ds)
>  {
>  	struct ocelot *ocelot = ds->priv;

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 6dcebcfd71e7..80861ac090ae 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1550,11 +1550,6 @@  static int felix_connect_tag_protocol(struct dsa_switch *ds,
 	}
 }
 
-/* Hardware initialization done here so that we can allocate structures with
- * devm without fear of dsa_register_switch returning -EPROBE_DEFER and causing
- * us to allocate structures twice (leak memory) and map PCI memory twice
- * (which will not work).
- */
 static int felix_setup(struct dsa_switch *ds)
 {
 	struct ocelot *ocelot = ds->priv;