Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2018 03:49:16 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330906 - in stable/11/sys: dev/ofw powerpc/ofw
Message-ID:  <201803140349.w2E3nGE4051671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Wed Mar 14 03:49:15 2018
New Revision: 330906
URL: https://svnweb.freebsd.org/changeset/base/330906

Log:
  MFC r329579: Set internal error returns [of some OF functions] to 0
  
  Set internal error returns for OF_peer(), OF_child(), and OF_parent() to
  zero, matching the IEEE 1275 standard. Since these internal error paths
  have never, to my knowledge, been taken, behavior is unchanged.

Modified:
  stable/11/sys/dev/ofw/ofw_standard.c
  stable/11/sys/powerpc/ofw/ofw_real.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ofw/ofw_standard.c
==============================================================================
--- stable/11/sys/dev/ofw/ofw_standard.c	Wed Mar 14 03:47:58 2018	(r330905)
+++ stable/11/sys/dev/ofw/ofw_standard.c	Wed Mar 14 03:49:15 2018	(r330906)
@@ -232,7 +232,7 @@ ofw_std_peer(ofw_t ofw, phandle_t node)
 
 	args.node = node;
 	if (openfirmware(&args) == -1)
-		return (-1);
+		return (0);
 	return (args.next);
 }
 
@@ -254,7 +254,7 @@ ofw_std_child(ofw_t ofw, phandle_t node)
 
 	args.node = node;
 	if (openfirmware(&args) == -1)
-		return (-1);
+		return (0);
 	return (args.child);
 }
 
@@ -276,7 +276,7 @@ ofw_std_parent(ofw_t ofw, phandle_t node)
 
 	args.node = node;
 	if (openfirmware(&args) == -1)
-		return (-1);
+		return (0);
 	return (args.parent);
 }
 

Modified: stable/11/sys/powerpc/ofw/ofw_real.c
==============================================================================
--- stable/11/sys/powerpc/ofw/ofw_real.c	Wed Mar 14 03:47:58 2018	(r330905)
+++ stable/11/sys/powerpc/ofw/ofw_real.c	Wed Mar 14 03:49:15 2018	(r330906)
@@ -366,7 +366,7 @@ ofw_real_peer(ofw_t ofw, phandle_t node)
 	argsptr = ofw_real_map(&args, sizeof(args));
 	if (openfirmware((void *)argsptr) == -1) {
 		ofw_real_stop();
-		return (-1);
+		return (0);
 	}
 	ofw_real_unmap(argsptr, &args, sizeof(args));
 	ofw_real_stop();
@@ -395,7 +395,7 @@ ofw_real_child(ofw_t ofw, phandle_t node)
 	argsptr = ofw_real_map(&args, sizeof(args));
 	if (openfirmware((void *)argsptr) == -1) {
 		ofw_real_stop();
-		return (-1);
+		return (0);
 	}
 	ofw_real_unmap(argsptr, &args, sizeof(args));
 	ofw_real_stop();
@@ -424,7 +424,7 @@ ofw_real_parent(ofw_t ofw, phandle_t node)
 	argsptr = ofw_real_map(&args, sizeof(args));
 	if (openfirmware((void *)argsptr) == -1) {
 		ofw_real_stop();
-		return (-1);
+		return (0);
 	}
 	ofw_real_unmap(argsptr, &args, sizeof(args));
 	ofw_real_stop();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803140349.w2E3nGE4051671>