[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5] x86, amd_ucode: Support multiple container files appended together
>>> On 03.07.14 at 17:47, <aravind.gopalakrishnan@xxxxxxx> wrote: > @@ -236,7 +251,14 @@ static int get_ucode_from_buffer_amd( > mpbuf = (const struct mpbhdr *)&bufp[off]; > if ( mpbuf->type != UCODE_UCODE_TYPE ) > { > - printk(KERN_ERR "microcode: Wrong microcode payload type field\n"); > + /* > + * In a situation where ucode update has succeeded; > + * but there is a subsequent container file being parsed, > + * then, there is no need of this ERR message to be printed. > + */ > + if ( *(const uint32_t *)buf != UCODE_MAGIC ) Don't you need to use mpbuf here (which is equal to buf only when off == 0)? > + printk(KERN_ERR "microcode: Wrong microcode payload type > field\n"); > + > return -EINVAL; > } Also, wouldn't it help the caller (in not having to peek into the buffer another time) if you returned a different value in that case, e.g. a positive one? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |