Re: [PATCH 2/6] btrfs: cleanup btrfs_find_device_by_devspec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 17, 2019 at 11:32:29PM +0800, Anand Jain wrote:
> btrfs_find_device_by_devspec() finds the device by @devid or by
> @device_path. This patch makes code flow easy to read by open
> coding the else part and renames devpath to device_path.
> 
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> ---
> If the else is preferred, I am ok to keep them. Nikolay?

It looks better to me the way you implement it, a series of ifs, each
does a return, the function is short and easy to follow.

Reviewed-by: David Sterba <dsterba@xxxxxxxx>



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux