Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476944 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-09-05 22:20 +0200 |
| Last post | 2016-09-06 16:30 +0200 |
| Articles | 9 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 0/7] ACPI-APEI-HEST: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-05 22:20 +0200
[PATCH 6/7] ACPI-APEI-HEST: Reduce the scope for a variable in acpi_hest_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-05 22:30 +0200
[PATCH 7/7] ACPI-APEI-HEST: Rename jump labels in hest_parse_ghes() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-05 22:30 +0200
[PATCH 5/7] ACPI-APEI-HEST: Rename jump labels in acpi_hest_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-05 22:30 +0200
[PATCH 4/7] ACPI-APEI-HEST: Rename jump labels in hest_ghes_dev_register() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-05 22:30 +0200
Re: [PATCH 0/7] ACPI-APEI-HEST: Fine-tuning for three function implementations "Rafael J. Wysocki" <rafael@kernel.org> - 2016-09-05 23:50 +0200
Re: ACPI-APEI-HEST: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-06 05:40 +0200
Re: ACPI-APEI-HEST: Fine-tuning for three function implementations "Rafael J. Wysocki" <rafael@kernel.org> - 2016-09-06 13:30 +0200
Re: ACPI-APEI-HEST: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-06 16:30 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-05 22:20 +0200 |
| Subject | [PATCH 0/7] ACPI-APEI-HEST: Fine-tuning for three function implementations |
| Message-ID | <se8x4-8O-19@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Mon, 5 Sep 2016 22:05:05 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (7): Fix a typo in a comment line Use kmalloc_array() in hest_ghes_dev_register() Move an assignment in hest_ghes_dev_register() Rename jump labels in hest_ghes_dev_register() Rename jump labels in acpi_hest_init() Reduce the scope for a variable in acpi_hest_init() Rename jump labels in hest_parse_ghes() drivers/acpi/apei/hest.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) -- 2.10.0
[toc] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-05 22:30 +0200 |
| Subject | [PATCH 6/7] ACPI-APEI-HEST: Reduce the scope for a variable in acpi_hest_init() |
| Message-ID | <se8GJ-f4-1@gated-at.bofh.it> |
| In reply to | #1476944 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 5 Sep 2016 21:50:34 +0200
Move the definition for the local variable "ghes_count" into an if branch
so that the corresponding setting will only be performed if GHES could be
enabled by this function.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/acpi/apei/hest.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index ddff1b1..0e629c0 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -216,7 +216,6 @@ void __init acpi_hest_init(void)
{
acpi_status status;
int rc = -ENODEV;
- unsigned int ghes_count = 0;
if (hest_disable) {
pr_info(HEST_PFX "Table parsing disabled.\n");
@@ -238,6 +237,8 @@ void __init acpi_hest_init(void)
apei_hest_parse(hest_parse_cmc, NULL);
if (!ghes_disable) {
+ unsigned int ghes_count = 0;
+
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
if (rc)
goto disable_hest;
--
2.10.0
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-05 22:30 +0200 |
| Subject | [PATCH 7/7] ACPI-APEI-HEST: Rename jump labels in hest_parse_ghes() |
| Message-ID | <se8GK-f4-11@gated-at.bofh.it> |
| In reply to | #1476944 |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Mon, 5 Sep 2016 21:56:02 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/acpi/apei/hest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 0e629c0..d5b75fe 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -167,15 +167,15 @@ static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data) rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *)); if (rc) - goto err; + goto put_device; rc = platform_device_add(ghes_dev); if (rc) - goto err; + goto put_device; ghes_arr->ghes_devs[ghes_arr->count++] = ghes_dev; return 0; -err: + put_device: platform_device_put(ghes_dev); return rc; } -- 2.10.0
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-05 22:30 +0200 |
| Subject | [PATCH 5/7] ACPI-APEI-HEST: Rename jump labels in acpi_hest_init() |
| Message-ID | <se8GK-f4-7@gated-at.bofh.it> |
| In reply to | #1476944 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 5 Sep 2016 21:30:06 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/acpi/apei/hest.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 03dd7d3..ddff1b1 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -226,12 +226,12 @@ void __init acpi_hest_init(void)
status = acpi_get_table(ACPI_SIG_HEST, 0,
(struct acpi_table_header **)&hest_tab);
if (status == AE_NOT_FOUND)
- goto err;
+ goto disable_hest;
else if (ACPI_FAILURE(status)) {
const char *msg = acpi_format_exception(status);
pr_err(HEST_PFX "Failed to get table, %s\n", msg);
rc = -EINVAL;
- goto err;
+ goto disable_hest;
}
if (!acpi_disable_cmcff)
@@ -240,14 +240,14 @@ void __init acpi_hest_init(void)
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
if (rc)
- goto err;
+ goto disable_hest;
rc = hest_ghes_dev_register(ghes_count);
if (rc)
- goto err;
+ goto disable_hest;
}
pr_info(HEST_PFX "Table parsing has been initialized.\n");
return;
-err:
+ disable_hest:
hest_disable = 1;
}
--
2.10.0
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-05 22:30 +0200 |
| Subject | [PATCH 4/7] ACPI-APEI-HEST: Rename jump labels in hest_ghes_dev_register() |
| Message-ID | <se8GK-f4-25@gated-at.bofh.it> |
| In reply to | #1476944 |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Mon, 5 Sep 2016 21:22:55 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/acpi/apei/hest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 26f5e78..03dd7d3 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -194,14 +194,14 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count) ghes_arr.count = 0; rc = apei_hest_parse(hest_parse_ghes, &ghes_arr); if (rc) - goto err; -out: + goto unregister; + free_array: kfree(ghes_arr.ghes_devs); return rc; -err: + unregister: for (i = 0; i < ghes_arr.count; i++) platform_device_unregister(ghes_arr.ghes_devs[i]); - goto out; + goto free_array; } static int __init setup_hest_disable(char *str) -- 2.10.0
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-09-05 23:50 +0200 |
| Subject | Re: [PATCH 0/7] ACPI-APEI-HEST: Fine-tuning for three function implementations |
| Message-ID | <se9W9-12j-1@gated-at.bofh.it> |
| In reply to | #1476944 |
On Mon, Sep 5, 2016 at 10:12 PM, SF Markus Elfring <elfring@users.sourceforge.net> wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Mon, 5 Sep 2016 22:05:05 +0200 > > Some update suggestions were taken into account > from static source code analysis. > > Markus Elfring (7): > Fix a typo in a comment line > Use kmalloc_array() in hest_ghes_dev_register() > Move an assignment in hest_ghes_dev_register() > Rename jump labels in hest_ghes_dev_register() > Rename jump labels in acpi_hest_init() > Reduce the scope for a variable in acpi_hest_init() > Rename jump labels in hest_parse_ghes() Like in the other patch series I've just commented, please put all label renames into one patch. Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-06 05:40 +0200 |
| Subject | Re: ACPI-APEI-HEST: Fine-tuning for three function implementations |
| Message-ID | <sefoR-4Nx-1@gated-at.bofh.it> |
| In reply to | #1476967 |
> Like in the other patch series I've just commented, Thanks for your quick response. > please put all label renames into one patch. Could you accept these update suggestions generally? I would prefer to avoid squashing special changes together by default. Regards, Markus
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-09-06 13:30 +0200 |
| Subject | Re: ACPI-APEI-HEST: Fine-tuning for three function implementations |
| Message-ID | <semJH-1kY-3@gated-at.bofh.it> |
| In reply to | #1477047 |
On Tue, Sep 6, 2016 at 5:38 AM, SF Markus Elfring <elfring@users.sourceforge.net> wrote: >> Like in the other patch series I've just commented, > > Thanks for your quick response. > > >> please put all label renames into one patch. > > Could you accept these update suggestions generally? > > > I would prefer to avoid squashing special changes together by default. Well, as I said elsewhere, if you make the same type of change in multiple places in one piece of code (or code maintained by the same maintainer), you make it easier to review those changes if they go in one patch. Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-06 16:30 +0200 |
| Subject | Re: ACPI-APEI-HEST: Fine-tuning for three function implementations |
| Message-ID | <sepxT-3ab-9@gated-at.bofh.it> |
| In reply to | #1477286 |
> Well, as I said elsewhere, if you make the same type of change in > multiple places in one piece of code (or code maintained by the same maintainer), I can imagine that my update suggestions will also trigger some additional development efforts. I assume that some contributors appreciate fine-grained patch series, don't they? > you make it easier to review those changes if they go in one patch. It might look convenient. But I find that there are more aspects to consider for a better patch granularity. Regards, Markus
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web