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

Commit 27703bb4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull PTR_RET() removal patches from Rusty Russell:
 "PTR_RET() is a weird name, and led to some confusing usage.  We ended
  up with PTR_ERR_OR_ZERO(), and replacing or fixing all the usages.

  This has been sitting in linux-next for a whole cycle"

[ There are still some PTR_RET users scattered about, with some of them
  possibly being new, but most of them existing in Rusty's tree too.  We
  have that

      #define PTR_RET(p) PTR_ERR_OR_ZERO(p)

  thing in <linux/err.h>, so they continue to work for now  - Linus ]

* tag 'PTR_RET-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  GFS2: Replace PTR_RET with PTR_ERR_OR_ZERO
  Btrfs: volume: Replace PTR_RET with PTR_ERR_OR_ZERO
  drm/cma: Replace PTR_RET with PTR_ERR_OR_ZERO
  sh_veu: Replace PTR_RET with PTR_ERR_OR_ZERO
  dma-buf: Replace PTR_RET with PTR_ERR_OR_ZERO
  drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO
  mm/oom_kill: remove weird use of ERR_PTR()/PTR_ERR().
  staging/zcache: don't use PTR_RET().
  remoteproc: don't use PTR_RET().
  pinctrl: don't use PTR_RET().
  acpi: Replace weird use of PTR_RET.
  s390: Replace weird use of PTR_RET.
  PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
  PTR_RET is now PTR_ERR_OR_ZERO
parents 6f3bc58d ad151d54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
				 sizeof(struct omap_i2c_bus_platform_data));
	WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", name);

	return PTR_RET(pdev);
	return PTR_ERR_OR_ZERO(pdev);
}

static  int __init omap_i2c_cmdline(void)
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static int __init amiga_init_bus(void)
	n = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2;
	pdev = platform_device_register_simple("amiga-zorro", -1,
					       zorro_resources, n);
	return PTR_RET(pdev);
	return PTR_ERR_OR_ZERO(pdev);
}

subsys_initcall(amiga_init_bus);
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ static int __init rtc_init(void)
		return -ENODEV;

	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
	return PTR_RET(pdev);
	return PTR_ERR_OR_ZERO(pdev);
}

module_init(rtc_init);
+1 −1
Original line number Diff line number Diff line
@@ -338,6 +338,6 @@ static __init int q40_add_kbd_device(void)
		return -ENODEV;

	pdev = platform_device_register_simple("q40kbd", -1, NULL, 0);
	return PTR_RET(pdev);
	return PTR_ERR_OR_ZERO(pdev);
}
arch_initcall(q40_add_kbd_device);
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ static int __init fail_iommu_debugfs(void)
	struct dentry *dir = fault_create_debugfs_attr("fail_iommu",
						       NULL, &fail_iommu);

	return PTR_RET(dir);
	return PTR_ERR_OR_ZERO(dir);
}
late_initcall(fail_iommu_debugfs);

Loading