On 4/28/25 3:31 AM, BALATON Zoltan wrote:
Since you are touching the lines using DEFINE_MACHINE it's a good
opportunity to change the macro to be more general to be able to keep
using it instead of replacing it with the boiler plate it's supposed to
hide. Adding one or two more parameters to the macro is not a big change
so I don't see why you don't want to do it. This could be addressed later
to revert to use the macro again but in practice it will not be addressed
because everybody will be busy doing other things and doing that now would
prevent some churn. I too, don't like doing unrelated clean up which is
not the main goal, but if it's not much more work then it's not
unreasonable to do it. I only oppose to that if it's a lot of work so I
would not ask such change but what I asked is not unrelated and quite
simple change.

That said, I can't stop you so if you still don't want to do it now then
you can move on. I don't care that much as long as you stay within hw/arm,
but will raise my concern again when you submit a similar patch that
touches parts I care more about. If others don't think it's a problem and
not bothered by the boiler plate code then it's not so important but
otherwise I think I have a valid point. I remember when I started to get
to know QEMU it was quite difficult to wade through all the QOM boiler
plate just to see what is related to the actual functionality. These
macros help to make code more readable and accessible for new people.


Having been through that recently, I agree with you that it can be hard to follow at first. Luckily, we have perfect compiler based completion for all editors those days (I sincerely hope everyone spent 2 hours configuring this on their own favorite one), and it's easy to see where things are defined and used, even when code is cryptic.

That said, pushing to someone adding a new field the responsibility of cleaning up the whole thing is not a fair request. You can't expect your friends to clean your shared house because they brought a cake for dinner.

Regards,
BALATON Zoltan

Regards,
Pierrick

Reply via email to