The Patch fixes the missing a blank line warning
diff mbox series

Message ID 20210211072918.376837-1-adithya.chandrakasan@gmail.com
State New, archived
Headers show
Series
  • The Patch fixes the missing a blank line warning
Related show

Commit Message

Adithya Chandrakasan Feb. 11, 2021, 7:29 a.m. UTC
FILE: mm/util.c:930: WARNING: Missing a blank line after declarations

Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
---
 mm/util.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Hildenbrand Feb. 11, 2021, 10:36 a.m. UTC | #1
^

Please create proper patch subjects. Nobody has a glue what you are 
doing when looking at the subject.

"mm/util: fix ??? warning"

Which raises the question, what is ???

Compiler? static code checker? ... ?


Thanks

On 11.02.21 08:29, Adithya Chandrakasan wrote:
> FILE: mm/util.c:930: WARNING: Missing a blank line after declarations
> 
> Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
> ---
>   mm/util.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/mm/util.c b/mm/util.c
> index 8c9b7d1e7c49..60286876636d 100644
> --- a/mm/util.c
> +++ b/mm/util.c
> @@ -927,6 +927,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
>   	unsigned int len;
>   	struct mm_struct *mm = get_task_mm(task);
>   	unsigned long arg_start, arg_end, env_start, env_end;
> +
>   	if (!mm)
>   		goto out;
>   	if (!mm->arg_end)
>
Adithya Chandrakasan Feb. 11, 2021, 6:20 p.m. UTC | #2
On 2/11/21 2:36 AM, David Hildenbrand wrote:
> ^
>
> Please create proper patch subjects. Nobody has a glue what you are doing when looking at the subject.
>
> "mm/util: fix ??? warning"
>
> Which raises the question, what is ???
>
> Compiler? static code checker? ... ?
>
>
> Thanks
>
> On 11.02.21 08:29, Adithya Chandrakasan wrote:
>> FILE: mm/util.c:930: WARNING: Missing a blank line after declarations
>>
>> Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
>> ---
>>   mm/util.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/util.c b/mm/util.c
>> index 8c9b7d1e7c49..60286876636d 100644
>> --- a/mm/util.c
>> +++ b/mm/util.c
>> @@ -927,6 +927,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
>>       unsigned int len;
>>       struct mm_struct *mm = get_task_mm(task);
>>       unsigned long arg_start, arg_end, env_start, env_end;
>> +
>>       if (!mm)
>>           goto out;
>>       if (!mm->arg_end)
>>
>
>
Hi David,

Thanks for feedback. I have fixed the issues in the patch thread with
change in subject and also log message.

with regards,
Adithya Chandrakasan
FILE: mm/util.c:930:
checkpatch.pl scripts basic coding style issues as below
WARNING: Missing a blank line after declarations

Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
---
 mm/util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/util.c b/mm/util.c
index 8c9b7d1e7c49..60286876636d 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -927,6 +927,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
 	unsigned int len;
 	struct mm_struct *mm = get_task_mm(task);
 	unsigned long arg_start, arg_end, env_start, env_end;
+
 	if (!mm)
 		goto out;
 	if (!mm->arg_end)
David Hildenbrand Feb. 12, 2021, 10:14 a.m. UTC | #3
On 11.02.21 19:20, Adithya Chandrakasan wrote:
> On 2/11/21 2:36 AM, David Hildenbrand wrote:
>> ^
>>
>> Please create proper patch subjects. Nobody has a glue what you are doing when looking at the subject.
>>
>> "mm/util: fix ??? warning"
>>
>> Which raises the question, what is ???
>>
>> Compiler? static code checker? ... ?
>>



>>
>> Thanks
>>
>> On 11.02.21 08:29, Adithya Chandrakasan wrote:
>>> FILE: mm/util.c:930: WARNING: Missing a blank line after declarations
>>>
>>> Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
>>> ---
>>>     mm/util.c | 1 +
>>>     1 file changed, 1 insertion(+)
>>>
>>> diff --git a/mm/util.c b/mm/util.c
>>> index 8c9b7d1e7c49..60286876636d 100644
>>> --- a/mm/util.c
>>> +++ b/mm/util.c
>>> @@ -927,6 +927,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
>>>         unsigned int len;
>>>         struct mm_struct *mm = get_task_mm(task);
>>>         unsigned long arg_start, arg_end, env_start, env_end;
>>> +
>>>         if (!mm)
>>>             goto out;
>>>         if (!mm->arg_end)
>>>
>>
>>
> Hi David,
> 
> Thanks for feedback. I have fixed the issues in the patch thread with
> change in subject and also log message.

Hi,

Please always send patches via proper mails and versioned.

E.g.,

rm *.patch
git format-patch -1 -v2
git send-email --to ... *.patch


The introducing patch is from 2014. So I wonder how you even get a 
checkpatch warning?

a90902531a06a ("proc read mm's {arg,env}_{start,end} with mmap semaphore 
taken.")

Anyhow, maybe just call this patch "mm: util.c: minor coding style fix", 
that makes it clearer that this is really minor and has been in the code 
for a while.

Thanks!
David Hildenbrand Feb. 12, 2021, 10:22 a.m. UTC | #4
On 12.02.21 11:14, David Hildenbrand wrote:
> On 11.02.21 19:20, Adithya Chandrakasan wrote:
>> On 2/11/21 2:36 AM, David Hildenbrand wrote:
>>> ^
>>>
>>> Please create proper patch subjects. Nobody has a glue what you are doing when looking at the subject.
>>>
>>> "mm/util: fix ??? warning"
>>>
>>> Which raises the question, what is ???
>>>
>>> Compiler? static code checker? ... ?
>>>
> 
> 
> 
>>>
>>> Thanks
>>>
>>> On 11.02.21 08:29, Adithya Chandrakasan wrote:
>>>> FILE: mm/util.c:930: WARNING: Missing a blank line after declarations
>>>>
>>>> Signed-off-by: Adithya Chandrakasan <adithya.chandrakasan@gmail.com>
>>>> ---
>>>>      mm/util.c | 1 +
>>>>      1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/mm/util.c b/mm/util.c
>>>> index 8c9b7d1e7c49..60286876636d 100644
>>>> --- a/mm/util.c
>>>> +++ b/mm/util.c
>>>> @@ -927,6 +927,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
>>>>          unsigned int len;
>>>>          struct mm_struct *mm = get_task_mm(task);
>>>>          unsigned long arg_start, arg_end, env_start, env_end;
>>>> +
>>>>          if (!mm)
>>>>              goto out;
>>>>          if (!mm->arg_end)
>>>>
>>>
>>>
>> Hi David,
>>
>> Thanks for feedback. I have fixed the issues in the patch thread with
>> change in subject and also log message.
> 
> Hi,
> 
> Please always send patches via proper mails and versioned.
> 
> E.g.,
> 
> rm *.patch
> git format-patch -1 -v2
> git send-email --to ... *.patch
> 
> 
> The introducing patch is from 2014. So I wonder how you even get a
> checkpatch warning?
> 
> a90902531a06a ("proc read mm's {arg,env}_{start,end} with mmap semaphore
> taken.")

Sorry wrong pointer, it's from 2014

a90902531a06 ("mm: Create utility function for accessing a tasks 
commandline value")

Patch
diff mbox series

diff --git a/mm/util.c b/mm/util.c
index 8c9b7d1e7c49..60286876636d 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -927,6 +927,7 @@  int get_cmdline(struct task_struct *task, char *buffer, int buflen)
 	unsigned int len;
 	struct mm_struct *mm = get_task_mm(task);
 	unsigned long arg_start, arg_end, env_start, env_end;
+
 	if (!mm)
 		goto out;
 	if (!mm->arg_end)