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

Commit 80a03e29 authored by Stoyan Gaydarov's avatar Stoyan Gaydarov Committed by Tony Luck
Browse files

[IA64] BUG to BUG_ON changes



Replace:

	if (test)
		BUG();

with
	BUG_ON(test);

Signed-off-by: default avatarStoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ebf7649a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -533,8 +533,7 @@ get_ltoff (struct module *mod, uint64_t value, int *okp)
			goto found;

	/* Not enough GOT entries? */
	if (e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size))
		BUG();
	BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size));

	e->val = value;
	++mod->arch.next_got_entry;
+1 −2
Original line number Diff line number Diff line
@@ -1018,8 +1018,7 @@ cpu_init (void)
					| IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
	atomic_inc(&init_mm.mm_count);
	current->active_mm = &init_mm;
	if (current->mm)
		BUG();
	BUG_ON(current->mm);

	ia64_mmu_init(ia64_imva(cpu_data));
	ia64_mca_cpu_init(ia64_imva(cpu_data));
+1 −2
Original line number Diff line number Diff line
@@ -636,8 +636,7 @@ mem_init (void)
#endif

#ifdef CONFIG_FLATMEM
	if (!mem_map)
		BUG();
	BUG_ON(!mem_map);
	max_mapnr = max_low_pfn;
#endif

+5 −10
Original line number Diff line number Diff line
@@ -135,8 +135,7 @@ static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
	}

	war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL);
	if (!war_list)
		BUG();
	BUG_ON(!war_list);

	SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,
			nasid, widget, __pa(war_list), 0, 0, 0 ,0);
@@ -180,23 +179,20 @@ sn_common_hubdev_init(struct hubdev_info *hubdev)
		sizeof(struct sn_flush_device_kernel *);
	hubdev->hdi_flush_nasid_list.widget_p =
		kzalloc(size, GFP_KERNEL);
	if (!hubdev->hdi_flush_nasid_list.widget_p)
		BUG();
	BUG_ON(!hubdev->hdi_flush_nasid_list.widget_p);

	for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
		size = DEV_PER_WIDGET *
			sizeof(struct sn_flush_device_kernel);
		sn_flush_device_kernel = kzalloc(size, GFP_KERNEL);
		if (!sn_flush_device_kernel)
			BUG();
		BUG_ON(!sn_flush_device_kernel);

		dev_entry = sn_flush_device_kernel;
		for (device = 0; device < DEV_PER_WIDGET;
		     device++, dev_entry++) {
			size = sizeof(struct sn_flush_device_common);
			dev_entry->common = kzalloc(size, GFP_KERNEL);
			if (!dev_entry->common)
				BUG();
			BUG_ON(!dev_entry->common);
			if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST))
				status = sal_get_device_dmaflush_list(
					     hubdev->hdi_nasid, widget, device,
@@ -326,8 +322,7 @@ sn_common_bus_fixup(struct pci_bus *bus,
	 */
	controller->platform_data = kzalloc(sizeof(struct sn_platform_data),
					    GFP_KERNEL);
	if (controller->platform_data == NULL)
		BUG();
	BUG_ON(controller->platform_data == NULL);
	sn_platform_data =
			(struct sn_platform_data *) controller->platform_data;
	sn_platform_data->provider_soft = provider_soft;
+4 −8
Original line number Diff line number Diff line
@@ -128,8 +128,7 @@ sn_legacy_pci_window_fixup(struct pci_controller *controller,
{
		controller->window = kcalloc(2, sizeof(struct pci_window),
					     GFP_KERNEL);
		if (controller->window == NULL)
			BUG();
		BUG_ON(controller->window == NULL);
		controller->window[0].offset = legacy_io;
		controller->window[0].resource.name = "legacy_io";
		controller->window[0].resource.flags = IORESOURCE_IO;
@@ -168,8 +167,7 @@ sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
	idx = controller->windows;
	new_count = controller->windows + count;
	new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
	if (new_window == NULL)
		BUG();
	BUG_ON(new_window == NULL);
	if (controller->window) {
		memcpy(new_window, controller->window,
		       sizeof(struct pci_window) * controller->windows);
@@ -222,8 +220,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
		(u64) __pa(pcidev_info),
		(u64) __pa(sn_irq_info));

	if (status)
		BUG(); /* Cannot get platform pci device information */
	BUG_ON(status); /* Cannot get platform pci device information */


	/* Copy over PIO Mapped Addresses */
@@ -307,8 +304,7 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
	prom_bussoft_ptr = __va(prom_bussoft_ptr);

	controller = kzalloc(sizeof(*controller), GFP_KERNEL);
	if (!controller)
		BUG();
	BUG_ON(!controller);
	controller->segment = segment;

	/*
Loading