/* Traverse the supplied list of reports and find the longest  */
static void hid_find_max_report(struct hid_device *hid, unsigned int type, unsigned int *max)
/* Traverse the supplied list of reports and find the longest  */
static void hid_find_max_report(struct hid_device *hid, unsigned int type, unsigned int *max)
{
	struct hid_report *report;
	unsigned int size;
	list_for_each_entry(report, &hid->report_enum[type].report_list, list) {
		size = ((report->size - 1) >> 3) + 1 + hid->report_enum[type].numbered;
		if (*max < size)
			*max = size;
	}
}