Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1529093

Re: [PATCH 12/20] net/iucv: Convert to hotplug state machine

From Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 12/20] net/iucv: Convert to hotplug state machine
Date 2016-11-24 10:20 +0100
Message-ID <sGYme-HF-25@gated-at.bofh.it> (permalink)
References <sEzLj-4lB-7@gated-at.bofh.it> <sEzLk-4lB-55@gated-at.bofh.it> <sGLyF-Aw-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016-11-23 19:04:16 [+0100], Ursula Braun wrote:
> Sebastian,
Hallo Ursula,

> your patch looks good to me. I run successfully some small tests with it.
> I want to suggest a small change in iucv_init() to keep the uniform technique
> of undo labels below. Do you agree?

So what you ask for is:

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index f0d6afc5d4a9..8f7ef167c45a 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -2038,16 +2038,16 @@ static int __init iucv_init(void)
 	rc = cpuhp_setup_state(CPUHP_NET_IUCV_PREPARE, "net/iucv:prepare",
 			       iucv_cpu_prepare, iucv_cpu_dead);
 	if (rc)
-		goto out_free;
+		goto out_dev;
 	rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "net/iucv:online",
 			       iucv_cpu_online, iucv_cpu_down_prep);
 	if (rc < 0)
-		goto out_free;
+		goto out_prep;
 	iucv_online = rc;
 
 	rc = register_reboot_notifier(&iucv_reboot_notifier);
 	if (rc)
-		goto out_free;
+		goto out_remove_hp;
 	ASCEBC(iucv_error_no_listener, 16);
 	ASCEBC(iucv_error_no_memory, 16);
 	ASCEBC(iucv_error_pathid, 16);
@@ -2061,11 +2061,11 @@ static int __init iucv_init(void)
 
 out_reboot:
 	unregister_reboot_notifier(&iucv_reboot_notifier);
-out_free:
-	if (iucv_online)
-		cpuhp_remove_state(iucv_online);
+out_remove_hp:
+	cpuhp_remove_state(iucv_online);
+out_prep:
 	cpuhp_remove_state(CPUHP_NET_IUCV_PREPARE);
-
+out_dev:
 	root_device_unregister(iucv_root);
 out_int:
 	unregister_external_irq(EXT_IRQ_IUCV, iucv_external_interrupt);

This is your change including the removal of the `if' check in the
`out_remove' label which got renamed to `out_remove_hp'.
Of course, I agree with this change and a proper patch will follow in a
few hours if nobody objects.

> Kind regards, Ursula

Sebastian

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

cpu hotplug: convert more drivers (batch #5) Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
  [PATCH 12/20] net/iucv: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] net/iucv: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
    [tip:smp/hotplug] net/iucv: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-23 00:20 +0100
    Re: [PATCH 12/20] net/iucv: Convert to hotplug state machine Ursula Braun <ubraun@linux.vnet.ibm.com> - 2016-11-23 20:40 +0100
      Re: [PATCH 12/20] net/iucv: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-24 10:20 +0100
        [PATCH 12/20 v2] net/iucv: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-24 15:20 +0100
          [PATCH] net/iucv: use explicit clean up labels in iucv_init() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-24 17:20 +0100
            [tip:smp/hotplug] net/iucv: Use explicit clean up labels in  iucv_init() tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-24 21:00 +0100
  [PATCH 09/20] powercap/intel rapl: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] powercap/intel rapl: Convert to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
  [PATCH 19/20] x86/oprofile/nmi: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] x86/oprofile/nmi: Convert to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
    [tip:smp/hotplug] x86/oprofile/nmi: Convert to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-22 23:50 +0100
  [PATCH 14/20] arm/bL_switcher: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] arm/bL_switcher: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
    [tip:smp/hotplug] arm/bL_switcher: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-22 23:50 +0100
  [PATCH 13/20] sched/nohz: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] sched/nohz: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
    [tip:smp/hotplug] sched/nohz: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-23 00:20 +0100
  [PATCH 16/20] powerpc/sysfs: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:40 +0100
    [tip:smp/hotplug] powerpc/sysfs: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 17:00 +0100
    [tip:smp/hotplug] powerpc/sysfs: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-22 23:50 +0100
  [PATCH 10/20] powercap/intel_rapl: Cleanup duplicated init code Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [tip:smp/hotplug] powercap/intel_rapl: Cleanup duplicated init code tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-11-21 17:00 +0100
  [PATCH 01/20] x86/mce/therm_throt: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [tip:smp/hotplug] x86/mce/therm_throt: Convert to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 16:50 +0100
    [tip:smp/hotplug] x86/mce/therm_throt: Convert to hotplug state  machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-22 23:50 +0100
  [PATCH 07/20] pci/xgene-msi: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [tip:smp/hotplug] PCI/xgene-msi: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 16:50 +0100
    [tip:smp/hotplug] PCI/xgene-msi: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-23 00:20 +0100
  [PATCH 06/20] hwmon/via-cputemp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [PATCH 06/20 v2] hwmon/via-cputemp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-18 16:20 +0100
    Re: [PATCH 06/20] hwmon/via-cputemp: Convert to hotplug state machine Guenter Roeck <linux@roeck-us.net> - 2016-11-23 16:40 +0100
  [PATCH 05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    Re: [05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Guenter Roeck <linux@roeck-us.net> - 2016-11-19 18:30 +0100
      Re: [05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-20 00:00 +0100
        Re: [05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Guenter Roeck <linux@roeck-us.net> - 2016-11-20 05:00 +0100
          Re: [05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-20 21:40 +0100
  [PATCH 08/20] powercap/intel_rapl: Add missing domain data update on hotplug Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [tip:smp/hotplug] powercap/intel_rapl: Add missing domain data  update on hotplug tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-11-21 16:50 +0100
  [PATCH 03/20] x86/msr: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-17 19:50 +0100
    [tip:smp/hotplug] x86/msr: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-21 16:50 +0100
    [tip:smp/hotplug] x86/msr: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-22 23:50 +0100

csiph-web