Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4566856ybl; Tue, 20 Aug 2019 14:10:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLylM3j3fvV5KCh26k97tuS1lC+z57G+nf6NvqlhORh9k6gabezDgbUwyZk4U0ld5IpQox X-Received: by 2002:a63:125c:: with SMTP id 28mr26327308pgs.255.1566335418941; Tue, 20 Aug 2019 14:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566335418; cv=none; d=google.com; s=arc-20160816; b=ojTHLEkR7LfqM4N0ao6NX3KK+cHyfn/YQjjHCdTSTZrTPSb1iAO6rFTOnNP+bpgeSg 4up2/w/3s5MFlXRnzBIZZYXA2ZoDLrLPcEQVyhINW8ky7AlGxYMMpZCvYTSBC0zITH0s xYMl7dFlGyPraHWQXorKFRfWB60mRAJ9my6ZrL/X/7veXAfFhCRb2OqviuCzPCYTVJw7 qeSBd36FoP6ASqHz1nwOqJBGAKtUwLfWWxlGWQcgqCTQtDCsq0lrJXATvsgMqkWvnz6E xuidtschWnQIxNiRbzk8cgujGzZ7prY1BFVdYdigSOtonMWoXsBfydcOExeSk/CsK8Io dGJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9zQbwzrHfFg96Q97SmcVk19Fd40FalbdsN7CaSvMugI=; b=d4lfycBANCNan+AT79hY9ZhwWDjq237GrsJ77E7/W/8CDTqugIJcWvTkU5XiOAIp+9 ZrhC2b2KOQw8qyt4H8w6QWRpFx2W7BHTDrEfzYBEQL0UXnviLCgTMTeJxp65gkmVYnfX FBYjMRhccT9+ROE6TPD5v34ECWZwkC0jgkHI+roRHqK1ujIhLUbpVMCJtKpBUsvTnchM Mz4TSue1pMfigLlCAP6T3GLy2cXGKiMu4vXw8BpQREp6mMgTTTRm7lRq1r0dU/kbMmH7 uz0u5wrr+2NKTX1TohMf91+70RCZqHtBjatA+CeY+yxPhv9eEfyj1nEXgLchQniTp9yB jbww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iW94QW+j; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si13711945pfi.48.2019.08.20.14.10.02; Tue, 20 Aug 2019 14:10:18 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iW94QW+j; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730786AbfHTVJJ (ORCPT + 99 others); Tue, 20 Aug 2019 17:09:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:45204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729833AbfHTVJI (ORCPT ); Tue, 20 Aug 2019 17:09:08 -0400 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9745D22DD6; Tue, 20 Aug 2019 21:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566335347; bh=H64XkBuRAcQnYzn8+CQCDtiy52IhIiaYr4GOLtsnSNQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iW94QW+j9onF8Mv6031/1TMLrkZk5qiLJUBBEqWri0F1pxjrP7ODbDb3ECH1UOqnC VxMViU7dJ/vXi+K6AP6UjeTQgigHstinZWfNQswKBB18pJX6bcTJcOeYpYSFiO9+2G A2foQ/g7cxWAeDdu14JV2Ofrd0a33u6w2QnsZ8Rw= Received: by mail-qk1-f171.google.com with SMTP id r21so5799738qke.2; Tue, 20 Aug 2019 14:09:07 -0700 (PDT) X-Gm-Message-State: APjAAAX/qA6Afz+H504gNP4/NoMfzjqMa/fnu2xSTWMh5cJva+cbKHMh 4bqt7gWU3q4uDbC9lADlqcuZ9HTh0t6c6XOgZg== X-Received: by 2002:a37:a48e:: with SMTP id n136mr28828151qke.223.1566335346826; Tue, 20 Aug 2019 14:09:06 -0700 (PDT) MIME-Version: 1.0 References: <20190726181108.GA17767@Red> In-Reply-To: <20190726181108.GA17767@Red> From: Rob Herring Date: Tue, 20 Aug 2019 16:08:55 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: How to add multiple example with conflicting includes To: Corentin Labbe Cc: Mark Rutland , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 1:11 PM Corentin Labbe wrote: > > Hello > > When I try to check the following examples of a devicetree schema: > examples: > - | > #include > #include > #include > > crypto: crypto@1c15000 { > compatible = "allwinner,sun8i-h3-crypto"; > reg = <0x01c15000 0x1000>; > interrupts = ; > clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>; > clock-names = "ahb", "mod"; > resets = <&ccu RST_BUS_CE>; > reset-names = "ahb"; > }; > > - | > #include > #include > #include > > crypto: crypto@1904000 { > compatible = "allwinner,sun50i-h6-crypto"; > reg = <0x01904000 0x1000>; > interrupts = ; > clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>; > clock-names = "ahb", "mod", "mbus"; > resets = <&ccu RST_BUS_CE>; > reset-names = "ahb"; > }; > > I get: > In file included from Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.example.dts:42: > /linux-next/scripts/dtc/include-prefixes/dt-bindings/clock/sun50i-h6-ccu.h:9: warning: "CLK_PLL_PERIPH0" redefined > #define CLK_PLL_PERIPH0 3 > [...] > > So how can I add multiple examples which need somes conflicting #include to be validated. 2 clocks versus 3 clocks hardly seems like a reason for a 2nd example and I would just drop it IMO. You could rename your defines to not collide, but that's kind of painful. The 3rd option is getting dt-extract-example to spit out N example files and then build each one separately. That was more complicated than I cared to figure out with kbuild, so I went the simple route. Rob