* [PATCH] btrfs: fix err_cast.cocci warnings [not found] <201801290206.Wy8wLcdm%fengguang.wu@intel.com> @ 2018-01-28 18:50 ` kbuild test robot 2018-01-29 18:40 ` David Sterba 0 siblings, 1 reply; 3+ messages in thread From: kbuild test robot @ 2018-01-28 18:50 UTC (permalink / raw) To: Anand Jain Cc: kbuild-all, David Sterba, Chris Mason, Chris Mason, Josef Bacik, linux-btrfs, linux-kernel From: Fengguang Wu <fengguang.wu@intel.com> fs/btrfs/volumes.c:742:10-17: WARNING: ERR_CAST can be used with fs_devices Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci Fixes: bf155c98d312 ("btrfs: get device pointer from device_list_add()") CC: Anand Jain <anand.jain@oracle.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -739,7 +739,7 @@ static noinline struct btrfs_device *dev if (!fs_devices) { fs_devices = alloc_fs_devices(disk_super->fsid); if (IS_ERR(fs_devices)) - return ERR_PTR(PTR_ERR(fs_devices)); + return ERR_CAST(fs_devices); list_add(&fs_devices->list, &fs_uuids); ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: fix err_cast.cocci warnings 2018-01-28 18:50 ` [PATCH] btrfs: fix err_cast.cocci warnings kbuild test robot @ 2018-01-29 18:40 ` David Sterba 2018-01-29 23:11 ` Anand Jain 0 siblings, 1 reply; 3+ messages in thread From: David Sterba @ 2018-01-29 18:40 UTC (permalink / raw) To: kbuild test robot Cc: Anand Jain, kbuild-all, David Sterba, Chris Mason, Chris Mason, Josef Bacik, linux-btrfs, linux-kernel On Mon, Jan 29, 2018 at 02:50:10AM +0800, kbuild test robot wrote: > From: Fengguang Wu <fengguang.wu@intel.com> > > fs/btrfs/volumes.c:742:10-17: WARNING: ERR_CAST can be used with fs_devices > > > Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) > > Generated by: scripts/coccinelle/api/err_cast.cocci > > Fixes: bf155c98d312 ("btrfs: get device pointer from device_list_add()") > CC: Anand Jain <anand.jain@oracle.com> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Thanks for the fix, I'll fold it to the patch. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: fix err_cast.cocci warnings 2018-01-29 18:40 ` David Sterba @ 2018-01-29 23:11 ` Anand Jain 0 siblings, 0 replies; 3+ messages in thread From: Anand Jain @ 2018-01-29 23:11 UTC (permalink / raw) To: dsterba, kbuild test robot; +Cc: linux-btrfs On 01/30/2018 02:40 AM, David Sterba wrote: > On Mon, Jan 29, 2018 at 02:50:10AM +0800, kbuild test robot wrote: >> From: Fengguang Wu <fengguang.wu@intel.com> >> >> fs/btrfs/volumes.c:742:10-17: WARNING: ERR_CAST can be used with fs_devices >> >> >> Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) >> >> Generated by: scripts/coccinelle/api/err_cast.cocci >> >> Fixes: bf155c98d312 ("btrfs: get device pointer from device_list_add()") >> CC: Anand Jain <anand.jain@oracle.com> >> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> > > Thanks for the fix, I'll fold it to the patch. Oh. I just saw this email thread, err my filters. sorry. Thanks for the fix. Anand > -- > 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 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-29 23:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201801290206.Wy8wLcdm%fengguang.wu@intel.com>
2018-01-28 18:50 ` [PATCH] btrfs: fix err_cast.cocci warnings kbuild test robot
2018-01-29 18:40 ` David Sterba
2018-01-29 23:11 ` Anand Jain
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).