From patchwork Thu Sep 30 15:52:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= X-Patchwork-Id: 1534927 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=i/9h1lEQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HKyg60Lygz9sRf for ; Fri, 1 Oct 2021 02:02:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA07280F3B; Thu, 30 Sep 2021 18:01:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="i/9h1lEQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C22180F3B; Thu, 30 Sep 2021 17:52:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 559B4802C6 for ; Thu, 30 Sep 2021 17:52:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ptosi@google.com Received: by mail-wm1-x333.google.com with SMTP id z184-20020a1c7ec1000000b003065f0bc631so8893046wmc.0 for ; Thu, 30 Sep 2021 08:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding; bh=nqPUJEDJA2JIAh4TyFaICyk7ST/gyFqptwDCw1hqZk0=; b=i/9h1lEQ9kDkD/W8PQXVPA3chrrFG18XlUJSrkMuOaEcviJP/p/cn13mgE7Dpikbie 5ZcxRE4oje2WN4IIZowRWSR6fFjXx+MyRp3Q2JPpVITphmt5jD/109cBafNhDZ7+PHIF jddyfeMqezIDbaO+NvQg5sJoBwBlFsvEO1VNm9fmfiiO3SeS68tvZG9WJfRRdCZ96p0z +Ka5KoY7EfLh1hbjpjlRuC2J5UgQbYSE8c4dym873OY9fVEDm36lPeSXPagEcycL08DC UpsrT4tcKpxNdsMrWU44sFj53cz2xDQXU/tY31Xs92J6PYgIMahDVTqROs1jMo1zmYRf F9jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding; bh=nqPUJEDJA2JIAh4TyFaICyk7ST/gyFqptwDCw1hqZk0=; b=XBfjrafKiiCpR9g2NQeqIk69B06/V0o1OlqvQUFlKtbWmo3vQ2p/WZR/7ZOnPqE05e iO5MzyCxSxnax4nUn00rFg1XnJxwgI8x/TLJe3CXTuLMR6rQo8wPFauIaqnnM4IKNe4v nzlOArN0wZ8P4KYgfH8hb33pL1bq2bvwE/7ZMNFCJka/4Pbfxn1cET76Wm9NnX++j8eB ZMAY4cQqNHGOY0+VOzUP7TsTNsSaz0rlQ4PoxaSoUt8rrqj+s8XRqzeRcgkSJYsHr6xy GQutNvTvwtjUDQbBNfPA5+kLacaV7UeyD1BaTK4qLSk6RN7owV3WeMPv6PA8WUq6riDi T3pg== X-Gm-Message-State: AOAM533g6KUMR2W6ajt86dIpSB8Jsp5uOHFS2zvHDXgb8vPUSDpPNLeG 4Az37xxduOjwqRYSTJRVCOb0nmsBmEjafQ== X-Google-Smtp-Source: ABdhPJyT2CJfLU/tG6S54fgmHUVO0KmFYP3FJ9ZlX57+ypkLMpQ3S5WQf1eZfBPfbW5SOiNNd0Eg1w== X-Received: by 2002:a1c:7c18:: with SMTP id x24mr17028240wmc.182.1633017174491; Thu, 30 Sep 2021 08:52:54 -0700 (PDT) Received: from google.com (203.75.199.104.bc.googleusercontent.com. [104.199.75.203]) by smtp.gmail.com with ESMTPSA id y8sm186399wrr.21.2021.09.30.08.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 08:52:53 -0700 (PDT) Date: Thu, 30 Sep 2021 17:52:45 +0200 From: =?utf-8?q?Pierre-Cl=C3=A9ment?= Tosi To: u-boot@lists.denx.de Cc: =?utf-8?q?Pierre-Cl=C3=A9ment?= Tosi , Simon Glass Subject: [PATCH] dm: Fix util.h's broken include guard Message-ID: <20210930155245.fz5ktsg3kqqdfboi@google.com> MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Thu, 30 Sep 2021 18:01:56 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Fix up the header's include guard to contain the definition of dm_priv_to_rw(), which was erroneously added outside of it, by moving its #endif to the end of the file (i.e. where it belongs). This removes the risk of compilation errors resulting from the redefinition of that function where the header might have been (indirectly) included more than once. Fixes: cfb9c9b77c2 ("dm: core: Use separate priv/plat data region") Signed-off-by: Pierre-Clément Tosi Cc: Simon Glass Signed-off-by: Pierre-Clément Tosi --- include/dm/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dm/util.h b/include/dm/util.h index c634e470e7..17baf55c25 100644 --- a/include/dm/util.h +++ b/include/dm/util.h @@ -48,8 +48,6 @@ void dm_dump_driver_compat(void); /* Dump out a list of drivers with static platform data */ void dm_dump_static_driver_info(void); -#endif - #if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY) void *dm_priv_to_rw(void *priv); #else @@ -58,3 +56,5 @@ static inline void *dm_priv_to_rw(void *priv) return priv; } #endif + +#endif