[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <32BC7615-D278-4EBD-B68B-2891EF996942@volery.com>
Date: Tue, 10 Sep 2019 06:51:42 +0200
From: Sandro Volery <sandro@...ery.com>
To: Joe Perches <joe@...ches.com>
Cc: rspringer@...gle.com, toddpoynor@...gle.com, benchan@...omium.org,
gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: gasket: Use temporaries to reduce line length.
> On 10 Sep 2019, at 00:30, Joe Perches <joe@...ches.com> wrote:
>
> On Mon, 2019-09-09 at 22:28 +0200, Sandro Volery wrote:
>> Using temporaries for gasket_page_table entries to remove scnprintf()
>> statements and reduce line length, as suggested by Joe Perches. Thanks!
>
> nak. Slow down. You broke the code.
>
> Please be _way_ more careful and verify for yourself
> the code you submit _before_ you submit it.
>
> compile/test/verify, twice if necessary.
>
Shoot. I'm sorry I'm just really trying to get into all this...
> You also should have cc'd me on this patch.
>
Will do! I'll submit v2 this afternoon.
>> diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
> []
>> @@ -524,29 +526,25 @@ static ssize_t sysfs_show(struct device *device, struct device_attribute *attr,
>> }
>>
>> type = (enum sysfs_attribute_type)gasket_attr->data.attr_type;
>> + gpt = gasket_dev->page_table[0];
>> switch (type) {
>> case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE:
>> - ret = scnprintf(buf, PAGE_SIZE, "%u\n",
>> - gasket_page_table_num_entries(
>> - gasket_dev->page_table[0]));
>> + val = gasket_page_table_num_simple_entries(gpt);
>
> You likely duplicated this line via copy/paste.
> This should be:
> val = gasket_page_table_num_entries(gpt);
>
Thanks for being patient with me so far... I'd imagine others would've freaked out at me by now :)
Powered by blists - more mailing lists