[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/earlycpio: Drop nextoff parameter



commit 9cbf61445cda7136ffa029de5a14b51181ca0385
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Mar 27 19:33:46 2023 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Oct 24 17:57:59 2024 +0100

    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>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 1d58cb0f3b..1e5fdd02e4 100644
--- a/xen/arch/x86/cpu/microcode/core.c
+++ b/xen/arch/x86/cpu/microcode/core.c
@@ -158,7 +158,6 @@ static void __init microcode_scan_module(struct boot_info 
*bi)
     uint64_t *_blob_start;
     unsigned long _blob_size;
     struct cpio_data cd;
-    long offset;
     const char *p = NULL;
     int i;
 
@@ -191,7 +190,7 @@ static void __init microcode_scan_module(struct boot_info 
*bi)
         }
         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 4bcf32a51c..6c76307c25 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 16d9404d73..d499203598 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 */
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.