Message ID | 936a6171-4c1e-2bda-af79-9be9ebe6a8fd@jp.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: backref.c: Use ERR_CAST() to return error code | expand |
On 26.07.2018 04:22, Misono Tomohiro wrote: > Use ERR_CAST() instead of void * to make meaning clear. > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> > --- > fs/btrfs/backref.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c > index 7ce0b5f9e99e..9f231bbccb1e 100644 > --- a/fs/btrfs/backref.c > +++ b/fs/btrfs/backref.c > @@ -2231,7 +2231,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, > > fspath = init_data_container(total_bytes); > if (IS_ERR(fspath)) > - return (void *)fspath; > + return ERR_CAST(fspath); > > ifp = kmalloc(sizeof(*ifp), GFP_KERNEL); > if (!ifp) { > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jul 26, 2018 at 10:22:58AM +0900, Misono Tomohiro wrote: > Use ERR_CAST() instead of void * to make meaning clear. > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Added to misc-next, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 7ce0b5f9e99e..9f231bbccb1e 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -2231,7 +2231,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, fspath = init_data_container(total_bytes); if (IS_ERR(fspath)) - return (void *)fspath; + return ERR_CAST(fspath); ifp = kmalloc(sizeof(*ifp), GFP_KERNEL); if (!ifp) {
Use ERR_CAST() instead of void * to make meaning clear. Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)