From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10704C636D3 for ; Wed, 1 Feb 2023 22:56:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF97485E47; Wed, 1 Feb 2023 23:55:53 +0100 (CET) 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="QCcKzYtc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A34285E31; Wed, 1 Feb 2023 23:55:33 +0100 (CET) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 3DD3D85E23 for ; Wed, 1 Feb 2023 23:54:42 +0100 (CET) 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-io1-xd34.google.com with SMTP id o1so81495ioo.10 for ; Wed, 01 Feb 2023 14:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tKdm60Qy7giAdoyDAqxCSujMLYiTMltaESPfaM+fBQ4=; b=QCcKzYtcr2Q5wIMyn4UpyGoJqR9ua4HanSbAnx8JhH4uDAbgQmIj7AFonrXHmFOYKv T5uZO7b2Ce8duRKiZFUc/3SF3vSYFBKr7yQqQPs8sSmR/9LK23HpFofGB559Xnn88P+a vkD7KvCYvuhIwqaJzJ4oFeCNGBSOc3f/NjwH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tKdm60Qy7giAdoyDAqxCSujMLYiTMltaESPfaM+fBQ4=; b=7FBmLasOCLQ9y+xFY5hnhB660fbYKvXEEpXOH9+0+LuF3JaS7QIH/Ox0y++GDK8DUI A4VtTorhyhrKr4wjLtN5izErtFn4EUrnkZhLPOF0XAGP/JcUdKLYpnF4UwxgS0v+4l3P 6lAmCnA/zMTi+J0xWWKcB84UdQKEjmJGTWa5dmkI3+KFQoCH6jjgoLH/H5W+cplJ/zyC Jhna2YlGTfDNHVCqYX2Kws4afWkEv52DEnRrwTQ2PEXz4oFyFfrgvV7UvjLR/oDMYkmb fjLs4LkrtmpGWmmNwR/ucWkex29fG4BX0FGQCv1HqTkAyZ9jOQkNk/AD/EpC9S52a7rN vLvQ== X-Gm-Message-State: AO0yUKUaCHAB+3OKQ8Xe0pMOZ5EGr6usqmM7tQFCv6F4k6kSp7h2QZTG Ie8YfgOMaOpLBqsPhCVQD/sy0LrnboaYORXN X-Google-Smtp-Source: AK7set/Kn6jsqN1T0J8zxhyR8jdSQ7GwtCk3+ynuqXQ8WcY/i/GpQLkZTAMSvcPc9KjIvsCXkrSd7w== X-Received: by 2002:a6b:8e4f:0:b0:6e0:7dd:5976 with SMTP id q76-20020a6b8e4f000000b006e007dd5976mr333762iod.12.1675292081728; Wed, 01 Feb 2023 14:54:41 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:1fda:cca0:9a42:148c]) by smtp.gmail.com with ESMTPSA id b21-20020a029a15000000b00374fa5b600csm6964474jal.0.2023.02.01.14.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 14:54:41 -0800 (PST) From: Simon Glass To: u-boot@lists.denx.de Cc: U-Boot Custodians , Tom Rini , Simon Glass Subject: [PATCH v3 7/8] checkpatch: Add a warning for pre-schema driver model tags Date: Wed, 1 Feb 2023 15:54:27 -0700 Message-Id: <20230201225428.2001161-8-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230201225428.2001161-1-sjg@chromium.org> References: <20230201225428.2001161-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass --- Changes in v3: - Add a new patch to warn about pre-schema driver model tags scripts/checkpatch.pl | 6 ++++++ tools/patman/test_checkpatch.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ccfcbb3e125..62b764f6c38 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2680,6 +2680,12 @@ sub u_boot_line { "DEVICE_PRIV_AUTO", $herecurr); u_boot_struct_name($line, "per_device_plat_auto", "_plat", "DEVICE_PLAT_AUTO", $herecurr); + + # Avoid using the pre-schema driver model tags + if ($line =~ /^\+.*u-boot,dm-.*/) { + ERROR("PRE_SCHEMA", + "Driver model schema uses 'bootph-...' tags now\n" . $herecurr); + } } sub exclude_global_initialisers { diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py index 4c2ab6e590e..a8bb364e42b 100644 --- a/tools/patman/test_checkpatch.py +++ b/tools/patman/test_checkpatch.py @@ -452,6 +452,12 @@ index 0000000..2234c87 self.check_strl("cat"); self.check_strl("cpy"); + def test_schema(self): + """Check for uses of strn(cat|cpy)""" + pm = PatchMaker() + pm.add_line('arch/sandbox/dts/sandbox.dtsi', '\tu-boot,dm-pre-proper;') + self.check_single_message(pm, 'PRE_SCHEMA', 'error') + if __name__ == "__main__": unittest.main() gitutil.RunTests() -- 2.39.1.456.gfc5497dd1b-goog