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 0C86DC636CC for ; Mon, 13 Feb 2023 15:59:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A4378568C; Mon, 13 Feb 2023 16:58:59 +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="eVF1wjqS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCAA8857FC; Mon, 13 Feb 2023 16:58:19 +0100 (CET) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 EB90985810 for ; Mon, 13 Feb 2023 16:57:30 +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-il1-x130.google.com with SMTP id h4so1939539ile.5 for ; Mon, 13 Feb 2023 07:57:30 -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=m+Rzh2AAuHVKcptlkFidgdd6ULeuqWZ18JM2hAl+Seo=; b=eVF1wjqSXDyGTx1gZOKal9UmX0vee1ZRq6mpaXK6Cnq3+KfQ7Yxjb7AM9l5tSH5Qj/ 9za4Vg04GJFgkV3F5HxFgl0BYjOc7UJ3xFHp5dZ0lkRQXKKHoXR6HZPdND60QJJAQaEr HLGeDfY4kbCM6RgoVgC6xtGEsRVevRZUM4qhw= 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=m+Rzh2AAuHVKcptlkFidgdd6ULeuqWZ18JM2hAl+Seo=; b=OzwrXGzalkZ86qijONvmyxbg0ct5YvujeXPxdrv7Rgnv0FMrepw1uzmZUdqDmQqY3j vTRp1ORUyFeez/3Her3J2Vi7lcX2Xki+KFUL87ar5UknPViAewV6H4FU9Qz+svCAEE7b SSES+HvFVzFIV4CWDKWNohpXhuRSb2HnLUuMpO7GrcDmQnVw1+xGe3V776TU8n2SNrj1 r7vQ6vFVbQ4gF5RHo+0E4iH00C/vK3RgtVD7hWchDI5J90gYBR4BnL0i5jpKAJCdG7sV xDpki6/+dqaKCOJxuxH/RT/nETdOIn7n7A1fqlATqqMFGr3puX8Q8gvYgJVrGcPIPgig uXzw== X-Gm-Message-State: AO0yUKXmTlh4TeZMiQWAD/ZMki0ta/fufYTIaWKIvqauzHv/ZWMKwh+e DcZUemQ6REGfDWycRRRbAQdGUzWsfrCHAVXK X-Google-Smtp-Source: AK7set+93ZavzF7ZlyTBJq3U/2d0H4wb03xwfnAECvfa5blzruyPJ0/HqJPvTMtrGz4jCPAVOzaY5Q== X-Received: by 2002:a05:6e02:156b:b0:315:2a3f:5a1d with SMTP id k11-20020a056e02156b00b003152a3f5a1dmr11386461ilu.30.1676303823875; Mon, 13 Feb 2023 07:57:03 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id b2-20020a923402000000b003154a4a039esm647463ila.5.2023.02.13.07.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 07:57:03 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , U-Boot Custodians , Simon Glass Subject: [PATCH v5 08/11] checkpatch: Add a warning for pre-schema driver model tags Date: Mon, 13 Feb 2023 08:56:38 -0700 Message-Id: <20230213155641.1208774-9-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.581.gbfd45094c4-goog In-Reply-To: <20230213155641.1208774-1-sjg@chromium.org> References: <20230213155641.1208774-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 --- (no changes since v3) 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.581.gbfd45094c4-goog