> From: Nicola Vetrini <[email protected]> > > MISRA C Rule 10.1 states: > "Operands shall not be of an inappropriate essential type" > > The unary minus operator applied to an unsigned quantity has > a semantics (wrap around) that is well-known to all Xen developers. > Thus, this operation is deemed safe. > > No functional change. > > Signed-off-by: Nicola Vetrini <[email protected]> > Signed-off-by: Federico Serafini <[email protected]> > Signed-off-by: Victor Lira <[email protected]>
We only have few instances of this pattern and the few we have are well understood and certainly deliberate. In practice, this patch reflects the current coding convention. Reviewed-by: Stefano Stabellini <[email protected]> Jan's request to improve the wording is OK for me.
