From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B46B381EAB for ; Fri, 31 Jul 2026 07:11:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785481890; cv=none; b=SqzEcqPjo4D6yuLuwJs1P+kO4IqRQhNuryDB/zTiUAfkgEGLwyLPENjxzmBMyZxvu61SITjtdh8wSvRJr1yUumflLgTIb7CdGB0ch19hsU/LAy7Rekaczck4QWbdXBjiKNj+gBg7+1qQ42+GJTEZmpVrbscQCizgVxc4E1/+cRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785481890; c=relaxed/simple; bh=npVSH1CEJWLwJDrzTLcBxVyTO5QycCq9UQeoCp0ESa8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HRBT0grxv55ndC7RhfRZDIMN/7FFQNQQk66SLD8vVL9gqISONkqjqdclACt8S5Qrwhv62hc/3NfjcHwT4KAxEbPpnBsUoBhCnbehmq1rN2yCJQp6qVAlY8jcVRxC4nSfNUCEz3+nwUckJyKL7XFLmRjWf0szPrsEEKyat/0/DNw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CsMXRtJG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CsMXRtJG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E071F1F000E9; Fri, 31 Jul 2026 07:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785481885; bh=CWMEFKxEBjtPexxljun5XVOIgKx0us+3UHa4wux2fjM=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=CsMXRtJG4F+CvAtfiZlLOdBtJp3OuGJeYa1VxovTnRGzy9dbleCF+KaD1o70shxrq dJHfQ6JkZ4NX20MnYyC/5LAPSciNZUN1CRGAyCraAGn4UliJ1OZ5BG17ShGgI3TqaZ 0TANC6PusKCFxZ9PJJvJS7eWC7FLp7IS+fQ+SDOhhBZLlzuJ0JWR7Vjhgo8ZKKhP9d n8thGYEu7sx9cUh+tMB2YVCYdXOGgFnq1q8hgGjrbe8kazVMLzq9RmZ678362B9Y2f ELyb9QGJ8w7BcLw/zT7N2FfwVV18b2Io/bQRrLIhw/FYJtVZiojEGr3B5JxUmCRFA0 0/dlupQLbVgTQ== Message-ID: Date: Fri, 31 Jul 2026 09:11:21 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powerpc/powermac: Simplify bootx_scan_dt_build_struct() To: Thorsten Blum , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20260720231453.117271-2-thorsten.blum@linux.dev> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20260720231453.117271-2-thorsten.blum@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 21/07/2026 à 01:14, Thorsten Blum a écrit : > Assign the empty string directly instead of NULL checking namep again. > > Signed-off-by: Thorsten Blum Reviewed-by: Christophe Leroy (CS GROUP) > --- > arch/powerpc/platforms/powermac/bootx_init.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c > index 72eb99aba40f..abceae91dfde 100644 > --- a/arch/powerpc/platforms/powermac/bootx_init.c > +++ b/arch/powerpc/platforms/powermac/bootx_init.c > @@ -284,9 +284,7 @@ static void __init bootx_scan_dt_build_struct(unsigned long base, > dt_push_token(OF_DT_BEGIN_NODE, mem_end); > > /* get the node's full name */ > - namep = np->full_name ? (char *)(base + np->full_name) : NULL; > - if (namep == NULL) > - namep = ""; > + namep = np->full_name ? (char *)(base + np->full_name) : ""; > l = strlen(namep); > > DBG("* struct: %s\n", namep);