From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH v2 3/3] device property: fwnode_property_read_string_array() returns nr of strings Date: Tue, 28 Mar 2017 15:52:31 +0300 Message-ID: <20170328125231.GP2957@lahna.fi.intel.com> References: <1490703739-28270-1-git-send-email-sakari.ailus@linux.intel.com> <1490703739-28270-4-git-send-email-sakari.ailus@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1490703739-28270-4-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sakari Ailus Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, sudeep.holla-5wv7dgnIgG8@public.gmane.org, lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, ahs3-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: devicetree@vger.kernel.org On Tue, Mar 28, 2017 at 03:22:19PM +0300, Sakari Ailus wrote: > - ret = acpi_copy_property_array_string(items, (char **)val, nval); > + ret = acpi_copy_property_array_string( > + items, (char **)val, > + min_t(u32, nval, obj->package.count)); I think this looks better if written like: ret = acpi_copy_property_array_string(items, (char **)val, min_t(u32, nval, obj->package.count)); Regardless of that, Reviewed-by: Mika Westerberg -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html