2019-09-07 21:44:37

by Sandro Volery

[permalink] [raw]
Subject: [PATCH] Fixed parentheses malpractice in apex_driver.c

There were some parentheses at the end of lines, which I took care of.
This is my first patch.

Signed-off-by: Sandro Volery <[email protected]>
---
drivers/staging/gasket/apex_driver.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
index 464648ee2036..78ebd590f877 100644
--- a/drivers/staging/gasket/apex_driver.c
+++ b/drivers/staging/gasket/apex_driver.c
@@ -527,17 +527,20 @@ static ssize_t sysfs_show(struct device *device, struct device_attribute *attr,
switch (type) {
case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE:
ret = scnprintf(buf, PAGE_SIZE, "%u\n",
- gasket_page_table_num_entries(
+ gasket_page_table_num_entries
+ (
gasket_dev->page_table[0]));
break;
case ATTR_KERNEL_HIB_SIMPLE_PAGE_TABLE_SIZE:
ret = scnprintf(buf, PAGE_SIZE, "%u\n",
- gasket_page_table_num_simple_entries(
+ gasket_page_table_num_simple_entries
+ (
gasket_dev->page_table[0]));
break;
case ATTR_KERNEL_HIB_NUM_ACTIVE_PAGES:
ret = scnprintf(buf, PAGE_SIZE, "%u\n",
- gasket_page_table_num_active_pages(
+ gasket_page_table_num_active_pages
+ (
gasket_dev->page_table[0]));
break;
default:
--
2.23.0


2019-09-08 21:05:11

by Sandro Volery

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c



> On 7 Sep 2019, at 16:52, Dan Carpenter <[email protected]> wrote:
>

Alright, thanks!

Some stupid other question:

On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.

How can I avoid that?

Regards,
Sandro V.

2019-09-08 21:32:27

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

You need a subject prefix. It should be something like:

[PATCH] Staging: gasket: Fix parentheses malpractice in apex_driver.c

Generally "Fix" is considered better style than "Fixed". We aren't
going to care about that in staging, but the patch prefix is mandatory
so you will need to redo it anyway and might as well fix that as well.

On Fri, Sep 06, 2019 at 08:38:01PM +0200, volery wrote:
> There were some parentheses at the end of lines, which I took care of.
> This is my first patch.
^^^^^^^^^^^^^^^^^^^^^^

Put this sort of comments after the --- cut off line

>
> Signed-off-by: Sandro Volery <[email protected]>
> ---
^^^
Put it here. It will be removed when we apply the patch so it won't
be recorded in the git log.

> drivers/staging/gasket/apex_driver.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)

Joe's comments are, of course, correct as well.

regards,
dan carpenter

2019-09-08 22:14:37

by Sandro Volery

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c



> On 7 Sep 2019, at 16:39, Dan Carpenter <[email protected]> wrote:
>
> You need a subject prefix. It should be something like:
>
> [PATCH] Staging: gasket: Fix parentheses malpractice in apex_driver.c
>

Thanks for the reply! I'll try to do that better for my next patch.

> Generally "Fix" is considered better style than "Fixed". We aren't
> going to care about that in staging, but the patch prefix is mandatory
> so you will need to redo it anyway and might as well fix that as well.
>
>> On Fri, Sep 06, 2019 at 08:38:01PM +0200, volery wrote:
>> There were some parentheses at the end of lines, which I took care of.
>> This is my first patch.
> ^^^^^^^^^^^^^^^^^^^^^^
> Put this sort of comments after the --- cut off line
>
>>
>> Signed-off-by: Sandro Volery <[email protected]>
>> ---
> ^^^
> Put it here. It will be removed when we apply the patch so it won't
> be recorded in the git log.
>

Alright :)

>> drivers/staging/gasket/apex_driver.c | 9 ++++++---
>> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> Joe's comments are, of course, correct as well.
>
> regards,
> dan carpenter
>

I'll take a look at Joe's suggestions too sometime tonight. I'd feel kinda bad tho if I just apply his work and send it in?

- Sandro Volery

2019-09-08 22:23:05

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

On Sat, Sep 07, 2019 at 04:48:21PM +0200, Sandro Volery wrote:
> > Joe's comments are, of course, correct as well.
> >
> > regards,
> > dan carpenter
> >
>
> I'll take a look at Joe's suggestions too sometime tonight. I'd feel kinda bad tho if I just apply his work and send it in?

Don't feel bad. Just do it. Give him credit in the commit message if
you want. "Thanks to Joe Perches for his help."

I sometimes give people word for word patches and they don't copy it
exactly and I wonder if this is why... My exact patch was the best one.

regards,
dan carpenter


2019-09-08 23:24:57

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
> On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.

How does checkpatch complain?
There is no connection between patchwork
and checkpatch.

And do please set your email client to use shorter line lengths
or remember to add returns.

72 or so is typical.

2019-09-08 23:58:16

by Sandro Volery

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c



> On 7 Sep 2019, at 17:44, Joe Perches <[email protected]> wrote:
>
> On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
>> On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.
>
> How does checkpatch complain?
> There is no connection between patchwork
> and checkpatch.

Checkpatch tells me that I haven't used 'volery' as
my signed off name.


>
> And do please set your email client to use shorter line lengths
> or remember to add returns.
>
> 72 or so is typical.
>

Alright! Using my phone right now as I
am out of office but will do :)

2019-09-09 00:03:32

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

On Sat, 2019-09-07 at 17:56 +0200, Sandro Volery wrote:
> > On 7 Sep 2019, at 17:44, Joe Perches <[email protected]> wrote:
> >
> > On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
> > > On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.
> >
> > How does checkpatch complain?
> > There is no connection between patchwork
> > and checkpatch.
>
> Checkpatch tells me that I haven't used 'volery' as
> my signed off name.

Please send the both the patch and the actual checkpatch output
you get when running 'perl ./scripts/checkpatch.pl <patch>'

If this patch is a commit in your own local git tree:

$ git format-patch -1 --stdout <commit_id> > tmp
$ perl ./scripts/checkpatch.pl --strict tmp

and send tmp and the checkpatch output.


2019-09-09 00:06:32

by Sandro Volery

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

Alright, I'll do that when I get home tonight!

Thanks,
Sandro V

> On 7 Sep 2019, at 18:08, Joe Perches <[email protected]> wrote:
>
> On Sat, 2019-09-07 at 17:56 +0200, Sandro Volery wrote:
>>>> On 7 Sep 2019, at 17:44, Joe Perches <[email protected]> wrote:
>>>
>>> On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
>>>> On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.
>>>
>>> How does checkpatch complain?
>>> There is no connection between patchwork
>>> and checkpatch.
>>
>> Checkpatch tells me that I haven't used 'volery' as
>> my signed off name.
>
> Please send the both the patch and the actual checkpatch output
> you get when running 'perl ./scripts/checkpatch.pl <patch>'
>
> If this patch is a commit in your own local git tree:
>
> $ git format-patch -1 --stdout <commit_id> > tmp
> $ perl ./scripts/checkpatch.pl --strict tmp
>
> and send tmp and the checkpatch output.
>
>

2019-09-10 18:33:28

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c

On Sat, 2019-09-07 at 18:12 +0200, Sandro Volery wrote:
> Alright, I'll do that when I get home tonight!

I'm going to assume this is not an actual problem.

> Thanks,
> Sandro V
>
> > On 7 Sep 2019, at 18:08, Joe Perches <[email protected]> wrote:
> >
> > On Sat, 2019-09-07 at 17:56 +0200, Sandro Volery wrote:
> > > > > On 7 Sep 2019, at 17:44, Joe Perches <[email protected]> wrote:
> > > >
> > > > On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
> > > > > On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.
> > > >
> > > > How does checkpatch complain?
> > > > There is no connection between patchwork
> > > > and checkpatch.
> > >
> > > Checkpatch tells me that I haven't used 'volery' as
> > > my signed off name.
> >
> > Please send the both the patch and the actual checkpatch output
> > you get when running 'perl ./scripts/checkpatch.pl <patch>'
> >
> > If this patch is a commit in your own local git tree:
> >
> > $ git format-patch -1 --stdout <commit_id> > tmp
> > $ perl ./scripts/checkpatch.pl --strict tmp
> >
> > and send tmp and the checkpatch output.
> >
> >

2019-09-10 18:35:28

by Sandro Volery

[permalink] [raw]
Subject: Re: [PATCH] Fixed parentheses malpractice in apex_driver.c



> On 9 Sep 2019, at 18:15, Joe Perches <[email protected]> wrote:
>
> On Sat, 2019-09-07 at 18:12 +0200, Sandro Volery wrote:
>> Alright, I'll do that when I get home tonight!
>
> I'm going to assume this is not an actual problem.
>

Oh yeah I'm sorry, I was all busy reading documentations
about the Kernel and stuff ;)
I got it to work, I actually just had my gitconfig name set as 'volery'.

Thanks




>> Thanks,
>> Sandro V
>>
>>>> On 7 Sep 2019, at 18:08, Joe Perches <[email protected]> wrote:
>>>
>>> On Sat, 2019-09-07 at 17:56 +0200, Sandro Volery wrote:
>>>>>> On 7 Sep 2019, at 17:44, Joe Perches <[email protected]> wrote:
>>>>>
>>>>> On Sat, 2019-09-07 at 17:34 +0200, Sandro Volery wrote:
>>>>>> On patchwork I entered 'volery' as my username because I didn't know better, and now checkpatch always complains when I add 'signed-off-by' with my actual full name.
>>>>>
>>>>> How does checkpatch complain?
>>>>> There is no connection between patchwork
>>>>> and checkpatch.
>>>>
>>>> Checkpatch tells me that I haven't used 'volery' as
>>>> my signed off name.
>>>
>>> Please send the both the patch and the actual checkpatch output
>>> you get when running 'perl ./scripts/checkpatch.pl <patch>'
>>>
>>> If this patch is a commit in your own local git tree:
>>>
>>> $ git format-patch -1 --stdout <commit_id> > tmp
>>> $ perl ./scripts/checkpatch.pl --strict tmp
>>>
>>> and send tmp and the checkpatch output.
>>>
>>>
>