freebsd-skq/sys/sparc64
Oleksandr Tymoshenko 217d17bcd3 Clean up OF_getprop_alloc API
OF_getprop_alloc takes element size argument and returns number of
elements in the property. There are valid use cases for such behavior
but mostly API consumers pass 1 as element size to get string
properties. What API users would expect from OF_getprop_alloc is to be
a combination of malloc + OF_getprop with the same semantic of return
value. This patch modifies API signature to match these expectations.

For the valid use cases with element size != 1 and to reduce
modification scope new OF_getprop_alloc_multi function has been
introduced that behaves the same way OF_getprop_alloc behaved prior to
this patch.

Reviewed by:	ian, manu
Differential Revision:	https://reviews.freebsd.org/D14850
2018-04-08 22:59:34 +00:00
..
central Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
conf It's time to retire AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT from 2017-11-29 23:41:49 +00:00
ebus Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
fhc Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
include amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
isa Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
pci Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
sbus Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
sparc64 Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00