From patchwork Tue Nov 21 20:24:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 840171 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yhHBl46gtz9s0g for ; Wed, 22 Nov 2017 07:25:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751309AbdKUUYt (ORCPT ); Tue, 21 Nov 2017 15:24:49 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:42500 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbdKUUYt (ORCPT ); Tue, 21 Nov 2017 15:24:49 -0500 Received: from ayla.of.borg ([84.195.106.246]) by baptiste.telenet-ops.be with bizsmtp id ckQm1w00T5JzmfG01kQmDy; Tue, 21 Nov 2017 21:24:46 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1eHF67-0006MU-7U; Tue, 21 Nov 2017 21:24:47 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1eHF67-0006Vl-03; Tue, 21 Nov 2017 21:24:47 +0100 From: Geert Uytterhoeven To: Pantelis Antoniou Cc: Frank Rowand , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [bbb-overlays] Fixing overlay configfs for v4.14 Date: Tue, 21 Nov 2017 21:24:40 +0100 Message-Id: <1511295880-24987-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Pantelis, Using overlay configfs on v4.14 requires two fixes, both due to commit d1651b03c2df75db ("of: overlay: add overlay symbols to live device tree"): 1. As the symbols were added to the ovinfo[] array without calling of_fill_overlay_info(), the new of_overlay_info.info field (added by your bbb-overlays patches) is not set up, causing a NULL pointer dereference. As calling of_fill_overlay_info() is not appropriate here, the patch below fixes this by filling it in manually. Feel free to fold into "of: overlay: add per overlay sysfs attributes". 2. "of: overlay: Pick up label symbols from overlays." must be reverted, else loading overlays fails with: OF: changeset: add_property failed @/__symbols__/... OF: Error applying changeset (-17) I've updated my topic/overlays and topic/renesas-overlays branches in https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git accordingly. Gr{oetje,eeting}s, Geert --- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index afa681014e19e3da..3cb6ae9ecb998d5e 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -569,6 +569,7 @@ static int of_build_overlay_info(struct of_overlay *ov, if (node) { ovinfo[cnt].overlay = node; ovinfo[cnt].target = of_find_node_by_path("/__symbols__"); + ovinfo[cnt].info = of_node_get(node); ovinfo[cnt].is_symbols_node = 1; if (!ovinfo[cnt].target) {