Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbdF3B1C (ORCPT ); Thu, 29 Jun 2017 21:27:02 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34503 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751729AbdF3B1B (ORCPT ); Thu, 29 Jun 2017 21:27:01 -0400 To: Andy Whitcroft , Joe Perches Cc: LKML From: Larry Finger Subject: Inconsistency in scripts/checkpatch.pl Message-ID: <70ae7b56-7fcd-9677-4768-e8a7343c5d75@lwfinger.net> Date: Thu, 29 Jun 2017 20:26:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 682 Lines: 20 Andy and Joe, In some new rtlwifi code, I get the following for one of the new macros: CHECK: Macro argument '__h2c' may be better as '(__h2c)' to avoid precedence issues #45005: FILE: drivers/net/wireless/realtek/rtlwifi/halmac/halmac_original_h2c_nic.h:1163: +#define AOAC_RSVD_PAGE3_GET_LOC_AOAC_REPORT(__h2c) \ + LE_BITS_TO_4BYTE(__h2c + 0X00, 16, 8) When I make that change, I get CHECK: No space is necessary after a cast #45004: FILE: drivers/net/wireless/realtek/rtlwifi/halmac/halmac_original_h2c_nic.h:1162: + LE_BITS_TO_4BYTE((__h2c) + 0X00, 16, 8) Which CHECK should I fix? To my eye, the second form is the false positive. Larry