2023-12-29 15:32:52

by Malkoot Khan

[permalink] [raw]
Subject: [PATCH 1/2] mm/cma: Move opening brace to next line for coding style

Move the opening brace of a function definition 'cma_for_each_area'
to the next line which resolved the error

Signed-off-by: Malkoot Khan <[email protected]>
---
mm/cma.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/mm/cma.c b/mm/cma.c
index 2b2494fd6b59..01ccd26e8bc2 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -579,6 +579,7 @@ bool cma_release(struct cma *cma, const struct page *pages,
}

int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
+
{
int i;

--
2.34.1



2023-12-29 15:33:06

by Malkoot Khan

[permalink] [raw]
Subject: [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity

Replace 'unsigned' with 'unsigned int' for the variable cma_area_count.

Signed-off-by: Malkoot Khan <[email protected]>
---
mm/cma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/cma.c b/mm/cma.c
index 01ccd26e8bc2..dd3c39d30ad6 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -37,7 +37,7 @@
#include "cma.h"

struct cma cma_areas[MAX_CMA_AREAS];
-unsigned cma_area_count;
+unsigned int cma_area_count;
static DEFINE_MUTEX(cma_mutex);

phys_addr_t cma_get_base(const struct cma *cma)
--
2.34.1


2023-12-29 15:38:57

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH 1/2] mm/cma: Move opening brace to next line for coding style

On Fri, Dec 29, 2023 at 03:32:37PM +0000, Malkoot Khan wrote:
> Move the opening brace of a function definition 'cma_for_each_area'
> to the next line which resolved the error

What error? This seems like the _wrong_ coding style to me.

> Signed-off-by: Malkoot Khan <[email protected]>
> ---
> mm/cma.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index 2b2494fd6b59..01ccd26e8bc2 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -579,6 +579,7 @@ bool cma_release(struct cma *cma, const struct page *pages,
> }
>
> int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
> +
> {
> int i;
>
> --
> 2.34.1
>
>

2023-12-29 15:39:43

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity

On Fri, Dec 29, 2023 at 03:32:38PM +0000, Malkoot Khan wrote:
> Replace 'unsigned' with 'unsigned int' for the variable cma_area_count.

Please don't run coding style tools over other people's code. Such
changes are generally unwelcome.