|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [Qemu-devel] [Qemu-trivial] [PATCH] nbd-client: Use correct macro parenthesization |
Date: | Tue, 19 Sep 2017 07:32:41 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/18/2017 07:42 PM, Eric Blake wrote:
On 09/18/2017 05:13 PM, Philippe Mathieu-Daudé wrote:Any magic cocci script to verify there aren't no more?I don't know if cocci can do it; checkpatch tries to check whether macro arguments are parenthesized, but even that's prone to missing things. I just spotted this particular one while reviewing a related patch.
couldn't figure out.grep -E '^\s*#define\s+\w+\([^\)]+\)\s+.*\(\w+\)\w+' (no multiline) found those unharmful:
target/mips/dsp_helper.c:#define MIPSDSP_RETURN64_16(a, b, c, d) (((uint64_t)a << 48) | \ target/mips/dsp_helper.c:#define MIPSDSP_RETURN64_32(a, b) (((uint64_t)a << 32) | (uint64_t)b) include/hw/ppc/pnv_xscom.h:#define PNV_XSCOM_EX_CORE_BASE(base, i) (base | (((uint64_t)i) << 24))
[Prev in Thread] | Current Thread | [Next in Thread] |