static void hid_dump_field(struct hid_field *field, int n) {	int j;		if (field->physical) {		tab(n);		printk("Physical(");		resolv_usage(field->physical); printk(")\n");	}	if (field->logical) {		tab(n);		printk("Logical(");		resolv_usage(field->logical); printk(")\n");	}	tab(n); printk("Usage(%d)\n", field->maxusage);	for (j = 0; j < field->maxusage; j++) {		tab(n+2);resolv_usage(field->usage[j].hid); printk("\n");	}	if (field->logical_minimum != field->logical_maximum) {		tab(n); printk("Logical Minimum(%d)\n", field->logical_minimum);		tab(n); printk("Logical Maximum(%d)\n", field->logical_maximum);	}	if (field->physical_minimum != field->physical_maximum) {		tab(n); printk("Physical Minimum(%d)\n", field->physical_minimum);		tab(n); printk("Physical Maximum(%d)\n", field->physical_maximum);	}	if (field->unit_exponent) {		tab(n); printk("Unit Exponent(%d)\n", field->unit_exponent);	}	if (field->unit) {		char *systems[5] = { "None", "SI Linear", "SI Rotation", "English Linear", "English Rotation" };		char *units[5][8] = {			{ "None", "None", "None", "None", "None", "None", "None", "None" },			{ "None", "Centimeter", "Gram", "Seconds", "Kelvin",     "Ampere", "Candela", "None" },			{ "None", "Radians",    "Gram", "Seconds", "Kelvin",     "Ampere", "Candela", "None" },			{ "None", "Inch",       "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" },			{ "None", "Degrees",    "Slug", "Seconds", "Fahrenheit", "Ampere", "Candela", "None" }		};		int i;		int sys;                __u32 data = field->unit;		/* First nibble tells us which system we're in. */		sys = data & 0xf;		data >>= 4;		if(sys > 4) {			tab(n); printk("Unit(Invalid)\n");		}		else {			int earlier_unit = 0;			tab(n); printk("Unit(%s : ", systems[sys]);			for (i=1 ; i<sizeof(__u32)*2 ; i++) {				char nibble = data & 0xf;				data >>= 4;				if (nibble != 0) {					if(earlier_unit++ > 0)						printk("*");					printk("%s", units[sys][i]);					if(nibble != 1) {						/* This is a _signed_ nibble(!) */							int val = nibble & 0x7;						if(nibble & 0x08)							val = -((0x7 & ~val) +1);						printk("^%d", val);					}				}			}			printk(")\n");		}	}	tab(n); printk("Report Size(%u)\n", field->report_size);	tab(n); printk("Report Count(%u)\n", field->report_count);	tab(n); printk("Report Offset(%u)\n", field->report_offset);	tab(n); printk("Flags( ");	j = field->flags;	printk("%s", HID_MAIN_ITEM_CONSTANT & j ? "Constant " : "");	printk("%s", HID_MAIN_ITEM_VARIABLE & j ? "Variable " : "Array ");	printk("%s", HID_MAIN_ITEM_RELATIVE & j ? "Relative " : "Absolute ");	printk("%s", HID_MAIN_ITEM_WRAP & j ? "Wrap " : "");	printk("%s", HID_MAIN_ITEM_NONLINEAR & j ? "NonLinear " : "");	printk("%s", HID_MAIN_ITEM_NO_PREFERRED & j ? "NoPrefferedState " : "");	printk("%s", HID_MAIN_ITEM_NULL_STATE & j ? "NullState " : "");	printk("%s", HID_MAIN_ITEM_VOLATILE & j ? "Volatile " : "");	printk("%s", HID_MAIN_ITEM_BUFFERED_BYTE & j ? "BufferedByte " : "");	printk(")\n");}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05f091ab4c8c1f12f8dd38ee789489904fea327d/hid-debug.h/buggy/drivers/usb/input/hid-debug.h