From owner-svn-src-all@freebsd.org Sat May 14 20:06:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E5CEB3BA81; Sat, 14 May 2016 20:06:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5AD31DC0; Sat, 14 May 2016 20:06:39 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4EK6cJ2021743; Sat, 14 May 2016 20:06:38 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4EK6cnl021740; Sat, 14 May 2016 20:06:38 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201605142006.u4EK6cnl021740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 14 May 2016 20:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299756 - in head/sys: dev/iicbus powerpc/mpc85xx powerpc/psim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2016 20:06:40 -0000 Author: gonzo Date: Sat May 14 20:06:38 2016 New Revision: 299756 URL: https://svnweb.freebsd.org/changeset/base/299756 Log: Use OF_prop_free instead of direct call to free(9) Reviewed by: jhibbits Modified: head/sys/dev/iicbus/adt746x.c head/sys/powerpc/mpc85xx/lbc.c head/sys/powerpc/psim/iobus.c Modified: head/sys/dev/iicbus/adt746x.c ============================================================================== --- head/sys/dev/iicbus/adt746x.c Sat May 14 20:05:35 2016 (r299755) +++ head/sys/dev/iicbus/adt746x.c Sat May 14 20:06:38 2016 (r299756) @@ -361,8 +361,8 @@ adt746x_fill_fan_prop(device_t dev) location_len = OF_getprop_alloc(child, "hwctrl-location", 1, (void **)&location); id_len = OF_getprop_alloc(child, "hwctrl-id", sizeof(cell_t), (void **)&id); if (location_len == -1 || id_len == -1) { - free(location, M_OFWPROP); - free(id, M_OFWPROP); + OF_prop_free(location); + OF_prop_free(id); return 0; } @@ -390,8 +390,8 @@ adt746x_fill_fan_prop(device_t dev) (int (*)(struct pmac_fan *, int))(adt746x_fan_set_pwm); sc->sc_fans[i].fan.default_rpm = sc->sc_fans[i].fan.max_rpm; } - free(location, M_OFWPROP); - free(id, M_OFWPROP); + OF_prop_free(location); + OF_prop_free(id); return (i); } Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Sat May 14 20:05:35 2016 (r299755) +++ head/sys/powerpc/mpc85xx/lbc.c Sat May 14 20:06:38 2016 (r299756) @@ -408,7 +408,7 @@ fdt_lbc_reg_decode(phandle_t node, struc } rv = 0; out: - free(regptr, M_OFWPROP); + OF_prop_free(regptr); return (rv); } @@ -650,11 +650,11 @@ lbc_attach(device_t dev) */ lbc_banks_enable(sc); - free(rangesptr, M_OFWPROP); + OF_prop_free(rangesptr); return (bus_generic_attach(dev)); fail: - free(rangesptr, M_OFWPROP); + OF_prop_free(rangesptr); bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mrid, sc->sc_mres); return (error); } Modified: head/sys/powerpc/psim/iobus.c ============================================================================== --- head/sys/powerpc/psim/iobus.c Sat May 14 20:05:35 2016 (r299755) +++ head/sys/powerpc/psim/iobus.c Sat May 14 20:06:38 2016 (r299756) @@ -232,7 +232,7 @@ iobus_attach(device_t dev) iobus_add_reg(child, dinfo, sc->sc_addr); device_set_ivars(cdev, dinfo); } else { - free(name, M_OFWPROP); + OF_prop_free(name); } }