Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp414122imc; Sun, 10 Mar 2019 09:25:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMEJkVHPZTqhqbw2KyOa46N7f5pPfYDZNUhSB0flKWdAxR7Zbx1MVrErl86nxGIi2Is/sy X-Received: by 2002:a17:902:5066:: with SMTP id f35mr30246970plh.184.1552235126275; Sun, 10 Mar 2019 09:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552235126; cv=none; d=google.com; s=arc-20160816; b=D+EXAtKtavpAXTNmEVcffVhcqLuM6Du39IlJQg64Ah6TsGB8+yUshqcJ93wn6Rlw0J geND8rYAwLJRNd5TIGntBZztvwYA+0u7rUP6nHrftfzcuaw+z2wWtr2loZY5eDhz8KVL G6Xm2MnzyBgUFpzuo823jPP1Li58N9UjM20+oe4XykHmqoVA4vrkFbGcH2BfRugNh0IP eVT3tGiP2oVUSltj0JBB8zzD9KwJPEt5RJyx/f88Va5l5c98C3dpOTvxTYKlP5KM1fEe MJ3fYK4Iud+vobKfgmfNCysotQ+qDsdVOZJEbuslTVDhoJucDYOgk1fhv7Y16CtpkFxJ SfDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+l/rBuQWUqZXFNRVTlB8/RFSeX7iupfm0Zqsvdilyh8=; b=iFixPH9WNACI+ks3Me7DqTxMlNryDLVHPue5ZvV6Ew0+9X2aPPkFdPoWB6vwKo+rI3 U5vRZEwIZIvfxD4WQXVxA0njh2+aVDCgD4G4o73L8B8z3F0Kd5YLdyfk6jPIOCStqbQy rwRE04bQDYUmNmVLmu9arms0jNitudcsHU+I19WSseXDoRYNWLaubOY1KW4OeBimsdoJ DZfYAeLyIU0/HFnRoWkNCBAGOXo1y+igJZmidDZq8DSRNtediR+JMvMitFFJmAz52iQL SZ5de4lFmYc+tXQZA+SO6VTogJtRgYsClUJEgaDpk674jmu0pzS/+VRnZsNkx232qGri 2+ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si2941941pgp.102.2019.03.10.09.25.10; Sun, 10 Mar 2019 09:25:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbfCJQYq (ORCPT + 99 others); Sun, 10 Mar 2019 12:24:46 -0400 Received: from shell.v3.sk ([90.176.6.54]:45096 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726624AbfCJQYp (ORCPT ); Sun, 10 Mar 2019 12:24:45 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 9491A102CAC; Sun, 10 Mar 2019 17:24:41 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id XucE6Pt2b5L2; Sun, 10 Mar 2019 17:24:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 59499102CAE; Sun, 10 Mar 2019 17:24:30 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JnOXzDvO-8v8; Sun, 10 Mar 2019 17:24:29 +0100 (CET) Received: from nedofet.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id C8800102CA8; Sun, 10 Mar 2019 17:24:28 +0100 (CET) From: Lubomir Rintel To: Sebastian Reichel Cc: Darren Hart , Rob Herring , Mark Rutland , x86@kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lubomir Rintel Subject: [PATCH 02/10] x86, olpc: Don't split string literals when fixing up the DT Date: Sun, 10 Mar 2019 17:24:11 +0100 Message-Id: <20190310162419.11861-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190310162419.11861-1-lkundrak@v3.sk> References: <20190310162419.11861-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It was pointed out in a review, and checkpatch.pl complains about this. Breaking it down into multiple ofw evaluations works just as well, and perhaps even reads better. Signed-off-by: Lubomir Rintel --- Changes since v5: - This patch was split off from "x86, olpc: Use a correct version when making up a battery node" arch/x86/platform/olpc/olpc_dt.c | 33 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/ol= pc_dt.c index b4ab779f1d47..b69c50cb9742 100644 --- a/arch/x86/platform/olpc/olpc_dt.c +++ b/arch/x86/platform/olpc/olpc_dt.c @@ -239,9 +239,9 @@ void __init olpc_dt_fixup(void) pr_info("PROM DT: Old firmware detected, applying fixes\n"); =20 /* Add olpc,xo1-battery compatible marker to battery node */ - olpc_dt_interpret("\" /battery@0\" find-device" - " \" olpc,xo1-battery\" +compatible" - " device-end"); + olpc_dt_interpret("\" /battery@0\" find-device"); + olpc_dt_interpret(" \" olpc,xo1-battery\" +compatible"); + olpc_dt_interpret("device-end"); =20 board_rev =3D olpc_dt_get_board_revision(); if (!board_rev) @@ -249,19 +249,24 @@ void __init olpc_dt_fixup(void) =20 if (board_rev >=3D olpc_board_pre(0xd0)) { /* XO-1.5: add dcon device */ - olpc_dt_interpret("\" /pci/display@1\" find-device" - " new-device" - " \" dcon\" device-name \" olpc,xo1-dcon\" +compatible" - " finish-device device-end"); + olpc_dt_interpret("\" /pci/display@1\" find-device"); + olpc_dt_interpret(" new-device"); + olpc_dt_interpret(" \" dcon\" device-name"); + olpc_dt_interpret(" \" olpc,xo1-dcon\" +compatible"); + olpc_dt_interpret(" finish-device"); + olpc_dt_interpret("device-end"); } else { /* XO-1: add dcon device, mark RTC as olpc,xo1-rtc */ - olpc_dt_interpret("\" /pci/display@1,1\" find-device" - " new-device" - " \" dcon\" device-name \" olpc,xo1-dcon\" +compatible" - " finish-device device-end" - " \" /rtc\" find-device" - " \" olpc,xo1-rtc\" +compatible" - " device-end"); + olpc_dt_interpret("\" /pci/display@1,1\" find-device"); + olpc_dt_interpret(" new-device"); + olpc_dt_interpret(" \" dcon\" device-name"); + olpc_dt_interpret(" \" olpc,xo1-dcon\" +compatible"); + olpc_dt_interpret(" finish-device"); + olpc_dt_interpret("device-end"); + + olpc_dt_interpret("\" /rtc\" find-device"); + olpc_dt_interpret(" \" olpc,xo1-rtc\" +compatible"); + olpc_dt_interpret("device-end"); } } =20 --=20 2.20.1