Re: [PATCH 02/29] block: Use bdev_open_by_dev() in blkdev_open()

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

 



On Fri 11-08-23 05:25:41, Christoph Hellwig wrote:
> On Fri, Aug 11, 2023 at 01:04:33PM +0200, Jan Kara wrote:
> > +	blk_mode_t open_mode = ((struct bdev_handle *)file->private_data)->mode;
> 
> Nit: but I find it much more readable to just have a local bdev_handle
> variable vs these deep references including casts.  This also appears
> in a few others places.

OK, I've added the local variable to reduce typecasting and the depth of
dereferences.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux