diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/video/fbdev/core | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbdev/core')
| -rw-r--r-- | drivers/video/fbdev/core/fb_defio.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/core/fbmon.c | 8 | ||||
| -rw-r--r-- | drivers/video/fbdev/core/modedb.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index 2b2604255b90..ca48b89a323d 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -307,7 +307,7 @@ int fb_deferred_io_init(struct fb_info *info) npagerefs = DIV_ROUND_UP(info->fix.smem_len, PAGE_SIZE); /* alloc a page ref for each page of the display memory */ - pagerefs = kvzalloc_objs(*pagerefs, npagerefs, GFP_KERNEL); + pagerefs = kvzalloc_objs(*pagerefs, npagerefs); if (!pagerefs) { ret = -ENOMEM; goto err; diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 29ed5b152ac6..666261ae59d8 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -769,7 +769,7 @@ static int fbcon_open(struct fb_info *info) } unlock_fb_info(info); - par = kzalloc_obj(*par, GFP_KERNEL); + par = kzalloc_obj(*par); if (!par) { fbcon_release(info); return -ENOMEM; diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 67ccb5607ded..f96b4e7b7f21 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -388,7 +388,7 @@ static void calc_mode_timings(int xres, int yres, int refresh, { struct fb_var_screeninfo *var; - var = kzalloc_obj(struct fb_var_screeninfo, GFP_KERNEL); + var = kzalloc_obj(struct fb_var_screeninfo); if (var) { var->xres = xres; @@ -626,7 +626,7 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize, int num = 0, i, first = 1; int ver, rev; - mode = kzalloc_objs(struct fb_videomode, 50, GFP_KERNEL); + mode = kzalloc_objs(struct fb_videomode, 50); if (mode == NULL) return NULL; @@ -677,7 +677,7 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize, } *dbsize = num; - m = kmalloc_objs(struct fb_videomode, num, GFP_KERNEL); + m = kmalloc_objs(struct fb_videomode, num); if (!m) return mode; memmove(m, mode, num * sizeof(struct fb_videomode)); @@ -1224,7 +1224,7 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_inf u32 hfmin, hfmax, vfmin, vfmax, dclkmin, dclkmax, err = 0; - timings = kzalloc_obj(struct __fb_timings, GFP_KERNEL); + timings = kzalloc_obj(struct __fb_timings); if (!timings) return -ENOMEM; diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c index fda6066eec99..703d0b7aec32 100644 --- a/drivers/video/fbdev/core/modedb.c +++ b/drivers/video/fbdev/core/modedb.c @@ -1070,7 +1070,7 @@ int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head) } } if (!found) { - modelist = kmalloc_obj(struct fb_modelist, GFP_KERNEL); + modelist = kmalloc_obj(struct fb_modelist); if (!modelist) return -ENOMEM; |
