mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/ns16550: address violations of MISRA C:2012 Rule 13.1
Rule 13.1: Initializer lists shall not contain persistent side effects The assignment operation in: .irq = rc = uart->irq, is a persistent side effect in a struct initializer list. This patch assigns rc separately outside the structure. No functional change. Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
e8f1bb803f
commit
38ae4739d8
1 file changed
+3
-1
@@ -441,10 +441,12 @@ static void __init cf_check ns16550_init_postirq(struct serial_port *port)
|
||||
struct msi_info msi = {
|
||||
.sbdf = PCI_SBDF(0, uart->ps_bdf[0], uart->ps_bdf[1],
|
||||
uart->ps_bdf[2]),
|
||||
.irq = rc = uart->irq,
|
||||
.irq = uart->irq,
|
||||
.entry_nr = 1
|
||||
};
|
||||
|
||||
rc = uart->irq;
|
||||
|
||||
if ( rc > 0 )
|
||||
{
|
||||
struct msi_desc *msi_desc = NULL;
|
||||
|
||||