Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp454048rdh; Thu, 26 Oct 2023 06:56:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2oB/B7OyhKjKpa/Fe4CcB2mMZga+I4qIthgP6oaeJ42Fa0MAIFSLx+V43pHg7rFNfy1DB X-Received: by 2002:a81:9195:0:b0:583:f5fe:d73e with SMTP id i143-20020a819195000000b00583f5fed73emr20280900ywg.30.1698328568727; Thu, 26 Oct 2023 06:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698328568; cv=none; d=google.com; s=arc-20160816; b=WAs54xbFaPm9TYxqaanUq5MisECLegranFaTrNWrmbMIIayNT+8gGtMaOc8AcvPgUQ jk5sHoRmaK1u2ikFdgUwFfdkArtcO3xeLuKGymmij9fsVbqXr1ELj88txhe00hCgY8Ld 2trkl4ZNGZv9uXsSrCNsraQrmH8fYzPNNCDvnILPp4+31psf7zXFoHCXrEbX9nkFJP2R HRo1nOBo1RZ8TdO6mqbDRp9pe+UIvGhauFfJ8MR0LMPJ50J/6vGUI+6KDBRdopZEShvY navYc8OF2FfZvuK/X/j/FkeK6VDG0U7PL99F6BQnUWltdnt7vf/q2MIdtUrLqY7EGR9H eyzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0ADEAgtI2jHnjIir70+xe9DxyWbV6A9deb1xf+r8BW0=; fh=cyj2vRHLdhPAH9NolBx6JBOhyGPRUdrjME1ZgXhtUrc=; b=HcjkdAT63jva2kX1kZ1fTcn4B7LcOaX5pxIuinJZG+6GWB0jIDSQ1GevEz6qLaUfvp c5ORWX7mSql+e/9R8vHadPalbB08qdbcA+Ob66Vhi1Woc0DYkYk99pHoF4PfV63/V+96 aDERbgk2CaKdDuxt3jLPw40EpeItiaPQHNrRXWn0+aOHlgc2iClDcc8CqUrZNvOYho0D udjQADHr5XYG4MppigtPdu3+2p6CrybW4urUI2VNB9X6Rrp7YRXG84QYoOYVnwHmqcAG 0eu9fSk+R4etNGsUUJsVk14XmoiK1G+sExNqb+a1N9MuCGx3XLKVkjOBc4qrFXJrHqrO f2Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r135-20020a0de88d000000b005a50575ea11si15034299ywe.93.2023.10.26.06.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:56:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 16A0C80236D5; Thu, 26 Oct 2023 06:55:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345148AbjJZNzs (ORCPT + 99 others); Thu, 26 Oct 2023 09:55:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233035AbjJZNzk (ORCPT ); Thu, 26 Oct 2023 09:55:40 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97907D5E for ; Thu, 26 Oct 2023 06:55:36 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:32d3:3cb9:edce:43ae]) by michel.telenet-ops.be with bizsmtp id 2dva2B0022XL1Wb06dvaV2; Thu, 26 Oct 2023 15:55:34 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qw0pa-007YxK-1z; Thu, 26 Oct 2023 15:55:34 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qw0pi-00HArv-0X; Thu, 26 Oct 2023 15:55:34 +0200 From: Geert Uytterhoeven To: Rob Herring , Frank Rowand Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] scripts: dt_to_config: Fix nul-separated compatible values Date: Thu, 26 Oct 2023 15:55:31 +0200 Message-Id: <7da12517180c0330d96cd0e3d48382191748a1a7.1698328110.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 26 Oct 2023 06:55:58 -0700 (PDT) When using dt_to_config on a DTB: -------------- : /soc/adc@10059000 : renesas,r9a07g043-adc\0renesas,rzg2l-adc : no_driver : no_config : none When using dt_to_config on a DTS: +M------------ : /soc/adc@10059000 : renesas,r9a07g043-adc : no_driver : no_config : none +Md-c--------- : /soc/adc@10059000 : renesas,rzg2l-adc : drivers/iio/adc/rzg2l_adc.c : CONFIG_RZG2L_ADC : none As of commit 32b9c61307629ac7 ("Preserve datatype markers when emitting dts format") in dtc v1.4.7, "dtc -O dts" no longer outputs compatible properties containing multiple values as multiple strings. Instead, it outputs single strings, where the individual values are internally separated by an escaped nul character. Fix this by translating nul-separated compatible values to the traditional multi-string format before splitting them. Fixes: f858927fd6ce394a ("scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4") Signed-off-by: Geert Uytterhoeven --- scripts/dtc/dt_to_config | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dtc/dt_to_config b/scripts/dtc/dt_to_config index 299d1c2b20d7785a..563362f363e8cec1 100755 --- a/scripts/dtc/dt_to_config +++ b/scripts/dtc/dt_to_config @@ -748,6 +748,7 @@ sub handle_compatible() $pn_arg{node} = $node; $pn_arg{node_enabled} = $node_enabled; + $compatible =~ s/\\0/", "/g; my @compatibles = split('", "', $compatible); $compatibles[0] =~ s/^"//; -- 2.34.1