mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] mm/cma: Move opening brace to next line for coding style
@ 2023-12-29 15:32 Malkoot Khan
  2023-12-29 15:32 ` [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity Malkoot Khan
  2023-12-29 15:38 ` [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Matthew Wilcox
  0 siblings, 2 replies; 4+ messages in thread
From: Malkoot Khan @ 2023-12-29 15:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Malkoot Khan

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 <engr.mkhan1990@gmail.com>
---
 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


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

* [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity
  2023-12-29 15:32 [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Malkoot Khan
@ 2023-12-29 15:32 ` Malkoot Khan
  2023-12-29 15:39   ` Matthew Wilcox
  2023-12-29 15:38 ` [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Matthew Wilcox
  1 sibling, 1 reply; 4+ messages in thread
From: Malkoot Khan @ 2023-12-29 15:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Malkoot Khan

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

Signed-off-by: Malkoot Khan <engr.mkhan1990@gmail.com>
---
 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


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

* Re: [PATCH 1/2] mm/cma: Move opening brace to next line for coding style
  2023-12-29 15:32 [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Malkoot Khan
  2023-12-29 15:32 ` [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity Malkoot Khan
@ 2023-12-29 15:38 ` Matthew Wilcox
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2023-12-29 15:38 UTC (permalink / raw)
  To: Malkoot Khan; +Cc: akpm, linux-mm, linux-kernel

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 <engr.mkhan1990@gmail.com>
> ---
>  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
> 
> 

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

* Re: [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity
  2023-12-29 15:32 ` [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity Malkoot Khan
@ 2023-12-29 15:39   ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2023-12-29 15:39 UTC (permalink / raw)
  To: Malkoot Khan; +Cc: akpm, linux-mm, linux-kernel

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.

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

end of thread, other threads:[~2023-12-29 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-29 15:32 [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Malkoot Khan
2023-12-29 15:32 ` [PATCH 2/2] mm/cma: Use 'unsigned int' for cma_area_count type clarity Malkoot Khan
2023-12-29 15:39   ` Matthew Wilcox
2023-12-29 15:38 ` [PATCH 1/2] mm/cma: Move opening brace to next line for coding style Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®