Re: [PATCH 04/10] media: atomisp: Remove crop_needs_override from atomisp_set_fmt()

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

 



Hi,

On 2/21/23 17:00, Andy Shevchenko wrote:
> On Tue, Feb 21, 2023 at 03:59:00PM +0100, Hans de Goede wrote:
>> Remove the crop_needs_override local helper variable from
>> atomisp_set_fmt(), as it always is true now.
> 
> ...
> 
>> +			sink_crop.width = DIV_NEAREST_STEP(
>> +					      sink_crop.height *
>> +					      f->fmt.pix.width,
>> +					      f->fmt.pix.height,
>> +					      ATOM_ISP_STEP_WIDTH);
> 
> Not sure how long this code stays, I would indent it as
> 
> 			sink_crop.width =
> 				DIV_NEAREST_STEP(sink_crop.height *
> 						 f->fmt.pix.width,
> 						 f->fmt.pix.height,
> 						 ATOM_ISP_STEP_WIDTH);

Thanks, I've gone with:

			sink_crop.width =
				DIV_NEAREST_STEP(sink_crop.height * f->fmt.pix.width,
						 f->fmt.pix.height,
						 ATOM_ISP_STEP_WIDTH);

Keeping the first DIV_NEAREST_STEP() argument on a single line.

> 
> ...
> 
>> +			sink_crop.height = DIV_NEAREST_STEP(
>> +					       sink_crop.width *
>> +					       f->fmt.pix.height,
>> +					       f->fmt.pix.width,
>> +					       ATOM_ISP_STEP_HEIGHT);
> 
> Ditto.

Ditto :)

Regards,

Hans





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux