From: kernel test robot <lkp@intel.com>
To: "Jim Cromie" <jim.cromie@gmail.com>,
" Łukasz Bartosik" <ukaszb@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jimc:wk-3way-merge 74/180] kernel/module/decompress.c:112:31: error: too many arguments to function 'scratchpad_alloc'; expected 2, have 3
Date: Wed, 02 Sep 2026 21:06:10 +0800 [thread overview]
Message-ID: <202609022117.XejGzHJ4-lkp@intel.com> (raw)
tree: https://github.com/jimc/linux.git wk-3way-merge
head: d0c943103cb664ad87f6e3202f62d82153394afe
commit: 150c4ac3f72211323b916d80201583b5074abd4c [74/180] module: Route decompression workspaces and page tracking to scratchpad
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260902/202609022117.XejGzHJ4-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260902/202609022117.XejGzHJ4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609022117.XejGzHJ4-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/module/decompress.c: In function 'module_gzip_decompress':
>> kernel/module/decompress.c:112:31: error: too many arguments to function 'scratchpad_alloc'; expected 2, have 3
112 | s.workspace = scratchpad_alloc(&info->sp, zlib_inflate_workspacesize(), GFP_KERNEL);
| ^~~~~~~~~~~~~~~~
In file included from kernel/module/internal.h:16,
from kernel/module/decompress.c:15:
include/linux/scratchpad.h:169:30: note: declared here
169 | static __always_inline void *scratchpad_alloc(struct scratchpad *sp,
| ^~~~~~~~~~~~~~~~
vim +/scratchpad_alloc +112 kernel/module/decompress.c
92
93 static ssize_t module_gzip_decompress(struct load_info *info,
94 const void *buf, size_t size)
95 {
96 struct z_stream_s s = { 0 };
97 size_t new_size = 0;
98 size_t gzip_hdr_len;
99 ssize_t retval;
100 int rc;
101
102 gzip_hdr_len = module_gzip_header_len(buf, size);
103 if (!gzip_hdr_len) {
104 pr_err("not a gzip compressed module\n");
105 return -EINVAL;
106 }
107
108 s.next_in = buf + gzip_hdr_len;
109 s.avail_in = size - gzip_hdr_len;
110
111 if (static_branch_likely(&modload_ENABLE_KEY))
> 112 s.workspace = scratchpad_alloc(&info->sp, zlib_inflate_workspacesize(), GFP_KERNEL);
113 else
114 s.workspace = kvmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
115 if (!s.workspace)
116 return -ENOMEM;
117
118 rc = zlib_inflateInit2(&s, -MAX_WBITS);
119 if (rc != Z_OK) {
120 pr_err("failed to initialize decompressor: %d\n", rc);
121 retval = -EINVAL;
122 goto out;
123 }
124
125 do {
126 struct page *page = module_get_next_page(info);
127
128 if (IS_ERR(page)) {
129 retval = PTR_ERR(page);
130 goto out_inflate_end;
131 }
132
133 s.next_out = kmap_local_page(page);
134 s.avail_out = PAGE_SIZE;
135 rc = zlib_inflate(&s, 0);
136 kunmap_local(s.next_out);
137
138 new_size += PAGE_SIZE - s.avail_out;
139 } while (rc == Z_OK);
140
141 if (rc != Z_STREAM_END) {
142 pr_err("decompression failed with status %d\n", rc);
143 retval = -EINVAL;
144 goto out_inflate_end;
145 }
146
147 retval = new_size;
148
149 out_inflate_end:
150 zlib_inflateEnd(&s);
151 out:
152 if (!static_branch_likely(&modload_ENABLE_KEY))
153 kvfree(s.workspace);
154 return retval;
155 }
156 #elif defined(CONFIG_MODULE_COMPRESS_XZ)
157 #include <linux/xz.h>
158 #define MODULE_COMPRESSION xz
159 #define MODULE_DECOMPRESS_FN module_xz_decompress
160
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-02 13:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609022117.XejGzHJ4-lkp@intel.com \
--to=lkp@intel.com \
--cc=jim.cromie@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ukaszb@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.