* [jimc:wk-3way-merge 74/180] kernel/module/decompress.c:112:31: error: too many arguments to function 'scratchpad_alloc'; expected 2, have 3
@ 2026-09-02 13:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-02 13:06 UTC (permalink / raw)
To: Jim Cromie, Łukasz Bartosik; +Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-02 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 13:06 [jimc:wk-3way-merge 74/180] kernel/module/decompress.c:112:31: error: too many arguments to function 'scratchpad_alloc'; expected 2, have 3 kernel test robot
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.