[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] xen/device_tree: Fix MISRA C 2012 Rule 20.7 violations
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 26 Aug 2022 08:21:20 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SpK1CWdht56f3Et5zwxZbuOxDAvRX4YCrhwcKoo0vkk=; b=fbhumtDeWcGyHih+LH6GUbj4dtzTrioEWiSlFAvKUrvMLxINOzcAf8JsiVCKlmMpZ9sWJRh7XYfwsylYEIQtrhfsYM+3eq4JEHEJULA0cHCROH0XU+HTaT18lk3yxitPzKC/X7Y24x+Wc64IHkVLU7N9kj3fYiCbeZ2qCLO6eEB8hfGPv/eoLOLWpNa6Y0IleMNJNY5HNuCNJnH3b007YeBDy6FSZcBLo7BIWRTEC2DKyrnLhOQemWqUFLHi7x8ztiNtBI5bQRvA3b0MGF91oQp/UFxWQvS/ZrQ6huknQa+6mRQ/4HuesYazzoLnMQjndhaiYtB5uAp7XiYeP+srXQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NUbiepFhIM6XCrfy+Rc062ZSAmtLvvT/YKja7TdwJtXdnW1eOkV5TxS2rxEZPxhTPjL7bqaG5+etfhOKVM0G2Bq8AoRj+tSjzPWVqqBQtIfUZkdVLuqFt/f/Bv8KYv21CmZB9eW65yr/c/rxcPpc0K1QXV4Ei16CK1Gg2hOnMg+Z8+WG3uhLlxgO4P9SD+F4mBOzkMvr/pvjrJM3AP/vAxp7m8lAHcU4/8goJjRLvoBcF644EHvG2seqPucgRHxkr+TZArsTC509QXXgmAzZU7+wtYfZ1g+25m+jsooIf3JAvbseHL+URcuRMXg4GiN4U1GUNupdZQfU8FYUcS+q3g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, andrew.cooper3@xxxxxxxxxx, bertrand.marquis@xxxxxxx, roger.pau@xxxxxxxxxx, roberto.bagnara@xxxxxxxxxxx
- Delivery-date: Fri, 26 Aug 2022 06:21:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 25.08.2022 20:09, Stefano Stabellini wrote:
> But first, let's confirm whether this change:
>
>
> #define dt_for_each_property_node(dn, pp) \
> - for ( pp = dn->properties; pp != NULL; pp = pp->next )
> + for ( pp = (dn)->properties; pp != NULL; pp = (pp)->next )
>
>
> is sufficient to make the violation go away in Eclair or cppcheck. I am
> assuming it is not sufficient, but let's confirm.
Well, even if for the lhs of assignments there was an exception, this
still wouldn't be sufficient. The minimum needed is
#define dt_for_each_property_node(dn, pp) \
for ( pp = (dn)->properties; (pp) != NULL; pp = (pp)->next )
Jan
|