Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp99052rwb; Wed, 18 Jan 2023 14:46:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsZsCQoJCBr8oudFqYUxAwRl8DGaajZFY5nqObXjcZobcUCw9azdmdyln9N+awtQs4huLFd X-Received: by 2002:a05:6402:3213:b0:49b:62c9:4fd with SMTP id g19-20020a056402321300b0049b62c904fdmr10944769eda.1.1674082001822; Wed, 18 Jan 2023 14:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674082001; cv=none; d=google.com; s=arc-20160816; b=VpYDiNKL+5Xczs/7RoLuLkB6qN4QpBVII/SMY41Wyt6YFZbGno+c/10APrddTLuzQd YlyH0DUD2J0XDdYkzsq1SgelBD9Dgir/Uvae/eyk6yIIFJcboQnsdoW2ZqovUM6nNykI dTtXUL2DygrjJkaA8hUKMJKLEsxmVHyPYu+nN/6Jm8mUeZEWadBLoJNFF2vk/KwGFfGD 6rYTrP1yNmvbLeSdOjYZpfGjzqTnjTMx/M0sc5CtuKydpvfA0V1TG0wRYzCH5NIoGjGM QDPE0eU8R17H11tZ9pwACkHth27sFV8kUEGG/FGvWKOT++ysv+r8OXI5nTl082atkKDy 7O+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=IzvhNBEDond1bMUJ1A5xbmF0h2vm61ldNgtjCSRkqYY=; b=hskx1hGcBVo0RypTaA2XYjACStPxWcmIM+588Q5k+m+8/LoH2wHwS9BMfFrWBezCxn W0/5yqRhlnVxqSoSDhzUZvKrOatZgjgBRp8KaaD4vEI5LLRqakHiskvxsLgQwU4JTVKN b8jvAgmCGbdLXOBdhZnvKVT81XIJINT9CcYyM3sBruiHt0fbjlzwfc+EpOecU6wVdnCV 3SDODxy3lMJlLOFW3/hDJFA46jMtR+Mc5sOVqmzQyAs0kwfcia/esuMbStreNhYwGs5p C+CZMoyAROp+XoiI1Co08/M7rd6Aes1NI6HfJ3suy3c0jGNEo1C0P0GcY0HpsL5s2rfo IzuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=swyQHK2r; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9Y+u+wPl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056402270900b0049e667887c8si510113edd.506.2023.01.18.14.46.30; Wed, 18 Jan 2023 14:46:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=swyQHK2r; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9Y+u+wPl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjARVqZ (ORCPT + 45 others); Wed, 18 Jan 2023 16:46:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbjARVqY (ORCPT ); Wed, 18 Jan 2023 16:46:24 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C22C1CACE; Wed, 18 Jan 2023 13:46:21 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 472725BEFB; Wed, 18 Jan 2023 21:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674078380; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IzvhNBEDond1bMUJ1A5xbmF0h2vm61ldNgtjCSRkqYY=; b=swyQHK2rv734pRTyYVLVbazA1S/KXLpGGpQnMpJvVVR4iNjKHivIyAZ8uyCJPsx0GaUEsH hGwL9rQFw9vAmeVG+OpClgKR0XBrokXN3utCG+MIoROFXU9szhV/X5suSLtPXZ9O9ok+iX IpmnLVhIoqTb/a9crsbndzETNs3MH6U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674078380; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IzvhNBEDond1bMUJ1A5xbmF0h2vm61ldNgtjCSRkqYY=; b=9Y+u+wPlaedpJNko+qyomGqIic2z8UZC/zp9hCZj1Tz6H+DJeEHf7tLnsSlg0REQm6p8+2 zyuKvlHS4Oa0hZCA== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C71112C141; Wed, 18 Jan 2023 21:46:19 +0000 (UTC) Date: Wed, 18 Jan 2023 22:46:18 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: "Erhard F." Cc: Rob Herring , Frank Rowand , Thomas Zimmermann , Javier Martinez Canillas , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , open list , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] of: Make of framebuffer devices unique Message-ID: <20230118214618.GM16547@kitsune.suse.cz> References: <20230117165804.18036-1-msuchanek@suse.de> <20230118211305.42e50a4a@yea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118211305.42e50a4a@yea> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2023 at 09:13:05PM +0100, Erhard F. wrote: > On Tue, 17 Jan 2023 17:58:04 +0100 > Michal Suchanek wrote: > > > Since Linux 5.19 this error is observed: > > > > sysfs: cannot create duplicate filename '/devices/platform/of-display' > > > > This is because multiple devices with the same name 'of-display' are > > created on the same bus. > > > > Update the code to create numbered device names for the non-boot > > disaplay. > > > > cc: linuxppc-dev@lists.ozlabs.org > > References: https://bugzilla.kernel.org/show_bug.cgi?id=216095 > > Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers") > > Reported-by: Erhard F. > > Suggested-by: Thomas Zimmermann > > Signed-off-by: Michal Suchanek > > --- > > drivers/of/platform.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > > index 81c8c227ab6b..f2a5d679a324 100644 > > --- a/drivers/of/platform.c > > +++ b/drivers/of/platform.c > > @@ -525,6 +525,7 @@ static int __init of_platform_default_populate_init(void) > > if (IS_ENABLED(CONFIG_PPC)) { > > struct device_node *boot_display = NULL; > > struct platform_device *dev; > > + int display_number = 1; > > int ret; > > > > /* Check if we have a MacOS display without a node spec */ > > @@ -561,10 +562,15 @@ static int __init of_platform_default_populate_init(void) > > boot_display = node; > > break; > > } > > + > > for_each_node_by_type(node, "display") { > > + char *buf[14]; > > if (!of_get_property(node, "linux,opened", NULL) || node == boot_display) > > continue; > > - of_platform_device_create(node, "of-display", NULL); > > + ret = snprintf(buf, "of-display-%d", display_number++); > > + if (ret >= sizeof(buf)) > > + continue; > > + of_platform_device_create(node, buf, NULL); > > } > > > > } else { > > -- > > 2.35.3 > > > > Thank you for the patch Michal! > > It applies on 6.2-rc4 but I get this build error with my config: Indeed, it's doubly bad. Where is the kernel test robot when you need it? It should not be that easy to miss this file but clearly it can happen. I will send a fixup. Sorry about the mess. Thanks Michal