Hi,

On 01/08/2019 17:56, Viktor Mitin wrote:
On Thu, Aug 1, 2019 at 5:50 PM Volodymyr Babchuk
<volodymyr_babc...@epam.com> wrote:

In this case we also can declare and use intrs[] in the same way.

There is no guarantee the index in irq will match intrs[...]. So you
need to keep them hardcoded in the latter case.
Oh, right.

I don't like the idea of using hardcoded numbers in the code. BTW,
Misra rule says it should not be used as well.

When mentioning a spec, it is common to also specify the exact section so others don't have to spend time look for it.

I skimmed quickly through the MISRA and can't find the rule you suggest here. Furthermore, they have a lot of examples in the spec with harcoded size. So I am perplexed they actively discourage it...

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to