Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0cd661b authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Tony Luck
Browse files

[IA64] smp.c coding style fix



Fix indenting of switch statement to follow CodingStyle, and
pull out handling of call_data into an inlined function.

I confirmed that applying this fix doesn't affect assembled code.

Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 6d3c5111
Loading
Loading
Loading
Loading
+35 −33
Original line number Diff line number Diff line
@@ -98,6 +98,31 @@ unlock_ipi_calllock(void)
	spin_unlock_irq(&call_lock);
}

static inline void
handle_call_data(void)
{
	struct call_data_struct *data;
	void (*func)(void *info);
	void *info;
	int wait;

	/* release the 'pointer lock' */
	data = (struct call_data_struct *)call_data;
	func = data->func;
	info = data->info;
	wait = data->wait;

	mb();
	atomic_inc(&data->started);
	/* At this point the structure may be gone unless wait is true. */
	(*func)(info);

	/* Notify the sending CPU that the task is done. */
	mb();
	if (wait)
		atomic_inc(&data->finished);
}

static void
stop_this_cpu(void)
{
@@ -139,31 +164,7 @@ handle_IPI (int irq, void *dev_id)

			switch (which) {
			case IPI_CALL_FUNC:
			      {
				      struct call_data_struct *data;
				      void (*func)(void *info);
				      void *info;
				      int wait;

				      /* release the 'pointer lock' */
				      data = (struct call_data_struct *) call_data;
				      func = data->func;
				      info = data->info;
				      wait = data->wait;

				      mb();
				      atomic_inc(&data->started);
				      /*
				       * At this point the structure may be gone unless
				       * wait is true.
				       */
				      (*func)(info);

				      /* Notify the sending CPU that the task is done.  */
				      mb();
				      if (wait)
					      atomic_inc(&data->finished);
			      }
				handle_call_data();
				break;

			case IPI_CPU_STOP:
@@ -175,7 +176,8 @@ handle_IPI (int irq, void *dev_id)
				break;
#endif
			default:
				printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which);
				printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n",
						this_cpu, which);
				break;
			}
		} while (ops);