diff mbox series

[v3] um: Remove double zero check

Message ID 20241025-upstream_branch-v3-1-f6ec670e0206@quicinc.com (mailing list archive)
State Superseded
Headers show
Series [v3] um: Remove double zero check | expand

Commit Message

Shaojie Dong Oct. 25, 2024, 6:45 a.m. UTC
free_pages() performs a parameter null check inside
therefore remove double zero check here.

Signed-off-by: Shaojie Dong <quic_shaojied@quicinc.com>
---
Changes in v3:
- EDITME: fit the git setup and simplify commit description
- Link to v2: https://lore.kernel.org/r/20241025-upstream_branch-v2-1-072009bfa7d0@quicinc.com

Changes in v2:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v1: https://lore.kernel.org/r/20241025-upstream_branch-v1-1-4829506c7cdb@quicinc.com
---
 arch/um/kernel/skas/mmu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


---
base-commit: fd21fa4a912ebbf8a6a341c31d8456f61e7d4170
change-id: 20241025-upstream_branch-06a9ea92948d

Best regards,

Comments

Bjorn Andersson Oct. 31, 2024, 2:37 a.m. UTC | #1
On Fri, Oct 25, 2024 at 02:45:37PM +0800, shaojiedong wrote:

Dmitry asked you to not send multiple versions of a patch within 24
hours, and you seem to have sent the next version 5 hours later...

Perhaps you are unaware that you are Cc'ing the public list
(linux-arm-msm@)? Please do get your patches reviewed on the internal
list before sending more.

> free_pages() performs a parameter null check inside
> therefore remove double zero check here.
> 

It seems correct that the check is unnecessary, but is the impact of
this change worth sending and getting four versions reviewed?

> Signed-off-by: Shaojie Dong <quic_shaojied@quicinc.com>

The author of the commit doesn't match the signed-off-by.

> ---
> Changes in v3:
> - EDITME: fit the git setup and simplify commit description

Drop the EDITME: from the changelog.

> - Link to v2: https://lore.kernel.org/r/20241025-upstream_branch-v2-1-072009bfa7d0@quicinc.com
> 
> Changes in v2:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.

This wasn't updated at all.

Regards,
Bjorn

> - Link to v1: https://lore.kernel.org/r/20241025-upstream_branch-v1-1-4829506c7cdb@quicinc.com
> ---
>  arch/um/kernel/skas/mmu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
> index d3fb506d5bd6084046cf5903c629432cd42b5ab3..0eb5a1d3ba70134f75d9b2af18544fca7248c6d6 100644
> --- a/arch/um/kernel/skas/mmu.c
> +++ b/arch/um/kernel/skas/mmu.c
> @@ -46,8 +46,7 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
>  	return 0;
>  
>   out_free:
> -	if (new_id->stack != 0)
> -		free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
> +	free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
>   out:
>  	return ret;
>  }
> 
> ---
> base-commit: fd21fa4a912ebbf8a6a341c31d8456f61e7d4170
> change-id: 20241025-upstream_branch-06a9ea92948d
> 
> Best regards,
> -- 
> shaojiedong <quic_shaojied@quicinc.com>
>
diff mbox series

Patch

diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index d3fb506d5bd6084046cf5903c629432cd42b5ab3..0eb5a1d3ba70134f75d9b2af18544fca7248c6d6 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -46,8 +46,7 @@  int init_new_context(struct task_struct *task, struct mm_struct *mm)
 	return 0;
 
  out_free:
-	if (new_id->stack != 0)
-		free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
+	free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
  out:
 	return ret;
 }