[igt-dev] [PATCH i-g-t] lib/igt_fb: remove extra parameters from igt_put_cairo_ctx

Arkadiusz Hiler arkadiusz.hiler at intel.com
Tue Jul 7 15:07:50 UTC 2020


On Mon, Jul 06, 2020 at 12:50:59PM -0300, Melissa Wen wrote:
> The function igt_put_cairo_ctx currently requires three parameters, but only
> one of them is used in it. This patch removes the useless parameters, making
> the code more readable and cohesive. It also applies the change to all
> occurrences of the function in the code.
> 
> Signed-off-by: Melissa Wen <melissa.srw at gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Thanks for the patch, it's merged now :-)

For similar refactors you may find coccinelle[0] handy.

There's some examples in lib/igt.cocci + a few people use that tool to
do the changes and posted the cocci patch as a part of the commit message.
e.g.: 7ff35cc1d0b3 ("lib/igt_buf: Extend igt_buf to include two color surfaces")

[0]: http://coccinelle.lip6.fr/

-- 
Cheers,
Arek


More information about the igt-dev mailing list