From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbdKVNPE (ORCPT ); Wed, 22 Nov 2017 08:15:04 -0500 Received: from lhrrgout.huawei.com ([194.213.3.17]:50738 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751244AbdKVNPD (ORCPT ); Wed, 22 Nov 2017 08:15:03 -0500 From: Igor Stoppa To: CC: , Tetsuo Handa , Guenter Roeck , Javi Merino , Igor Stoppa Subject: [PATCH 1/1] Add paretheses to macro parameters. For trivial Date: Wed, 22 Nov 2017 15:11:53 +0200 Message-ID: <20171122131153.16332-2-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171122131153.16332-1-igor.stoppa@huawei.com> References: <20171122131153.16332-1-igor.stoppa@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.122.225.51] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kernel.h: Some macros are not wrapping their parameters with parentheses. Signed-off-by: Igor Stoppa Cc: Tetsuo Handa Cc: Guenter Roeck Cc: Javi Merino --- include/linux/kernel.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4b484ab..4061f46 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -112,7 +112,7 @@ /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ #define roundup(x, y) ( \ { \ - const typeof(y) __y = y; \ + const typeof(y) __y = (y); \ (((x) + (__y - 1)) / __y) * __y; \ } \ ) @@ -131,8 +131,8 @@ */ #define DIV_ROUND_CLOSEST(x, divisor)( \ { \ - typeof(x) __x = x; \ - typeof(divisor) __d = divisor; \ + typeof(x) __x = (x); \ + typeof(divisor) __d = (divisor); \ (((typeof(x))-1) > 0 || \ ((typeof(divisor))-1) > 0 || \ (((__x) > 0) == ((__d) > 0))) ? \ @@ -146,7 +146,7 @@ */ #define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ { \ - typeof(divisor) __d = divisor; \ + typeof(divisor) __d = (divisor); \ unsigned long long _tmp = (x) + (__d) / 2; \ do_div(_tmp, __d); \ _tmp; \ -- 2.9.3