media: ipu3-cio2: Use macros from mm.h
Quoted 3 lines · Bingbu Cao
Andy, thanks for your patch.
Reviewed-by Bingbu Cao <[email protected]>
Thanks!
Quoted 10 lines · Andy Shevchenko
Review
Quoted 6 lines
(quoted diff) +2
-3- 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. 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?
Quoted 3 lines
Quoted 3 lines
(quoted diff) +0
-0/* Fill FBPT */ remaining = length; i = 0;
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 18 lines · Andy Shevchenko
Quoted 3 lines · Bingbu Cao
Andy, thanks for your patch.
Reviewed-by Bingbu Cao <[email protected]>Thanks!
Quoted 10 lines · Andy Shevchenko
Review
Quoted 6 lines
(quoted diff) +2
-3- 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.
Quoted 1 line
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? :-)
Quoted 6 lines
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.
Signature · 3 lines
Regards, Sakari Ailus
Quoted 2 lines · Sakari Ailus
Quoted 1 line · Andy Shevchenko
On Wed, Oct 28, 2020 at 04:11:05PM +0800, Bingbu Cao wrote:
...
Quoted 8 lines
Quoted 6 lines
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.
Have you got v2?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Andy Shevchenko
Quoted 2 lines · Sakari Ailus
Quoted 1 line · Andy Shevchenko
On Wed, Oct 28, 2020 at 04:11:05PM +0800, Bingbu Cao wrote:
...
Quoted 2 lines
Quoted 2 lines
I just realized I can rewrite this as:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
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.
Have you got v2?
Yes, in fact. I'll check it tomorrow / some time next week.
Signature · 1 line
Sakari Ailus
Quoted 18 lines · Andy Shevchenko
Quoted 3 lines · Bingbu Cao
Andy, thanks for your patch.
Reviewed-by Bingbu Cao <[email protected]>Thanks!
Quoted 10 lines · Andy Shevchenko
Review
Quoted 6 lines
(quoted diff) +2
-3- 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.
Quoted 7 lines
There is a relaxation in the script, but now it's ambiguous with the documentation. 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?
Yes, looks good for me, thanks.
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
(quoted diff) +0
-0/* Fill FBPT */ remaining = length; i = 0;
Signature · 2 lines
Best regards, Bingbu Cao