All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: compat: Fix compilation breakage due to drm_vblank_wait rename
@ 2017-07-10 23:42 Laurent Pinchart
  2017-07-11  4:54 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2017-07-10 23:42 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Al Viro

The drm_vblank_wait() function was renamed to drm_vblank_wait_ioctl() in
the DRM tree in commit b6dcaaac4474 ("drm/vblank: _ioctl posfix for
ioctl handler"), while the DRM compat code was changed independently in
commit d5288c88c67c ("switch compat_drm_wait_vblank() to
drm_ioctl_kernel()") to call the old function.

Fix the resulting compilation breakage by calling the correct function.

Fixes: b6dcaaac4474 ("drm/vblank: _ioctl posfix for ioctl handler")
Fixes: d5288c88c67c ("switch compat_drm_wait_vblank() to drm_ioctl_kernel()")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/drm_ioc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hello,

This patch fixes a compilation breakage waiting to happen when v4.13-rc1 will
be merged back in the drm-misc tree, as b6dcaaac4474 is in drm-misc-next and
d5288c88c67c in Linus' master branch.

I suppose that drm-misc-next is not an option, so we can apply this patch on
top of the merge, or squash it with the merge commit if we want to avoid
breaking bisection.

diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 0b2d8c4a2fa5..98c54ad5b433 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -839,7 +839,7 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
 	req.request.type = req32.request.type;
 	req.request.sequence = req32.request.sequence;
 	req.request.signal = req32.request.signal;
-	err = drm_ioctl_kernel(file, drm_wait_vblank, &req, DRM_UNLOCKED);
+	err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED);
 	if (err)
 		return err;
 
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm: compat: Fix compilation breakage due to drm_vblank_wait rename
  2017-07-10 23:42 [PATCH] drm: compat: Fix compilation breakage due to drm_vblank_wait rename Laurent Pinchart
@ 2017-07-11  4:54 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2017-07-11  4:54 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Daniel Vetter, kbuild-all, dri-devel, Al Viro

[-- Attachment #1: Type: text/plain, Size: 2460 bytes --]

Hi Laurent,

[auto build test ERROR on next-20170710]
[cannot apply to drm/drm-next drm-exynos/exynos-drm/for-next drm-intel/for-linux-next v4.12 v4.12-rc7 v4.12-rc6 v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Laurent-Pinchart/drm-compat-Fix-compilation-breakage-due-to-drm_vblank_wait-rename/20170711-121046
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/drm_ioc32.c: In function 'compat_drm_wait_vblank':
>> drivers/gpu//drm/drm_ioc32.c:842:31: error: 'drm_wait_vblank_ioctl' undeclared (first use in this function)
     err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED);
                                  ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/drm_ioc32.c:842:31: note: each undeclared identifier is reported only once for each function it appears in

vim +/drm_wait_vblank_ioctl +842 drivers/gpu//drm/drm_ioc32.c

   827	
   828	static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
   829					  unsigned long arg)
   830	{
   831		drm_wait_vblank32_t __user *argp = (void __user *)arg;
   832		drm_wait_vblank32_t req32;
   833		union drm_wait_vblank req;
   834		int err;
   835	
   836		if (copy_from_user(&req32, argp, sizeof(req32)))
   837			return -EFAULT;
   838	
   839		req.request.type = req32.request.type;
   840		req.request.sequence = req32.request.sequence;
   841		req.request.signal = req32.request.signal;
 > 842		err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED);
   843		if (err)
   844			return err;
   845	
   846		req32.reply.type = req.reply.type;
   847		req32.reply.sequence = req.reply.sequence;
   848		req32.reply.tval_sec = req.reply.tval_sec;
   849		req32.reply.tval_usec = req.reply.tval_usec;
   850		if (copy_to_user(argp, &req32, sizeof(req32)))
   851			return -EFAULT;
   852	
   853		return 0;
   854	}
   855	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51461 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-11  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 23:42 [PATCH] drm: compat: Fix compilation breakage due to drm_vblank_wait rename Laurent Pinchart
2017-07-11  4:54 ` kbuild 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.