Lines Matching defs:length
190 static int __init romchecksum(const unsigned char *rom, unsigned long length)
194 for (sum = 0; length && get_kernel_nofault(c, rom++) == 0; length--)
196 return !length && !sum;
201 unsigned long start, length, upper;
218 /* 0 < length <= 0x7f * 512, historically */
219 length = c * 512;
221 /* if checksum okay, trust length byte */
222 if (length && romchecksum(rom, length))
223 video_rom_resource.end = start + length - 1;
237 /* check for extension rom (ignore length byte!) */
240 length = resource_size(&extension_rom_resource);
241 if (romchecksum(rom, length)) {
256 /* 0 < length <= 0x7f * 512, historically */
257 length = c * 512;
259 /* but accept any length that fits if checksum okay */
260 if (!length || start + length > upper || !romchecksum(rom, length))
264 adapter_rom_resources[i].end = start + length - 1;