Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp224229rwb; Wed, 21 Sep 2022 21:05:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uRvBUoI12F33WgSck2HhKHCFoUNYOvvAqI2oFQHqlatVbNWEGW9xG4sLkZtkNVIIbVJXI X-Received: by 2002:a62:2503:0:b0:538:426a:af11 with SMTP id l3-20020a622503000000b00538426aaf11mr1488670pfl.22.1663819556684; Wed, 21 Sep 2022 21:05:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663819556; cv=pass; d=google.com; s=arc-20160816; b=kgzYHMTkaKoKfnzplf3IWWhkGbzS2Jqel2L6JYvUtiV5yGFP0kib7rh0zF55qE8dQy m5/EugdvaL8b52cxfBNWdly1pv1tC70AGAXQx164tGWA2pqm1IKk+YCCp21GoQ6+Pa+4 MShAiNkyQC9NZpPozGMdyU7fJVd8WiyFX+8T0z0f/xmdSqlqiDyJRmJytk+O1cX2GhuK FZX9NFA+zsZ+l0MZKaVxEdzIUeFr5OZII0SzpL5CtzK6Pk+NrhOFknt8pg8nCGY2vM7I 0oQV9yTQYm4kHZjroQudKdTjuPmOBCwX7fjCSHt89QbPA4vvi4ZqBzzIduccvV5dgItI Djog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1EqDZLeGa1PGjXMcCdYL4dKOADUpamKDgDZTr0W7P9c=; b=KvrHxIjoKef0DMH95nVodxg2l941+3qmHqeRUu0lHDBEfZRc+Yr0yw/rwAATSGd2GB haqWQEdODRHapT7rvuV9dcc1vWa7ozMkuDLDlQ2gNRgVFzKpK4blZBomQuttPR8K7PaP MbB3+Q2vF+J9WtZHqBNkh4KlKJM41WJoRsgnQoobk3mBMZ+jc2MZTWZlSXpaYZ1cj7s1 h6TLtVekjZEtsmzYApLymLSfh19tBM/UMQPQD0vSTEygAq0WzEhoN21rEW1GDaCR4r+y d1qUrE6MHrbax0JT/CWEjp0TBDWOFQznc3m1EQ32pHzyhDkWPqStIyF5bwIjZObUzmMY MDFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=ttetO8Ej; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu3-20020a17090b388300b001fe1ce51d48si5526658pjb.89.2022.09.21.21.05.44; Wed, 21 Sep 2022 21:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=ttetO8Ej; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbiIVEEH (ORCPT + 99 others); Thu, 22 Sep 2022 00:04:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbiIVEDD (ORCPT ); Thu, 22 Sep 2022 00:03:03 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2093.outbound.protection.outlook.com [40.107.94.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B251CAF0FC; Wed, 21 Sep 2022 21:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Um0mP8r8pCy/9Piy7ifeFPechKyVFCKPtbeB5Psle3/0G0L9tVTlYrGCWAzYdnxq1I0ZBEL/4HzCgXSAuJ5eldpf133NptJ17fvKLJ/1tLj3uKBYGI/Bi9sI6W64XVm79zPkoOB5nN8KM1XH24bfjLT35gq/nxTpwqdkXbGytgV1J9tjusQ3YxcVknLBwnWJvtNhCXjowogb3jR05JmI1F2ZQOCT1VyJvuFkXz3F1cHneLmSW9NV8YYV/LoL7Tq9WD30o6f92sQIKqxg5U668WP3bGBCWnCy5/2Nm3CPJnzJD0v4gn7SP0qQ/FPpwd7SWz8Ke6fX9n60ptIXViHOZg== 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=1EqDZLeGa1PGjXMcCdYL4dKOADUpamKDgDZTr0W7P9c=; b=mZ0d05D6UzbI9hfgJSgo3aIVDLyq7aLl3axJJph9BSDY1IVT+0UHd7N9/+p700b9fC4RF/SUkDBae5oo16FTSO+fgl2fOWXxHkK5sPLz2d9LTuMARHrjZmI0x1YSjPiwL1av+h8jDC/bD7RLQgMjUMSf7M8LPK15yu/Lncw2b83BpDh7ujBu0Su728cHPJzlCegsYZ1fJGw4AOVz4DGHctG0RoLPcZ9CjbtynnbsosOsVHLvws6ICOE+UU4pyJBXy29/WpTwTUFV+HEVYYkTXtMHKJeGz+1iCZVEg/IKybhEABCnUPHFo+QdAFs8tyLPkdR7MuHybZQKeWmzW6s7vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1EqDZLeGa1PGjXMcCdYL4dKOADUpamKDgDZTr0W7P9c=; b=ttetO8EjOhSOuJ1dw+eW+sFTy+C92uhHxg5uzcxwNAiJNADGP3lB5m81fTRul8li2vPW+m/VHFFRKH04w4snNTugvDlZWmEh3YyOMnxZN4zzbHFwcSHysotk2Cm+XOO8N97hbviBm+eFCs2IeKNzNcZYnYFTMm+Hoep0YUWJxGU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from DM5PR1001MB2345.namprd10.prod.outlook.com (2603:10b6:4:2d::31) by BN0PR10MB5158.namprd10.prod.outlook.com (2603:10b6:408:120::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17; Thu, 22 Sep 2022 04:01:32 +0000 Received: from DM5PR1001MB2345.namprd10.prod.outlook.com ([fe80::b594:405e:50f0:468e]) by DM5PR1001MB2345.namprd10.prod.outlook.com ([fe80::b594:405e:50f0:468e%5]) with mapi id 15.20.5654.014; Thu, 22 Sep 2022 04:01:32 +0000 From: Colin Foster To: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Linus Walleij , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Lee Jones , Krzysztof Kozlowski , Rob Herring , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Vivien Didelot , Andrew Lunn Subject: [PATCH v2 net-next 09/14] pinctrl: ocelot: avoid macro redefinition Date: Wed, 21 Sep 2022 21:00:57 -0700 Message-Id: <20220922040102.1554459-10-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922040102.1554459-1-colin.foster@in-advantage.com> References: <20220922040102.1554459-1-colin.foster@in-advantage.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR05CA0009.namprd05.prod.outlook.com (2603:10b6:a03:c0::22) To DM5PR1001MB2345.namprd10.prod.outlook.com (2603:10b6:4:2d::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR1001MB2345:EE_|BN0PR10MB5158:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c88097b-e343-4dfa-1d74-08da9c4f22b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JtWz1DClgfOJDpUOjOqRarRQynfYOzGUvrYychaAJ+74hLckPg7UM/V938DApCJTSbspnnV+nwVmRXJNVczz4y2k40gTFrcDyhSdtFLgYkRjFOCjNX/e90XGVF0QPxunPN0DnRnYvD4x7tZyMEszLU48lhyfkfM7kM42o5WWAml4mbdY/PmYQ+qJeB88fqOeoxDcNbi9szUl8jf5IascCfeC3a1a0w38t/tcd8GrnK+gWBqDa7civtrGL2qNpJwtWbI/cpGbW+aFFvk+7FdmnVe9oCxaC/Qn4csr5G5flEFuRlI0w1vwvQrVFLXuOQrFmPjM7n/FV0XvPyzo+mVau3l2T1FmjRxzOWdReUYkM7977NnGBritt3cuhAZ09uGWUhPZk+W/CbT9n4vw6Djd9N+gmnB3ihB23mXQT9D+NUBpc4JlZVzRQDwRmWgSgzEPNHkT1fY+FqbCHAD9QNg/e4/zgpaxf+gR9z0VAdRpFKV/lYTJ2ESR2Hr2RIqmp4EONlVg4FyS918mNtUt00DHTtWYdhVCGAfCb4Kl2prbz06c6E7Z2SAVck9go1BtQoMozodruwCGogtWEmQfqm8oJ+AzuRV7DR2pmDYOzNXgR8vkEWJpX0uDnKgBQNH5SLT1QefUc8ELc1G60g2SV6bTf0HV6kxPrQ6JRJgwoLOhHv7feyEwUCvPAOk3dNOcdFPr20reLvQm5ApEke7wOTL2gX+xA+5tk93cD84U98FZboyFxT6Uog4oXAXDEGbiq/mieBVpiJucUa79/42Vq2fhfA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR1001MB2345.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(396003)(39840400004)(366004)(136003)(346002)(451199015)(6666004)(36756003)(41300700001)(8936002)(44832011)(26005)(6512007)(7416002)(6506007)(5660300002)(316002)(478600001)(54906003)(6486002)(38100700002)(8676002)(66476007)(66556008)(38350700002)(4326008)(66946007)(52116002)(1076003)(186003)(2616005)(86362001)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1pprJVUMIvBL5V5/BJWoILn4jdxNMC7sRHccc6gE5ta+nItn5SJR0s2og9yR?= =?us-ascii?Q?V2KypZt3II1QtlNR7sGWoH5Of0/kv/lCx1ob8VtYfMsIwGZQ/qxWoGRKQ/AI?= =?us-ascii?Q?pFhS/JVBFLYl9jJT1ETTH+LyAaaS/flBllvIWVD8PK/9RO1WmZw2MdVpds0G?= =?us-ascii?Q?ifOvASF8WYEb8L8CcZQ/kxvurQwCAyj9vw40kigErD3nrk+DWepDoX/FRN30?= =?us-ascii?Q?VfLUiAOrfj6c2SCoYGl2JgyQyjRwnSSYjsB4Ii6O+SsYEFMK743SffDoCagQ?= =?us-ascii?Q?bb2L2CLYoaDGmDFF1Pttnr0eoh6NvVwVU05ACiRf45T/MmByXRI0zBvl76f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ob4/w2bgVpY7Mxw9w5wtBVe83bokuMbcfwkORm?= =?us-ascii?Q?ay1H8Nqo9O8mxrEFKVIjvCy6Fcw+H2WaStXZJi/L/cgjTiVZmFpNbFJYrpjX?= =?us-ascii?Q?3hbzRq7Sf/yUGpcOGldOF90pId2i3waZTf6ukxmsaHkEZa/FfeSGbhWbeing?= =?us-ascii?Q?y3mz1DpgyZNm49FBY5sJqRDHqmBfO5JxubjdgtRUbfb67+pOFzf4hRxQTDbc?= =?us-ascii?Q?USdrnR4q+j94xdYJ4ixYcqvsetIPxVS9L1OumrNBt78h7TRJOK4rmFlg9djI?= =?us-ascii?Q?MdPYw1R0t3BS+sm00asaWal6luNfk+UW3cMEYILqrUuM+CUWoPGikUfLvcbZ?= =?us-ascii?Q?p61rUPOlXZlo2iZB0E+Autc07afcx4x+2Di22ugJOC7hr9dSPpZpPls37aZi?= =?us-ascii?Q?rahBAqK9FiGkpASZMhzClRs=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c88097b-e343-4dfa-1d74-08da9c4f22b7 X-MS-Exchange-CrossTenant-AuthSource: DM5PR1001MB2345.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 04:01:32.6684 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fEYA+oDOdMsXMl7EM2ZTD4UVy85vsaEJc35XZkbJBt4GQekezAEo1tOYw3K/k51QzbBfy7fO29gBZ4zGnA+YkuySzSF0AXGlbUnC3dPE5Vw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5158 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The macro REG gets defined in at least two locations - drivers/pinctrl/pinctrl-ocelot.c and include/soc/mscc/ocelot.h. While pinctrl-ocelot.c doesn't include include/soc/mscc/ocelot.h, it does in fact include include/linux/mfd/ocelot.h. This was all fine, until include/linux/mfd/ocelot.h needed resources from include/soc/mscc/ocelot.h. At that point the REG macro becomes redefined, and will throw a compiler error. Undefine the REG macro in drivers/pinctrl/pinctrl-ocelot.c before it is defined to avoid this error. Signed-off-by: Colin Foster --- v2 * New patch --- drivers/pinctrl/pinctrl-ocelot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index f635743a639d..b2191407fc1a 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1231,6 +1231,7 @@ static int lan966x_pinmux_set_mux(struct pinctrl_dev *pctldev, return 0; } +#undef REG #define REG(r, info, p) ((r) * (info)->stride + (4 * ((p) / 32))) static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev, -- 2.25.1