diff mbox

media: dvb: get rid of VIDEO_SET_SPU_PALETTE

Message ID c1e86dc99d811e90d11181b2bf2e1237db76a5c1.1527517459.git.mchehab+samsung@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab May 28, 2018, 2:32 p.m. UTC
No upstream drivers use it. It doesn't make any sense to have
a compat32 code for something that nobody uses upstream.

Reported-by: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 .../media/uapi/dvb/video-set-spu-palette.rst  | 82 -------------------
 .../media/uapi/dvb/video_function_calls.rst   |  1 -
 Documentation/media/uapi/dvb/video_types.rst  | 18 ----
 Documentation/media/video.h.rst.exceptions    |  1 -
 fs/compat_ioctl.c                             |  2 -
 include/uapi/linux/dvb/video.h                |  7 --
 6 files changed, 111 deletions(-)
 delete mode 100644 Documentation/media/uapi/dvb/video-set-spu-palette.rst

Comments

Christoph Hellwig May 29, 2018, 6:20 a.m. UTC | #1
On Mon, May 28, 2018 at 11:32:41AM -0300, Mauro Carvalho Chehab wrote:
> No upstream drivers use it. It doesn't make any sense to have
> a compat32 code for something that nobody uses upstream.
> 
> Reported-by: Alexander Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
kernel test robot May 30, 2018, 12:21 a.m. UTC | #2
Hi Mauro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc7 next-20180529]
[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/Mauro-Carvalho-Chehab/media-dvb-get-rid-of-VIDEO_SET_SPU_PALETTE/20180530-033705
config: mips-fuloong2e_defconfig (attached as .config)
compiler: mips64el-linux-gnuabi64-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/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=mips 

All warnings (new ones prefixed by >>):

   fs/compat_ioctl.c: In function 'do_video_set_spu_palette':
   fs/compat_ioctl.c:220:45: error: invalid application of 'sizeof' to incomplete type 'struct video_spu_palette'
     up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
                                                ^~~~~~
   In file included from include/linux/uaccess.h:14:0,
                    from include/linux/compat.h:20,
                    from fs/compat_ioctl.c:17:
   fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type 'struct video_spu_palette'
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/mips/include/asm/uaccess.h:444:15: note: in definition of macro '__put_user_check'
     __typeof__(*(ptr)) __user *__pu_addr = (ptr);   \
                  ^~~
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^~~~~~~~
>> arch/mips/include/asm/uaccess.h:445:32: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) __pu_val = (x);    \
                                   ^
>> arch/mips/include/asm/uaccess.h:158:2: note: in expansion of macro '__put_user_check'
     __put_user_check((x), (ptr), sizeof(*(ptr)))
     ^~~~~~~~~~~~~~~~
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^~~~~~~~
   At top level:
   fs/compat_ioctl.c:208:12: warning: 'do_video_set_spu_palette' defined but not used [-Wunused-function]
    static int do_video_set_spu_palette(struct file *file,
               ^~~~~~~~~~~~~~~~~~~~~~~~

vim +445 arch/mips/include/asm/uaccess.h

^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  441  
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  442  #define __put_user_check(x, ptr, size)					\
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  443  ({									\
fe00f943 include/asm-mips/uaccess.h      Ralf Baechle    2005-03-01 @444  	__typeof__(*(ptr)) __user *__pu_addr = (ptr);			\
fe00f943 include/asm-mips/uaccess.h      Ralf Baechle    2005-03-01 @445  	__typeof__(*(ptr)) __pu_val = (x);				\
8d2d91e8 include/asm-mips/uaccess.h      Ralf Baechle    2008-10-11  446  	int __pu_err = -EFAULT;						\
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  447  									\
ef41f460 arch/mips/include/asm/uaccess.h Ralf Baechle    2009-04-28  448  	might_fault();							\
ac1d8590 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-11  449  	if (likely(access_ok(VERIFY_WRITE,  __pu_addr, size))) {	\
12060666 arch/mips/include/asm/uaccess.h Paul Burton     2015-05-24  450  		if (eva_kernel_access())				\
ac1d8590 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-11  451  			__put_kernel_common(__pu_addr, size);		\
ac1d8590 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-11  452  		else							\
ec56b1d4 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-17  453  			__put_user_common(__pu_addr, size);		\
ac1d8590 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-11  454  	}								\
ec56b1d4 arch/mips/include/asm/uaccess.h Markos Chandras 2013-12-17  455  									\
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  456  	__pu_err;							\
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  457  })
^1da177e include/asm-mips/uaccess.h      Linus Torvalds  2005-04-16  458  

:::::: The code at line 445 was first introduced by commit
:::::: fe00f943e0ef98b4057abcc2940d631a975b43cd Sparseify MIPS.

:::::: TO: Ralf Baechle <ralf@linux-mips.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot May 30, 2018, 12:54 a.m. UTC | #3
Hi Mauro,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc7 next-20180529]
[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/Mauro-Carvalho-Chehab/media-dvb-get-rid-of-VIDEO_SET_SPU_PALETTE/20180530-033705
config: x86_64-randconfig-g0-05291849 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   fs/compat_ioctl.c: In function 'do_video_set_spu_palette':
   fs/compat_ioctl.c:220:45: error: invalid application of 'sizeof' to incomplete type 'struct video_spu_palette'
     up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
                                                ^
   In file included from include/linux/uaccess.h:14:0,
                    from include/linux/compat.h:20,
                    from fs/compat_ioctl.c:17:
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:257:15: note: in definition of macro 'put_user'
     __typeof__(*(ptr)) __pu_val;    \
                  ^
   arch/x86/include/asm/uaccess.h:260:11: warning: assignment makes integer from pointer without a cast
     __pu_val = x;      \
              ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:261:19: note: in definition of macro 'put_user'
     switch (sizeof(*(ptr))) {    \
                      ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
>> arch/x86/include/asm/uaccess.h:272:3: note: in expansion of macro '__put_user_x8'
      __put_user_x8(__pu_val, ptr, __ret_pu);  \
      ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
>> arch/x86/include/asm/uaccess.h:272:3: note: in expansion of macro '__put_user_x8'
      __put_user_x8(__pu_val, ptr, __ret_pu);  \
      ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
>> fs/compat_ioctl.c:221:46: error: dereferencing pointer to incomplete type
     err  = put_user(compat_ptr(palp), &up_native->palette);
                                                 ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:221:9: note: in expansion of macro 'put_user'
     err  = put_user(compat_ptr(palp), &up_native->palette);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:257:15: note: in definition of macro 'put_user'
     __typeof__(*(ptr)) __pu_val;    \
                  ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:261:19: note: in definition of macro 'put_user'
     switch (sizeof(*(ptr))) {    \
                      ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
>> arch/x86/include/asm/uaccess.h:272:3: note: in expansion of macro '__put_user_x8'
      __put_user_x8(__pu_val, ptr, __ret_pu);  \
      ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
>> arch/x86/include/asm/uaccess.h:272:3: note: in expansion of macro '__put_user_x8'
      __put_user_x8(__pu_val, ptr, __ret_pu);  \
      ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:25: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                            ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c:222:36: error: dereferencing pointer to incomplete type
     err |= put_user(length, &up_native->length);
                                       ^
   arch/x86/include/asm/uaccess.h:187:42: note: in definition of macro '__put_user_x'
           : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
                                             ^
   fs/compat_ioctl.c:222:9: note: in expansion of macro 'put_user'
     err |= put_user(length, &up_native->length);
            ^
   fs/compat_ioctl.c: At top level:
   fs/compat_ioctl.c:208:12: warning: 'do_video_set_spu_palette' defined but not used [-Wunused-function]
    static int do_video_set_spu_palette(struct file *file,
               ^

vim +221 fs/compat_ioctl.c

6e87abd0 David S. Miller 2005-11-16  207  
66cf191f Al Viro         2016-01-07  208  static int do_video_set_spu_palette(struct file *file,
b4341721 Jann Horn       2016-01-05  209  		unsigned int cmd, struct compat_video_spu_palette __user *up)
6e87abd0 David S. Miller 2005-11-16  210  {
6e87abd0 David S. Miller 2005-11-16  211  	struct video_spu_palette __user *up_native;
6e87abd0 David S. Miller 2005-11-16  212  	compat_uptr_t palp;
6e87abd0 David S. Miller 2005-11-16  213  	int length, err;
6e87abd0 David S. Miller 2005-11-16  214  
6e87abd0 David S. Miller 2005-11-16  215  	err  = get_user(palp, &up->palette);
6e87abd0 David S. Miller 2005-11-16  216  	err |= get_user(length, &up->length);
12176503 Kees Cook       2012-10-25  217  	if (err)
12176503 Kees Cook       2012-10-25  218  		return -EFAULT;
6e87abd0 David S. Miller 2005-11-16  219  
6e87abd0 David S. Miller 2005-11-16 @220  	up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
7116e994 Heiko Carstens  2006-12-06 @221  	err  = put_user(compat_ptr(palp), &up_native->palette);
7116e994 Heiko Carstens  2006-12-06  222  	err |= put_user(length, &up_native->length);
7116e994 Heiko Carstens  2006-12-06  223  	if (err)
7116e994 Heiko Carstens  2006-12-06  224  		return -EFAULT;
6e87abd0 David S. Miller 2005-11-16  225  
66cf191f Al Viro         2016-01-07  226  	err = do_ioctl(file, cmd, (unsigned long) up_native);
6e87abd0 David S. Miller 2005-11-16  227  
6e87abd0 David S. Miller 2005-11-16  228  	return err;
6e87abd0 David S. Miller 2005-11-16  229  }
6e87abd0 David S. Miller 2005-11-16  230  

:::::: The code at line 221 was first introduced by commit
:::::: 7116e994b47f3988389be4ceee67dac64b56e0d0 [PATCH] compat: fix uaccess handling

:::::: TO: Heiko Carstens <heiko.carstens@de.ibm.com>
:::::: CC: Linus Torvalds <torvalds@woody.osdl.org>

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

Patch

diff --git a/Documentation/media/uapi/dvb/video-set-spu-palette.rst b/Documentation/media/uapi/dvb/video-set-spu-palette.rst
deleted file mode 100644
index 51a1913d21d2..000000000000
--- a/Documentation/media/uapi/dvb/video-set-spu-palette.rst
+++ /dev/null
@@ -1,82 +0,0 @@ 
-.. -*- coding: utf-8; mode: rst -*-
-
-.. _VIDEO_SET_SPU_PALETTE:
-
-=====================
-VIDEO_SET_SPU_PALETTE
-=====================
-
-Name
-----
-
-VIDEO_SET_SPU_PALETTE
-
-.. attention:: This ioctl is deprecated.
-
-Synopsis
---------
-
-.. c:function:: int ioctl(fd, VIDEO_SET_SPU_PALETTE, struct video_spu_palette *palette )
-    :name: VIDEO_SET_SPU_PALETTE
-
-
-Arguments
----------
-
-.. flat-table::
-    :header-rows:  0
-    :stub-columns: 0
-
-
-    -  .. row 1
-
-       -  int fd
-
-       -  File descriptor returned by a previous call to open().
-
-    -  .. row 2
-
-       -  int request
-
-       -  Equals VIDEO_SET_SPU_PALETTE for this command.
-
-    -  .. row 3
-
-       -  video_spu_palette_t \*palette
-
-       -  SPU palette according to section ??.
-
-
-Description
------------
-
-This ioctl sets the SPU color palette.
-
-.. c:type:: video_spu_palette
-
-.. code-block::c
-
-	typedef struct video_spu_palette {      /* SPU Palette information */
-		int length;
-		__u8 __user *palette;
-	} video_spu_palette_t;
-
-Return Value
-------------
-
-On success 0 is returned, on error -1 and the ``errno`` variable is set
-appropriately. The generic error codes are described at the
-:ref:`Generic Error Codes <gen-errors>` chapter.
-
-
-
-.. flat-table::
-    :header-rows:  0
-    :stub-columns: 0
-
-
-    -  .. row 1
-
-       -  ``EINVAL``
-
-       -  input is not a valid palette or driver doesn’t handle SPU.
diff --git a/Documentation/media/uapi/dvb/video_function_calls.rst b/Documentation/media/uapi/dvb/video_function_calls.rst
index 68588ac7fecb..8d8383ffaeba 100644
--- a/Documentation/media/uapi/dvb/video_function_calls.rst
+++ b/Documentation/media/uapi/dvb/video_function_calls.rst
@@ -38,6 +38,5 @@  Video Function Calls
     video-set-system
     video-set-highlight
     video-set-spu
-    video-set-spu-palette
     video-get-navi
     video-set-attributes
diff --git a/Documentation/media/uapi/dvb/video_types.rst b/Documentation/media/uapi/dvb/video_types.rst
index 640a21de6b8a..4cfa00e5c934 100644
--- a/Documentation/media/uapi/dvb/video_types.rst
+++ b/Documentation/media/uapi/dvb/video_types.rst
@@ -320,24 +320,6 @@  to the following format:
      } video_spu_t;
 
 
-.. c:type:: video_spu_palette
-
-struct video_spu_palette
-========================
-
-The following structure is used to set the SPU palette by calling
-VIDEO_SPU_PALETTE:
-
-
-.. code-block:: c
-
-     typedef
-     struct video_spu_palette {
-	 int length;
-	 uint8_t *palette;
-     } video_spu_palette_t;
-
-
 .. c:type:: video_navi_pack
 
 struct video_navi_pack
diff --git a/Documentation/media/video.h.rst.exceptions b/Documentation/media/video.h.rst.exceptions
index a91aa884ce0e..89d7c3ef2da7 100644
--- a/Documentation/media/video.h.rst.exceptions
+++ b/Documentation/media/video.h.rst.exceptions
@@ -36,5 +36,4 @@  replace typedef video_stream_source_t :c:type:`video_stream_source`
 replace typedef video_play_state_t :c:type:`video_play_state`
 replace typedef video_highlight_t :c:type:`video_highlight`
 replace typedef video_spu_t :c:type:`video_spu`
-replace typedef video_spu_palette_t :c:type:`video_spu_palette`
 replace typedef video_navi_pack_t :c:type:`video_navi_pack`
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index ef80085ed564..e78ecda283d2 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1349,8 +1349,6 @@  static long do_ioctl_trans(unsigned int cmd,
 		return do_video_get_event(file, cmd, argp);
 	case VIDEO_STILLPICTURE:
 		return do_video_stillpicture(file, cmd, argp);
-	case VIDEO_SET_SPU_PALETTE:
-		return do_video_set_spu_palette(file, cmd, argp);
 	}
 
 	/*
diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h
index df3d7028c807..6a0c9757b7ba 100644
--- a/include/uapi/linux/dvb/video.h
+++ b/include/uapi/linux/dvb/video.h
@@ -186,12 +186,6 @@  typedef struct video_spu {
 } video_spu_t;
 
 
-typedef struct video_spu_palette {      /* SPU Palette information */
-	int length;
-	__u8 __user *palette;
-} video_spu_palette_t;
-
-
 typedef struct video_navi_pack {
 	int length;          /* 0 ... 1024 */
 	__u8 data[1024];
@@ -248,7 +242,6 @@  typedef __u16 video_attributes_t;
 #define VIDEO_SET_SYSTEM           _IO('o', 38)
 #define VIDEO_SET_HIGHLIGHT        _IOW('o', 39, video_highlight_t)
 #define VIDEO_SET_SPU              _IOW('o', 50, video_spu_t)
-#define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
 #define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
 #define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
 #define VIDEO_GET_SIZE             _IOR('o', 55, video_size_t)