Received: by 10.192.165.148 with SMTP id m20csp3396679imm; Mon, 7 May 2018 11:32:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrD9+gNly40jV0WqrbtvCqUKkfeUz6BdmxG1wO4yMOhfnSQPpriYzjt9AJ/CW/87kka49JF X-Received: by 2002:a24:ac6b:: with SMTP id m43-v6mr2659250iti.12.1525717933463; Mon, 07 May 2018 11:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525717933; cv=none; d=google.com; s=arc-20160816; b=sC4+mwZD43zdnjwUeYfBf/e8yxUrjK9fvzenqBLGKYmnbxtsk9IYXu+YR9WdrGWN+p d9BKi3VpEFvLVDFenEPwm6/0hKCOAci97d4hR3nX6cHCVRriP1+UbhbBGju8bqaNalnP qLwFIvfURmceoVJjsPaVxWNvMjGhROChb70JF60mRrD1eX6/phSbCz/NapEW0uxVvsK+ +qJv7usghSQj+5K/cO9RiuTr6iTvfQYAG1gzLdCyiGJsB26xGEVkvXlRhOWhKBRyASl8 Ldyuyf5hr9qKfWszI8noTOTrn72T50vFE+X00Ikaf3+oGjpCnWnLrgEQ6zRH3JGlz8MC kSWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JXxqiEN1wN3Uym3Ta+K/3KWr45R1sKfM9LVJoqkL9v8=; b=Icj4WLigs/rPBZkfOe7AOMkkqgImvf6aSBTrXEEsDLryS4V93VRoKvZyAcmEXCOrMJ ZJWAcNpqoYUUUyUQCwLXhSdpoCLRUTm+yk/wU/U+HNxCtWNBYcOiw/lLtKh3mC8ue6T4 mgj51Cp8RPwbe6Cs0ppHmWVSvwIsAMLiMEUiNGFqDWnM0eRLM6UtzEHccAZAQLILeQ6T HrxNds32r0tUsMsiXvA1vIZO/Is92Dyeo8jCalOcBBZYSr/Mm1//ULYfey2IARACtVaR YjNljwaLK+0u+oPEukLQK2qX4oASaiJMsATPhfIx3yQCyQ8Fz/STV+reB/dJ7Dq44Ntt V6fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f67-v6si7672114ite.114.2018.05.07.11.31.59; Mon, 07 May 2018 11:32:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbeEGSbV (ORCPT + 99 others); Mon, 7 May 2018 14:31:21 -0400 Received: from mout.gmx.net ([212.227.17.21]:39549 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbeEGSbU (ORCPT ); Mon, 7 May 2018 14:31:20 -0400 Received: from LPT2.fritz.box ([62.143.246.157]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0Lngv5-1eg7a82UXv-00hvIB; Mon, 07 May 2018 20:31:15 +0200 From: Heinrich Schuchardt To: Joe Perches Cc: Andy Whitcroft , linux-kernel@vger.kernel.org, Heinrich Schuchardt Subject: [BUG] scripts/checkpatch.pl: false positive missing parentheses Date: Mon, 7 May 2018 20:31:05 +0200 Message-Id: <20180507183105.13499-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.17.0 X-Provags-ID: V03:K1:5Ip+hrICXcd5mXfeVMs6FirfbyGUG6mp+xZGO+dwN/k4HzvC4Uk XFZGRuQ0rXGvpnIfbILkZ9FTCcE9mb2kpj+PEMyCNMbIT6Ynjazz4+qySduRd5uJlskRhAL FTx+fk9FyuvibAeKeFKe+GVkXlI6SYWuQ6Adspnvjtbzclc0OIGpr4ZykKZEyUNtsG5p47N NxcTsxdvcdGM2aDswP0gA== X-UI-Out-Filterresults: notjunk:1;V01:K0:pMK+JVhfL5o=:BM0fkPS6IMg42X5gOFLtg+ sth0MPr1g2Ccbl68UARenOOudnGsLgxQ5kV5UryzziBxGzDlqyKP9SZai9caxeMEycFyR06Lt EIjZ9m/+9rPj7sO1b8J9lF15DEap7hsv29DVt1JgrC4RxC4y13OBAvfdjKld/b0MlXduhRUxL lwQyqbrTeokCyZjQ7sM4b9XE6jnNA9y/6AB4yxOnVI8oHuKJFFOe+9B9zIyw8dxSMH77a34sB NglECIqOW8h+jlTmdvNZqSzhgVMrnHQFOJwZB7L9oTHOHA47rUhY4ftc+OUzBkkEJP+PMlvpK znwUDoolslieqtCpZ+4UCJf7Nrfx9UDE3zqR9DFsyrV7ByJVb+9+nQn5h+/SD5hLmpbC68mn/ IW2dxg8EUlSV3LM9dsCgIxGjEpNaAazCzrJnGqEqXnZ8OMCnmNyjr2MZ6+f4mL0rqZkwZP3KB jZa/nL/D77Xs+Psy2fhy0datEBuyyH+luUQnC8nZ5zLYaWC+SKY/29PBDdHGMB6TqbR0rYghI dplSm0OT+Uc756d4G9DhuEDralcUgiCZ6dQpNdBKyCiEf5g7tF6qCEe2tBbFYNjluZV2uANRw EcVQ1Uunwmweogvc0Fs3Zr1VTOkTJX66zfW0H1bTAHhcpCZy/74Stktnj332ulVC+YgUgnj7R jOr3puMEdDe/+zL5eJdVZlgNPILTxPdFKGdtJUXoNJemuL0jvM7JbYUwsJupd0+7uSYXn9/7O eyBPbzL52moqU4V29QBmDmTPv2t8qqyvmQVwE4LUW3MksQKqtPuWtQcgYpY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch creates a false positive: ERROR: Macros with complex values should be enclosed in parentheses Here we define a constant that can be used to initialize a structure. Adding parentheses would lead to a compile time error: error: braced-group within expression allowed only inside a function Signed-off-by: Heinrich Schuchardt --- foo.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 foo.h diff --git a/foo.h b/foo.h new file mode 100644 index 000000000000..e2cba533f065 --- /dev/null +++ b/foo.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: BSD-2 */ +#define EFI_ST_DISK_IMG { 0x00003368, { \ + {0x00000d40, "\x6f\x63\x00\x2f\x2a\x00\x20\x2a"}, /* oc./*. * */ \ + {0x00000d48, "\x00\x20\x2a\x2f\x0a\x00\x09\x7b"}, /* . */...{ */ \ + {0x00000d50, "\x30\x78\x25\x30\x38\x7a\x78\x2c"}, /* 0x%08zx, */ \ + {0x00000d58, "\x20\x22\x00\x5c\x78\x25\x30\x32"}, /* ".\x%02 */ \ + {0x00000d60, "\x78\x00\x20\x2a\x2f\x20\x5c\x00"}, /* x. */ \. */ \ + {0, NULL} } } -- 2.17.0