Re: [PATCH v1] media: ipu3-cio2: Use macros from mm.h

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

 



Hi Andy,

On Thu, Oct 29, 2020 at 10:16:57PM +0200, Andy Shevchenko wrote:
> On Wed, Oct 28, 2020 at 04:11:05PM +0800, Bingbu Cao wrote:
> > Andy, thanks for your patch.
> 
> > Reviewed-by: Bingbu Cao <bingbu.cao@xxxxxxxxx>
> 
> Thanks!
> 
> > On 10/28/20 2:14 AM, Andy Shevchenko wrote:
> 
> > > -	entry[1].second_entry.last_page_available_bytes =
> > > -			(remaining & ~PAGE_MASK) ?
> > > -				(remaining & ~PAGE_MASK) - 1 : PAGE_SIZE - 1;
> > > +	remaining = offset_in_page(remaining);
> > > +	entry[1].second_entry.last_page_available_bytes = (remaining ?: PAGE_SIZE) - 1;
> > 
> > Not really about this change, is there some coding style update? This line obviously over 80
> > chars, but the latest script did not report warning.
> 
> There is a relaxation in the script, but now it's ambiguous with the documentation.

This line is over 80 characters. :-o

It's not ambibuous btw.; the documentation says:

	The preferred limit on the length of a single line is 80 columns.

I understand that as a preference to stay below that limit. It's not a
strict rule. Or... did you mean it didn't say whether this was upper or
lower limit? :-)

> I just realized I can rewrite this as:
> 
> 	remaining = offset_in_page(remaining) ?: PAGE_SIZE;
> 	entry[1].second_entry.last_page_available_bytes = remaining - 1;
> 
> Would it work for you?

Looks good to me.

-- 
Regards,

Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux