Displaying 8 results from an estimated 8 matches for "ptr_ret".
Did you mean:
hdr_ret
2013 Mar 25
1
[PATCH] drivers: virtio: Use PTR_RET function
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru at gmail.com>
---
drivers/virtio/virtio_mmio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/vi...
2013 Mar 25
1
[PATCH] drivers: virtio: Use PTR_RET function
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru at gmail.com>
---
drivers/virtio/virtio_mmio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/vi...
2013 Mar 12
1
[Bridge] [PATCH] bridge: netfilter: use PTR_RET instead of IS_ERR + PTR_ERR
This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
readability.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990 at gmail.com>
---
net/bridge/netfilter/ebtable_broute.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/bridge/netfilter/ebtable_broute.c b/ne...
2013 Jun 01
0
[PATCH] virtio-mmio: Cocci spatch "ptr_ret.spatch"
...o_mmio.c
@@ -567,10 +567,7 @@ static int vm_cmdline_set(const char *de
pdev = platform_device_register_resndata(&vm_cmdline_parent,
"virtio-mmio", vm_cmdline_id++,
resources, ARRAY_SIZE(resources), NULL, 0);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
-
- return 0;
+ return PTR_RET(pdev);
}
static int vm_cmdline_get_device(struct device *dev, void *data)
2013 Jun 01
0
[PATCH] virtio-mmio: Cocci spatch "ptr_ret.spatch"
...o_mmio.c
@@ -567,10 +567,7 @@ static int vm_cmdline_set(const char *de
pdev = platform_device_register_resndata(&vm_cmdline_parent,
"virtio-mmio", vm_cmdline_id++,
resources, ARRAY_SIZE(resources), NULL, 0);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
-
- return 0;
+ return PTR_RET(pdev);
}
static int vm_cmdline_get_device(struct device *dev, void *data)
2017 Nov 28
0
[PATCH] virtio-mmio: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings:
drivers/virtio/virtio_mmio.c:653:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych at gmail.com>
---
drivers/virtio/virtio_mmio....
2017 Nov 28
0
[PATCH] virtio-mmio: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings:
drivers/virtio/virtio_mmio.c:653:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych at gmail.com>
---
drivers/virtio/virtio_mmio....
2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
...+++ b/fs/btrfs/inode.c
@@ -2285,37 +2285,35 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
found_key.type = BTRFS_INODE_ITEM_KEY;
found_key.offset = 0;
inode = btrfs_iget(root->fs_info->sb, &found_key, root, NULL);
- if (IS_ERR(inode)) {
- ret = PTR_ERR(inode);
+ ret = PTR_RET(inode);
+ if (ret && ret != -ESTALE)
goto out;
- }
-
- /*
- * add this inode to the orphan list so btrfs_orphan_del does
- * the proper thing when we hit it
- */
- spin_lock(&root->orphan_lock);
- list_add(&BTRFS_I(inode)->i_orphan, &root->orphan_list);
-...