[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/5] xen/earlycpio: Drop nextoff parameter
This is imported from Linux, but the parameter being signed is dubious in the first place and we're not plausibly going to gain a use for the functionality. Linux has subsequently made it an optional parameter to avoid forcing callers to pass a stack variable they don't care about using. In the unlikely case that we gain a usecase, we can reintroduce it, but in the meantime simplify the single caller. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> CC: Wei Liu <wl@xxxxxxx> CC: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> --- xen/arch/x86/cpu/microcode/core.c | 3 +-- xen/common/earlycpio.c | 8 +------- xen/include/xen/earlycpio.h | 3 +-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.c index cfa2d5053a52..11c471cc3f83 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -156,7 +156,6 @@ void __init microcode_scan_module( uint64_t *_blob_start; unsigned long _blob_size; struct cpio_data cd; - long offset; const char *p = NULL; int i; @@ -189,7 +188,7 @@ void __init microcode_scan_module( } cd.data = NULL; cd.size = 0; - cd = find_cpio_data(p, _blob_start, _blob_size, &offset /* ignore */); + cd = find_cpio_data(p, _blob_start, _blob_size); if ( cd.data ) { ucode_blob.size = cd.size; diff --git a/xen/common/earlycpio.c b/xen/common/earlycpio.c index 4bcf32a51ceb..6c76307c2541 100644 --- a/xen/common/earlycpio.c +++ b/xen/common/earlycpio.c @@ -56,10 +56,6 @@ enum cpio_fields { * @path: The directory to search for, including a slash at the end * @data: Pointer to the the cpio archive or a header inside * @len: Remaining length of the cpio based on data pointer - * @nextoff: When a matching file is found, this is the offset from the - * beginning of the cpio to the beginning of the next file, not the - * matching file itself. It can be used to iterate through the cpio - * to find all files inside of a directory path. * * @return: struct cpio_data containing the address, length and * filename (with the directory path cut off) of the found file. @@ -68,8 +64,7 @@ enum cpio_fields { * the match returned an empty filename string. */ -struct cpio_data __init find_cpio_data(const char *path, void *data, - size_t len, long *nextoff) +struct cpio_data __init find_cpio_data(const char *path, void *data, size_t len) { const size_t cpio_header_len = 8*C_NFIELDS - 2; struct cpio_data cd = { NULL, 0, "" }; @@ -129,7 +124,6 @@ struct cpio_data __init find_cpio_data(const char *path, void *data, if ((ch[C_MODE] & 0170000) == 0100000 && ch[C_NAMESIZE] >= mypathsize && !memcmp(p, path, mypathsize)) { - *nextoff = (long)nptr - (long)data; if (ch[C_NAMESIZE] - mypathsize >= MAX_CPIO_FILE_NAME) { printk( "File %s exceeding MAX_CPIO_FILE_NAME [%d]\n", diff --git a/xen/include/xen/earlycpio.h b/xen/include/xen/earlycpio.h index 16d9404d739e..d4992035982d 100644 --- a/xen/include/xen/earlycpio.h +++ b/xen/include/xen/earlycpio.h @@ -9,7 +9,6 @@ struct cpio_data { char name[MAX_CPIO_FILE_NAME]; }; -struct cpio_data find_cpio_data(const char *path, void *data, size_t len, - long *offset); +struct cpio_data find_cpio_data(const char *path, void *data, size_t len); #endif /* _EARLYCPIO_H */ -- 2.30.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |