Skip to contentSkip to conversation

mm/cma: Move opening brace to next line for coding style

PATCH In review Malkoot Khan 2 participants 6 messages Dec 29, 2023 – Dec 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
 mm/cma.c | 1 +
 1 file changed, 1 insertion(+)
mm/cma.c +1 -0
index 2b2494fd6b59..01ccd26e8bc2 100644
@@ -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;
 
Signature · 1 line
2.34.1
#1 lore raw

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.

---
 mm/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/cma.c +1 -1
index 01ccd26e8bc2..dd3c39d30ad6 100644
@@ -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)
Signature · 1 line
2.34.1
#2 lore raw

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

Quoted 1 line · Malkoot Khan

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.

#3 lore raw

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

Dear Matthew Wilcox,

I appreciate your feedback and understand the importance of respecting coding style conventions. I apologize for any inconvenience caused.

As a newcomer to the Linux Kernel community, I am eager to contribute and willing to learn from experienced members like yourself. If you could provide some guidance on specific areas or types of code where contributions are needed and welcomed, I would be grateful. I want to ensure that my efforts align with the community's expectations.

Thank you for your understanding, and I look forward to your valuable guidance.

Best regards,

Malkoot Khan

Quoted 6 lines · Matthew Wilcox
Quoted 1 line · Malkoot Khan

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.

Signature · 2 lines
*Regards:*
*Malkoot Khan*
#4 lore raw
In reply to Malkoot Khan
Quoted 2 lines · Malkoot Khan

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.

Quoted 21 lines
---
 mm/cma.c | 1 +
 1 file changed, 1 insertion(+)
mm/cma.c +1 -0
index 2b2494fd6b59..01ccd26e8bc2 100644
@@ -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;
 
Signature · 1 line
2.34.1
#5 lore raw

Dear Matthew Wilcox,

I hope this email finds you well. My name is Malkoot Khan, and I am a new member of the Linux Kernel contributor community. I am reaching out to express my eagerness to contribute to the kernel and to kindly request your guidance and assistance in this endeavor.

In my initial attempt to contribute, I encountered a situation where the ./scripts/checkpatch.pl tool flagged an error, specifically suggesting the relocation of braces to the next line. Following this advice resolved the issue, but I want to ensure that my approach aligns with the community's best practices.

I would appreciate it if you could review my correction and provide any insights or corrections if needed. I am keen on learning and adhering to the community's coding standards.

Additionally, I recently watched one of your maintainer lectures on YouTube ("https://www.youtube.com/watch?v=LLBrBBImJt4"), which was highly informative and inspiring. It played a significant role in guiding me through the correction process.

Thank you for your time and consideration. I look forward to your valuable guidance as I embark on my journey of contributing to the Linux Kernel.

Best regards,

Malkoot Khan

Quoted 30 lines · Matthew Wilcox
Quoted 2 lines · Malkoot Khan

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.

mm/cma.c bool cma_release(struct cma *cma, const struct page

Quoted 10 lines
---
 mm/cma.c | 1 +
 1 file changed, 1 insertion(+)
mm/cma.c +0 -0
index 2b2494fd6b59..01ccd26e8bc2 100644
@@ -579,6 +579,7 @@ bool cma_release(struct cma *cma, const struct page

*pages,

mm/cma.c bool cma_release(struct cma *cma, const struct page · line 581

Quoted 3 lines
mm/cma.c +0 -0
 }
 
 int cma_for_each_area(int (*it)(struct cma *cma, void *data), void

*data)

Quoted 8 lines
mm/cma.c +1 -1
+
 {
      int i;
 
--

2.34.1

Signature · 2 lines
*Regards:*
*Malkoot Khan*