From patchwork Wed Jan 18 21:50:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Suchanek X-Patchwork-Id: 1728478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aqBu6/y8; dkim=fail reason="signature verification failed" header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=wshYCj7T; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nxzwk0pXvz23gL for ; Thu, 19 Jan 2023 08:51:18 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Nxzwj3yCYz3fCg for ; Thu, 19 Jan 2023 08:51:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aqBu6/y8; dkim=fail reason="signature verification failed" header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=wshYCj7T; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.de (client-ip=195.135.220.28; helo=smtp-out1.suse.de; envelope-from=msuchanek@suse.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aqBu6/y8; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=wshYCj7T; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4NxzwN1GGxz2yJQ for ; Thu, 19 Jan 2023 08:50:59 +1100 (AEDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DCD3F3F824; Wed, 18 Jan 2023 21:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674078656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ImXWQyU4WFGAYv86tZ8Xzi8aUY2vgULsXE686tIBgtA=; b=aqBu6/y8+eY7NxuH49S2vhQnojNiXzIIFVXUoWwqh4gQTC/EBxdbk9xbSc9VpUYsGxke+H I4j/1Fe8CJ4hNNrv+izPi93x0VR2Nr4YmUAE5duvZK3xnDSsqplfZP/lORSvCITsvISo5b vI0Nrq88LJgj1V/hOg/QWTM0fuXMkpk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674078656; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ImXWQyU4WFGAYv86tZ8Xzi8aUY2vgULsXE686tIBgtA=; b=wshYCj7T4L0m6eOKuX/ezCn2oMy5WSPFrp+Mx2EJgbAw9tG7KVya4xbzPFwcjcUOLPVyRw PrWMvVbalNRogDBA== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) by relay2.suse.de (Postfix) with ESMTP id A99192C141; Wed, 18 Jan 2023 21:50:56 +0000 (UTC) From: Michal Suchanek To: "Erhard F." Subject: [PATCH] of: Fix of platform build on powerpc due to bad of disaply code Date: Wed, 18 Jan 2023 22:50:45 +0100 Message-Id: <20230118215045.5551-1-msuchanek@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230118211305.42e50a4a@yea> References: MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Frank Rowand , Javier Martinez Canillas , open list , Rob Herring , Thomas Zimmermann , Michal Suchanek , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The commit 2d681d6a23a1 ("of: Make of framebuffer devices unique") breaks build because of wrong argument to snprintf. That certainly avoids the runtime error but is not the intended outcome. Fixes: 2d681d6a23a1 ("of: Make of framebuffer devices unique") Signed-off-by: Michal Suchanek --- drivers/of/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f2a5d679a324..e9dd7371f27a 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -564,10 +564,10 @@ static int __init of_platform_default_populate_init(void) } for_each_node_by_type(node, "display") { - char *buf[14]; + char buf[14]; if (!of_get_property(node, "linux,opened", NULL) || node == boot_display) continue; - ret = snprintf(buf, "of-display-%d", display_number++); + ret = snprintf(buf, sizeof(buf), "of-display-%d", display_number++); if (ret >= sizeof(buf)) continue; of_platform_device_create(node, buf, NULL);