diff mbox series

[PATCHv2,net] net: ibm: emac: mal: add dcr_unmap to _remove

Message ID 20241008233050.9422-1-rosenp@gmail.com (mailing list archive)
State Accepted
Commit 080ddc22f3b0a58500f87e8e865aabbf96495eea
Delegated to: Netdev Maintainers
Headers show
Series [PATCHv2,net] net: ibm: emac: mal: add dcr_unmap to _remove | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 5 this patch: 5
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 fail Problems with Fixes tag: 1
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/checkpatch warning WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 1d3bb996481e ("Device tree aware EMAC driver")'
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-09--18-00 (tests: 772)

Commit Message

Rosen Penev Oct. 8, 2024, 11:30 p.m. UTC
It's done in probe so it should be done here.

Fixes: 1d3bb996 ("Device tree aware EMAC driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 v2: Rebase and add proper fixes line.
 drivers/net/ethernet/ibm/emac/mal.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Breno Leitao Oct. 9, 2024, 8:23 a.m. UTC | #1
Hello Rosen,

On Tue, Oct 08, 2024 at 04:30:50PM -0700, Rosen Penev wrote:
> It's done in probe so it should be done here.
> 
> Fixes: 1d3bb996 ("Device tree aware EMAC driver")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  v2: Rebase and add proper fixes line.
>  drivers/net/ethernet/ibm/emac/mal.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
> index a93423035325..c634534710d9 100644
> --- a/drivers/net/ethernet/ibm/emac/mal.c
> +++ b/drivers/net/ethernet/ibm/emac/mal.c
> @@ -742,6 +742,8 @@ static void mal_remove(struct platform_device *ofdev)
>  
>  	free_netdev(mal->dummy_dev);
>  
> +	dcr_unmap(mal->dcr_host, 0x100);
> +
>  	dma_free_coherent(&ofdev->dev,
>  			  sizeof(struct mal_descriptor) *
>  			  (NUM_TX_BUFF * mal->num_tx_chans +

The fix per see seems correct, but, there are a few things you might
want to improve:

1) Fixes: format
Your "Fixes:" line does not follow the expected format, as detected by
checkpatch. you might want something as:

	Fixes: 1d3bb996481e ("Device tree aware EMAC driver")


2) The description can be improved. For instance, you say it is done in
probe but not in remove. Why should it be done in remove instead of
removed from probe()? That would help me to review it better, instead of
going into the code and figure it out.

Once you have fixed it, feel free to add:

Reviewed-by: Breno Leitao <leitao@debian.org>
Jakub Kicinski Oct. 10, 2024, 2:28 a.m. UTC | #2
On Wed, 9 Oct 2024 01:23:02 -0700 Breno Leitao wrote:
> Hello Rosen,
> 
> On Tue, Oct 08, 2024 at 04:30:50PM -0700, Rosen Penev wrote:
> > It's done in probe so it should be done here.
> > 
> > Fixes: 1d3bb996 ("Device tree aware EMAC driver")
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  v2: Rebase and add proper fixes line.
> >  drivers/net/ethernet/ibm/emac/mal.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
> > index a93423035325..c634534710d9 100644
> > --- a/drivers/net/ethernet/ibm/emac/mal.c
> > +++ b/drivers/net/ethernet/ibm/emac/mal.c
> > @@ -742,6 +742,8 @@ static void mal_remove(struct platform_device *ofdev)
> >  
> >  	free_netdev(mal->dummy_dev);
> >  
> > +	dcr_unmap(mal->dcr_host, 0x100);
> > +
> >  	dma_free_coherent(&ofdev->dev,
> >  			  sizeof(struct mal_descriptor) *
> >  			  (NUM_TX_BUFF * mal->num_tx_chans +  
> 
> The fix per see seems correct, but, there are a few things you might
> want to improve:
> 
> 1) Fixes: format
> Your "Fixes:" line does not follow the expected format, as detected by
> checkpatch. you might want something as:
> 
> 	Fixes: 1d3bb996481e ("Device tree aware EMAC driver")
> 
> 
> 2) The description can be improved. For instance, you say it is done in
> probe but not in remove. Why should it be done in remove instead of
> removed from probe()? That would help me to review it better, instead of
> going into the code and figure it out.
> 
> Once you have fixed it, feel free to add:
> 
> Reviewed-by: Breno Leitao <leitao@debian.org>

Good points, I'll fix when applying - I want to make sure this gets
into tomorrow's PR 'cause Rosen has patches for net-next depending 
on it.
patchwork-bot+netdevbpf@kernel.org Oct. 10, 2024, 2:30 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  8 Oct 2024 16:30:50 -0700 you wrote:
> It's done in probe so it should be done here.
> 
> Fixes: 1d3bb996 ("Device tree aware EMAC driver")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  v2: Rebase and add proper fixes line.
>  drivers/net/ethernet/ibm/emac/mal.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [PATCHv2,net] net: ibm: emac: mal: add dcr_unmap to _remove
    https://git.kernel.org/netdev/net/c/080ddc22f3b0

You are awesome, thank you!
Rosen Penev Oct. 10, 2024, 2:53 a.m. UTC | #4
On Wed, Oct 9, 2024 at 7:28 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 9 Oct 2024 01:23:02 -0700 Breno Leitao wrote:
> > Hello Rosen,
> >
> > On Tue, Oct 08, 2024 at 04:30:50PM -0700, Rosen Penev wrote:
> > > It's done in probe so it should be done here.
> > >
> > > Fixes: 1d3bb996 ("Device tree aware EMAC driver")
> > > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > > ---
> > >  v2: Rebase and add proper fixes line.
> > >  drivers/net/ethernet/ibm/emac/mal.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
> > > index a93423035325..c634534710d9 100644
> > > --- a/drivers/net/ethernet/ibm/emac/mal.c
> > > +++ b/drivers/net/ethernet/ibm/emac/mal.c
> > > @@ -742,6 +742,8 @@ static void mal_remove(struct platform_device *ofdev)
> > >
> > >     free_netdev(mal->dummy_dev);
> > >
> > > +   dcr_unmap(mal->dcr_host, 0x100);
> > > +
> > >     dma_free_coherent(&ofdev->dev,
> > >                       sizeof(struct mal_descriptor) *
> > >                       (NUM_TX_BUFF * mal->num_tx_chans +
> >
> > The fix per see seems correct, but, there are a few things you might
> > want to improve:
> >
> > 1) Fixes: format
> > Your "Fixes:" line does not follow the expected format, as detected by
> > checkpatch. you might want something as:
> >
> >       Fixes: 1d3bb996481e ("Device tree aware EMAC driver")
> >
> >
> > 2) The description can be improved. For instance, you say it is done in
> > probe but not in remove. Why should it be done in remove instead of
> > removed from probe()? That would help me to review it better, instead of
> > going into the code and figure it out.
> >
> > Once you have fixed it, feel free to add:
> >
> > Reviewed-by: Breno Leitao <leitao@debian.org>
>
> Good points, I'll fix when applying - I want to make sure this gets
> into tomorrow's PR 'cause Rosen has patches for net-next depending
> on it.
Much appreciated.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
index a93423035325..c634534710d9 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -742,6 +742,8 @@  static void mal_remove(struct platform_device *ofdev)
 
 	free_netdev(mal->dummy_dev);
 
+	dcr_unmap(mal->dcr_host, 0x100);
+
 	dma_free_coherent(&ofdev->dev,
 			  sizeof(struct mal_descriptor) *
 			  (NUM_TX_BUFF * mal->num_tx_chans +