CVS commit: src/sys/arch/arm/sunxi

2018-08-21 Thread Benny Siegert
Module Name:src
Committed By:   bsiegert
Date:   Tue Aug 21 14:09:41 UTC 2018

Modified Files:
src/sys/arch/arm/sunxi: sunxi_thermal.c

Log Message:
Fix two typos in the Sunxi thermal driver.

Noticed by rudolf in PR port-arm/53537.

ok jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_thermal.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/sunxi/sunxi_thermal.c
diff -u src/sys/arch/arm/sunxi/sunxi_thermal.c:1.5 src/sys/arch/arm/sunxi/sunxi_thermal.c:1.6
--- src/sys/arch/arm/sunxi/sunxi_thermal.c:1.5	Sun Jan 28 18:24:50 2018
+++ src/sys/arch/arm/sunxi/sunxi_thermal.c	Tue Aug 21 14:09:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_thermal.c,v 1.5 2018/01/28 18:24:50 jmcneill Exp $ */
+/* $NetBSD: sunxi_thermal.c,v 1.6 2018/08/21 14:09:41 bsiegert Exp $ */
 
 /*-
  * Copyright (c) 2016-2017 Jared McNeill 
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.5 2018/01/28 18:24:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.6 2018/08/21 14:09:41 bsiegert Exp $");
 
 #include 
 #include 
@@ -259,7 +259,7 @@ h5_to_temp(u_int sensor, uint32_t val)
 		mul = H5_TEMP_MUL_L;
 	} else {
 		base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1;
-		mul = sensor == 0 ? H5_TEMP_MUL_H_1 : H5_TEMP_MUL_H_1;
+		mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1;
 	}
 
 	return (base - val * mul) >> H5_TEMP_DIV;
@@ -275,7 +275,7 @@ h5_to_reg(u_int sensor, int val)
 		mul = H5_TEMP_MUL_L;
 	} else {
 		base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1;
-		mul = sensor == 0 ? H5_TEMP_MUL_H_1 : H5_TEMP_MUL_H_1;
+		mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1;
 	}
 
 	return (base - (val << H5_TEMP_DIV)) / mul;



CVS commit: src/external/bsd/dhcpcd/dist/src

2017-09-05 Thread Benny Siegert
Module Name:src
Committed By:   bsiegert
Date:   Tue Sep  5 11:58:55 UTC 2017

Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c

Log Message:
dhcp: Fix classless static routes

Assign the netwask correctly from the message.

Cherry-picked from upstream in
https://dev.marples.name/rDHC510c760cb24ef4b1b16cc14732c5ffe0fbb0d96d.

This fixes route assignments when running on Google Compute Engine,
which uses classless static routes.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/dhcpcd/dist/src/dhcp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.1.1.3 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.2
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.1.1.3	Fri Apr 14 09:53:07 2017
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Tue Sep  5 11:58:55 2017
@@ -452,7 +452,7 @@ decode_rfc3442_rt(struct rt_head *routes
 		}
 
 		sa_in_init(>rt_dest, );
-		sa_in_init(>rt_dest, );
+		sa_in_init(>rt_netmask, );
 		sa_in_init(>rt_gateway, );
 
 		/* If CIDR is 32 then it's a host route. */