From patchwork Thu Aug 20 12:37:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1348360 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 ozlabs.org (Postfix) with ESMTPS id 4BXPM109wsz9sRN for ; Thu, 20 Aug 2020 22:38:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA60E822DA; Thu, 20 Aug 2020 14:37:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id EBB13822E5; Thu, 20 Aug 2020 14:37:56 +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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (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 67EBA822CE for ; Thu, 20 Aug 2020 14:37:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f196.google.com with SMTP id h21so1015022qtp.11 for ; Thu, 20 Aug 2020 05:37:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=PLLbyQ4q6AbbK6uc7/PMEYLvmv9k0E0Pz2sfspTakeM=; b=LCU7AGsE0HeZDtT7MPvVS/XLoo857Ktf5S6n7CdVEUshDT2UbgilCHlHADwCO/CtSJ Na6SW2dMTpvAk7qZqLWC77uAqZxy2VWke9JI82V3e6Ek6l3M5kDoSKGOAeNju6U+z8H1 okFqTp0d2sR/0n2YUyWbEwPRmqFCDVpArlT+R3qEwJNFQDabrIcmteDQYYpxpUjD7EQU CH/bmH10CVUAb4Y42rRfA5TlziBUwL/f50q1fgrDEqT4oZ2/hFR7ix7D/VGB+CbU012t RyW8KRkRwHO8iRBTM+35DztEVwyQ5ztVe8a8PNjeSHI5eLYQrGyexHdlQ0G7kbLm8lTS I/kw== X-Gm-Message-State: AOAM531xEbu9wUOPVk4EodLveCq+0Ejk8/bkbTknurTBUb5oKOgIe/jF zZ/EaoPVxY1ARUGeJC6xt31Lb0BUCw== X-Google-Smtp-Source: ABdhPJxJoTF5P49eBvWMYjgrK7ySPOsbRWFAV+lFavGgE/Y7EenxD0iAUfbSqwcBdpWAtXBsDeq6PA== X-Received: by 2002:ac8:4719:: with SMTP id f25mr2454282qtp.291.1597927072711; Thu, 20 Aug 2020 05:37:52 -0700 (PDT) Received: from bill-the-cat.local (cpe-65-184-129-173.ec.res.rr.com. [65.184.129.173]) by smtp.gmail.com with ESMTPSA id y3sm1983447qkd.132.2020.08.20.05.37.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 05:37:52 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH] checkpatch.pl: Make fdt / initrd relocation disabling an error Date: Thu, 20 Aug 2020 08:37:49 -0400 Message-Id: <20200820123749.17278-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 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.102.3 at phobos.denx.de X-Virus-Status: Clean Entirely disabling relocation of the device tree or initrd is almost never the right answer. Doing this by default leads to hard to diagnose run-time failures. Signed-off-by: Tom Rini --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3932362dbafd..4bed2b0cdc7c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2359,6 +2359,12 @@ sub u_boot_line { ERROR("BARRED_INCLUDE_IN_HDR", "Avoid including common.h and dm.h in header files\n" . $herecurr); } + + # Do not disable fdt / initrd relocation + if ($rawline =~ /.*(fdt|initrd)_high=0xffffffff/) { + ERROR("DISABLE_FDT_OR_INITRD_RELOC", + "fdt or initrd relocation disabled at boot time\n" . $herecurr); + } } sub process {