Message ID | 20200719161601.495421-30-sjg@chromium.org |
---|---|
State | Accepted |
Commit | a0558aca55c16a7f561656cb11bf172ef414bcec |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=hlRMLUg9; dkim-atps=neutral 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B8qr63yFqz9sR4 for <incoming@patchwork.ozlabs.org>; Mon, 20 Jul 2020 02:21:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 24C0081E3C; Sun, 19 Jul 2020 18:19:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hlRMLUg9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16C4881CE2; Sun, 19 Jul 2020 18:17:11 +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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (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 7251F81C26 for <u-boot@lists.denx.de>; Sun, 19 Jul 2020 18:16:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x144.google.com with SMTP id e18so11274338ilr.7 for <u-boot@lists.denx.de>; Sun, 19 Jul 2020 09:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2aYO2TljRu2x8ZTXlfUCfS85jwl9f1bAEzb9ts4Xxxs=; b=hlRMLUg9UrtWZ59FD1aqt4e30+PFzD4kn5lKlgDYLqOZgMnUYKUZ/JCsw1b/qI33bv SsjpwhufIqlH1PYhLQpi7u5hz5NAfj/7wl3DahLSLKfjrgrwlYkRPkGbZgAdi/FQZdrx N/LKGFpuvmfS24N9DG+MHM2WWRZjhf6wlYl5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2aYO2TljRu2x8ZTXlfUCfS85jwl9f1bAEzb9ts4Xxxs=; b=IN39sL/BNP1otrVy+ESYSWLRPEnb13sQHQduSLF/EfuDfsK8S6C+95S+fxwqwH0aV8 RX6ru+JfiGocZeumAELQXaIYUSlAdf58AbSqJFh4V5ZOtRy2HKwtRBD0ZgH7NYBBgIA4 HbsQgWgM1h70V2MuDs9hy2ITUEuKqfCyqd94BX+/VT+vEVhk2LE1ZoCID8ujdJd3YH8q 35U5WqUHxYVxlf6M/ZQ5ty6eRJO+U6qfMdaBO8ux0PrBDjtUgbdP1o4yU9t/GH30X0lg YL/R11rlzTqJ5y9btrx51h/hpWcFEr/j+KepIsWCu1MHfL7fvQOAFq7AospBvKlUSZoo XEfA== X-Gm-Message-State: AOAM530Pj/lPTZz7XSaMTwBs06F7bEQcwtIQtWZP+vrU7uFkqiBhRB4i dGSpJu7t8iL+csAJoEdC8qhEB4wv8/FzxQ== X-Google-Smtp-Source: ABdhPJxELJDSw9jEidspKvWM6QUx9GMdvdt+06/Kx9wrWFGErxlnrNKQFcQg+tfkKYnsfUfATjNrNQ== X-Received: by 2002:a92:d186:: with SMTP id z6mr20438860ilz.227.1595175409096; Sun, 19 Jul 2020 09:16:49 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id c3sm7415632ilj.31.2020.07.19.09.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 09:16:48 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Simon Glass <sjg@chromium.org>, Marek Vasut <marex@denx.de>, Pavel Herrmann <morpheus.ibis@gmail.com> Subject: [PATCH 29/31] dm: core: Guard against including dm.h in header files Date: Sun, 19 Jul 2020 10:15:59 -0600 Message-Id: <20200719161601.495421-30-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog In-Reply-To: <20200719161601.495421-1-sjg@chromium.org> References: <20200719161601.495421-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
dm: Avoid including dm.h in header files
|
expand
|
On Sun, Jul 19, 2020 at 10:15:59AM -0600, Simon Glass wrote: > Header files generally should not include header files just for a struct, > since forward declarations work just as well and reduce overhead. > > Add a warning for dm.h being included, since this has crept into U-Boot. > > Signed-off-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
diff --git a/include/dm.h b/include/dm.h index 2e1afda440..a1b84169e6 100644 --- a/include/dm.h +++ b/include/dm.h @@ -3,6 +3,10 @@ * Copyright (c) 2013 Google, Inc */ +#ifdef _DM_H_ +#warning "Suspect dm.h is included from a header file - please fix" +#endif + #ifndef _DM_H_ #define _DM_H_
Header files generally should not include header files just for a struct, since forward declarations work just as well and reduce overhead. Add a warning for dm.h being included, since this has crept into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/dm.h | 4 ++++ 1 file changed, 4 insertions(+)