From e4502448354828399c313ec2ccf4618e1c0cb634 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 5 Mar 2019 12:41:08 +0100 Subject: [PATCH] ipc: (cosmetic) stop confusing editors Some editors (e.g. emacs) do not take into account preprocessor conditionals when performing syntax highlighting. I.e. patterns like if (a) { if (b) { do_things(); } cause those editors to miscalculate the number of opening and closing braces and thus break code highlighting. Move the opening brace to after the preprocessor conditional to avoid that. Signed-off-by: Guennadi Liakhovetski --- src/drivers/intel/cavs/ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/drivers/intel/cavs/ipc.c b/src/drivers/intel/cavs/ipc.c index c05717534..0bbbd7cfe 100644 --- a/src/drivers/intel/cavs/ipc.c +++ b/src/drivers/intel/cavs/ipc.c @@ -85,10 +85,11 @@ static void ipc_irq_handler(void *arg) /* new message from host */ #if CAVS_VERSION == CAVS_VERSION_1_5 - if (dipct & IPC_DIPCT_BUSY && dipcctl & IPC_DIPCCTL_IPCTBIE) { + if (dipct & IPC_DIPCT_BUSY && dipcctl & IPC_DIPCCTL_IPCTBIE) #else - if (dipctdr & IPC_DIPCTDR_BUSY && dipcctl & IPC_DIPCCTL_IPCTBIE) { + if (dipctdr & IPC_DIPCTDR_BUSY && dipcctl & IPC_DIPCCTL_IPCTBIE) #endif + { /* mask Busy interrupt */ ipc_write(IPC_DIPCCTL, dipcctl & ~IPC_DIPCCTL_IPCTBIE); @@ -112,10 +113,11 @@ static void ipc_irq_handler(void *arg) /* reply message(done) from host */ #if CAVS_VERSION == CAVS_VERSION_1_5 - if (dipcie & IPC_DIPCIE_DONE && dipcctl & IPC_DIPCCTL_IPCIDIE) { + if (dipcie & IPC_DIPCIE_DONE && dipcctl & IPC_DIPCCTL_IPCIDIE) #else - if (dipcida & IPC_DIPCIDA_DONE) { + if (dipcida & IPC_DIPCIDA_DONE) #endif + { /* mask Done interrupt */ ipc_write(IPC_DIPCCTL, ipc_read(IPC_DIPCCTL) & ~IPC_DIPCCTL_IPCIDIE);