Re: [PATCH v2 29/34] bdev: make struct bdev_handle private to the block layer

Christian Brauner
2024-02-01T14:50:57Z

On Mon, Jan 29, 2024 at 05:22:03PM +0100, Christoph Hellwig wrote:
> > + ret = devcgroup_check_permission(
> > + DEVCG_DEV_BLOCK, MAJOR(dev), MINOR(dev),
> > + ((mode & BLK_OPEN_READ) ? DEVCG_ACC_READ : 0) |
> > + ((mode & BLK_OPEN_WRITE) ? DEVCG_ACC_WRITE : 0));
>
> Somewhat weird formatting here with DEVCG_DEV_BLOCK not on the
> same line as the opening brace and the extra indentation after
> the |. I would have expected something like:
>
> ret = devcgroup_check_permission(DEVCG_DEV_BLOCK,
> MAJOR(dev), MINOR(dev),
> ((mode & BLK_OPEN_READ) ? DEVCG_ACC_READ : 0) |
> ((mode & BLK_OPEN_WRITE) ? DEVCG_ACC_WRITE : 0));

Fixed. (Fwiw, this is due to clang-format.)