Received: by 10.213.65.68 with SMTP id h4csp2142855imn; Sun, 8 Apr 2018 20:49:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+l5BQfhnH2hDVFE/NGimkCArFKo4v6sKp+8l0EARTbXu8H1NRMnv95EuM4vCuMphzoI0lW X-Received: by 10.99.99.194 with SMTP id x185mr23710792pgb.4.1523245752760; Sun, 08 Apr 2018 20:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523245752; cv=none; d=google.com; s=arc-20160816; b=lb++dSM5yZJ2eo4atJb0M52Z+/ETznfoWsr7ySsmjzmSDIuF9DloIQRFS+W/s4iUSL 7/Ulo/mSzjL2FK8VgjgQNe56h34NBTnGx/sc0CkQkzwooY/qe+CH3TPEtTZ2tMR5Vkeb UWsNTe+wxAFGss+E86NfXIfZgboIpldAFp6i7rjLCzFBss1BgSrNXAkLkX425qECqa2g IluNocuVH42Yr/2Xsoe+VRkT2Soxh9FjrFeu0MgoeXeYG1tyHJfQaAv0mvGPKx/vKjYq z9GHWb6ZxsC7JR2TO4sxys8uQiJGoD/JQIFUOeiDBS+0rp8NAz8Hqe/upKJT8/9faNn3 rp3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Ig1KXT1k0uuXxwdKYrj/gtJ28He9/1KBdqQJPaOYAfc=; b=FILYWDEGdNbo4NewqHecjp2j1gwI2vp9oIgZum88LpJDKzgdXbwN2zo0Sh68gfl1b3 BuxRFmf2DVxCGyZzpx/IAvaAvjdBKXtA9RQoE8kOcwRTv7gLvqHmb4tibaE+WjhSE3kX nqomsEWSpDgINW2U37m0ADWogb3ChQ6+hoAAEd9kjlV1zKYTpmntKEQIQtJ5Ovocz6u3 m7uvceJsnceMM41uNFErBcuaFTv9oH8PM6ELMJRaheJCTsNHaF+gYIPe08aWGSv1sm+x t6Gz7cgoa2Hdfj9tZNHWwy8YMRDnQGyeMvp08UhAD/kMeHEdyI83OrDKA/k9PHs20dr8 G6Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Q0DUuNL5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e98-v6si7630122plb.273.2018.04.08.20.48.35; Sun, 08 Apr 2018 20:49:12 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Q0DUuNL5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbeDIDnY (ORCPT + 99 others); Sun, 8 Apr 2018 23:43:24 -0400 Received: from mail-sn1nam01on0138.outbound.protection.outlook.com ([104.47.32.138]:56136 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754241AbeDIAUd (ORCPT ); Sun, 8 Apr 2018 20:20:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ig1KXT1k0uuXxwdKYrj/gtJ28He9/1KBdqQJPaOYAfc=; b=Q0DUuNL5SpraCmNwHdlgB4oOzmUp7t/RXQo3JysGEubb2hu7u1wRlAU7kV/SpRQBitGnYK44V/2ziNp+sFaqt3DljQFbFHkLgTbksYWwQBvo96kdBrFrGeNcGGstso3/2hq2Ms6OZ2GPmyJY9RQzygTebr0Ijnt4RMeT2nWrPdk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0920.namprd21.prod.outlook.com (52.132.132.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:20:24 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:20:24 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: James Hogan , Ralf Baechle , "linux-mips@linux-mips.org" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 147/189] MIPS: generic: Fix machine compatible matching Thread-Topic: [PATCH AUTOSEL for 4.15 147/189] MIPS: generic: Fix machine compatible matching Thread-Index: AQHTz5hTfq8CkF0NfU+cDzDQiScnlw== Date: Mon, 9 Apr 2018 00:18:46 +0000 Message-ID: <20180409001637.162453-147-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0920;7:Jq4qP3/j93Rxwd7azGRWiQ5l3WxAE77GwBy+v6smIoHZXXILhICnURg0OtNo/O5QgrCFy9ONzKAP7bjnee5Mj79C20qck6EtW8t/Y1vB+LCcQ8818He8rfxRhmK/WwSizE8Pl2gbn6epvMZhg3QHgSA8x0mpPhncYs8A4WON3+l7cj9Wqr3SLOC4vYWwB5/ZjMMdCcxrZsF48z+RZjbA47ktzXq/FiNEU57ff9xUocc3CsbrWTPT2Np//GDP8WIo;20:jd2WAh9bdahphJkGn8KPr6+AokbPk0fuwJB7iAqsjV5Jn/lmASIuYCdrmW/yyYSJi2Aag5G7wKNii8YB7d5IaKscMIOC9IJjlm1sBJ0JK/Y8QjzqOloip7PpAwojP7nXp3a9Wuh8DxqwxllZdqfcVK4Mxz64IkYmML55fPCsKiA= X-MS-Office365-Filtering-Correlation-Id: dbe701f9-630a-4317-8bc5-08d59dafaffc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB0920; x-ms-traffictypediagnostic: DM5PR2101MB0920: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0920;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0920; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(199004)(189003)(66066001)(86362001)(59450400001)(3660700001)(3280700002)(25786009)(76176011)(2900100001)(36756003)(6506007)(2906002)(99286004)(86612001)(6486002)(102836004)(305945005)(1076002)(7736002)(575784001)(97736004)(2616005)(446003)(11346002)(476003)(486006)(26005)(6666003)(6512007)(4326008)(107886003)(6306002)(5660300001)(478600001)(6436002)(105586002)(10290500003)(966005)(5250100002)(22452003)(316002)(186003)(8676002)(110136005)(81166006)(54906003)(6116002)(8936002)(72206003)(53936002)(2501003)(3846002)(68736007)(14454004)(81156014)(10090500001)(106356001)(22906009)(41533002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0920;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: M9pra/hXKfG2QONbwE0qc1H18PnjXi9Fv1cmaIAoq787REkvT3+ALNHCNDf8KPV2806Xv7xlKAkFio/DgK9D2i+/rhz8IJKsA4+4mqnEwqj6iWj9PkpIiQ67ZVESDLieQL2hBsh4fy3ZH6h+VqbHHSPJuq7pq/DN6lKba7GroSwVfKA+B/qSAEfzz/kcE16OFADaUbI2M6bWXIe+fCRgO8G4vcwfJnvlHtq1xvA+WyOxQb3kXVovkddlejt/ZH7aoQgm+YLLKSHnA8qLf6VgtZU7Ywb9MoMQhDN1oJduPKTE8+Tz9BQYsRDVmsnOaOC9Dx8+OZnniHMm5nMxo3v8WpKRG/IKC+roUmqtt8QMxzWc/GlNE8Mmqa06d4VQfMAXORv31OVrxCRXcHnsBjjSX4pcLWeVi6ynuq8yjUUoVf8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbe701f9-630a-4317-8bc5-08d59dafaffc X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:46.6280 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0920 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Hogan [ Upstream commit 9a9ab3078e2744a1a55163cfaec73a5798aae33e ] We now have a platform (Ranchu) in the "generic" platform which matches based on the FDT compatible string using mips_machine_is_compatible(), however that function doesn't stop at a blank struct of_device_id::compatible as that is an array in the struct, not a pointer to a string. Fix the loop completion to check the first byte of the compatible array rather than the address of the compatible array in the struct. Fixes: eed0eabd12ef ("MIPS: generic: Introduce generic DT-based board suppo= rt") Signed-off-by: James Hogan Reviewed-by: Paul Burton Reviewed-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18580/ Signed-off-by: Sasha Levin --- arch/mips/include/asm/machine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/machine.h b/arch/mips/include/asm/machin= e.h index e0d9b373d415..f83879dadd1e 100644 --- a/arch/mips/include/asm/machine.h +++ b/arch/mips/include/asm/machine.h @@ -52,7 +52,7 @@ mips_machine_is_compatible(const struct mips_machine *mac= h, const void *fdt) if (!mach->matches) return NULL; =20 - for (match =3D mach->matches; match->compatible; match++) { + for (match =3D mach->matches; match->compatible[0]; match++) { if (fdt_node_check_compatible(fdt, 0, match->compatible) =3D=3D 0) return match; } --=20 2.15.1