Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4107435imu; Mon, 7 Jan 2019 15:53:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN4G6OiBz80byIvME3XXE056M6NNFDneB35IBPL/G69glOKU2AG0EAyVArl/4AmT4jpsQ0sZ X-Received: by 2002:a17:902:3181:: with SMTP id x1mr21889384plb.58.1546905183804; Mon, 07 Jan 2019 15:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546905183; cv=none; d=google.com; s=arc-20160816; b=CUDC5joQbO6vF+6RjblEYiNImw4wjTXA5lAW1+4iJkAOn4z8AZXGqC5QRW+WIzorg9 WeNyRiGovRGb1umV+KmcUu7ugV1ivpqT1w68EFk0EqQ4GRtajGXztmKpIbQMXosO4qC/ 6fZm004PXd+169X4FcHQSJA1W7BnMjdye1t6qlYFKpRH36fftifbE5ayk09fqhoCGgBN TFAy0A/2ZZlAcCzXLuBH9TJWwPuHy9jOmRKlRimpIFUxDXMXwZhBawDY6YgYs1P2rULD WNcFR7SAUv//l8oYt2zwd01WN9UdPahmXmYLT/8RK1OyjFWayBAwEUlpCPaR9IMKvYao UZ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xn61LciU852lC0s/0vcaFFX0UINtckSWf2BCR2wBePY=; b=qUoCiaiy3hzPLozq3Goqg2sd3SMdtc0+XSmPj8XxHbLsGuxM2MmgnkfbdTTYFf2mTi A9lC4/o/0cjoooj1pnyIlqFlfg2TOo+gALEq6GGws819y+D1SC1/FHUtHPF9GT9hXi2i 6XcBJl6Bk11Y2df4Mh4PDNSFsZH3Djf75DQCyyy7Yo1f0CTNqz24+XeQEWxed0YjVir2 x74m7hxds0eaIVXE8gRfSEz42IKsLGDoXzKCIfcvKz5nl7mxrUdanG0ovimcDXXocVer NoHgqZb3/jAUsIrJSjTw1/20kvOAPB7sdId0CKjYDWjR34kNiLQhB18HbKXK2CrMbSA3 Y+1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fu8Xy3+o; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u123si4174194pgb.516.2019.01.07.15.52.48; Mon, 07 Jan 2019 15:53:03 -0800 (PST) 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=@kernel.org header.s=default header.b=Fu8Xy3+o; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727367AbfAGXvP (ORCPT + 99 others); Mon, 7 Jan 2019 18:51:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:51092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbfAGXvP (ORCPT ); Mon, 7 Jan 2019 18:51:15 -0500 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83DC9218A3; Mon, 7 Jan 2019 23:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546905074; bh=DJXo8EwHxRi2342Lqz7RWmZz41C+4f0qNUh7ubuIEHE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Fu8Xy3+oe2+CWSbwbm/OUh3w0s/aRev1elhs6CKXWrVv8f0iIZ/n/0EktuhkviIGZ GE304WfDUbYncof2O72ABxo+4/a7eN6/7TApfpY/bFWfOnam+IeAgid77dogua9Gk/ polotVlTJwgfCTO1zB5gdCmgF+mw98O2hkuVaxD4= Received: by mail-qt1-f178.google.com with SMTP id l11so2574578qtp.0; Mon, 07 Jan 2019 15:51:14 -0800 (PST) X-Gm-Message-State: AJcUukenD6YsPulz/e+WcyEimitaTZZi6APFKC9+NfU5qejCanZrjVsk Ls5nNshY3nh2U1iH5pR4k9ll6/YIsEQe7u5PrQ== X-Received: by 2002:aed:3ecf:: with SMTP id o15mr62852002qtf.26.1546905073693; Mon, 07 Jan 2019 15:51:13 -0800 (PST) MIME-Version: 1.0 References: <20190107173132.27316-1-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Mon, 7 Jan 2019 17:51:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] fbdev: offb: Fix OF node name handling To: Mathieu Malaterre Cc: Bartlomiej Zolnierkiewicz , Elimar Riesebieter , LKML , "# v4 . 11" , dri-devel , Linux Fbdev development list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 7, 2019 at 2:36 PM Mathieu Malaterre wrote: > > Hi Rob, > > On Mon, Jan 7, 2019 at 9:11 PM Mathieu Malaterre wrote: > > > > On Mon, Jan 7, 2019 at 6:31 PM Rob Herring wrote: > > > > > > Commit 5c63e407aaab ("fbdev: Convert to using %pOFn instead of > > > device_node.name") changed how the OF FB driver handles the OF node > > > name. This missed the case where the node name is passed to > > > offb_init_palette_hacks(). This results in a NULL ptr dereference > > > in strncmp and breaks any system except ones using bootx with no display > > > node. > > > > > > Fix this by making offb_init_palette_hacks() use the OF node pointer and > > > use of_node_name_prefix() helper function instead for node name > > > comparisons. This helps in moving all OF node name accesses to helper > > > functions in preparation to remove struct device_node.name pointer. > > > > > > Fixes: 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name") > > > > Looks good to me: > > > > ... > > [ 0.000000] Linux version 5.0.0-rc1+ (malat@debian.org) (gcc > > version 6.3.0 20170516 (Debian 6.3.0-18)) #21 Mon Jan 7 21:03:53 CET > > 2019 > > ... > > > > So here is my : > > > > Tested-by: Mathieu Malaterre > > Just for curiosity, why would you keep: > > if (strcmp(dp->name, "valkyrie") == 0) Mainly just because I already have another patch to do that which I haven't sent out. Rob