Lines Matching defs:length
86 static int __init romchecksum(const unsigned char *rom, unsigned long length)
90 for (sum = 0; length && probe_kernel_address(rom++, c) == 0; length--)
92 return !length && !sum;
98 unsigned long start, length, upper;
114 /* 0 < length <= 0x7f * 512, historically */
115 length = c * 512;
117 /* if checksum okay, trust length byte */
118 if (length && romchecksum(rom, length))
119 video_rom_resource.end = start + length - 1;
133 /* check for extension rom (ignore length byte!) */
136 length = extension_rom_resource.end - extension_rom_resource.start + 1;
137 if (romchecksum(rom, length)) {
152 /* 0 < length <= 0x7f * 512, historically */
153 length = c * 512;
155 /* but accept any length that fits if checksum okay */
156 if (!length || start + length > upper || !romchecksum(rom, length))
160 adapter_rom_resources[i].end = start + length - 1;