@@ -303,7 +303,7 @@ static ssize_t proc_reg_read_iter(struct kiocb *iocb, struct iov_iter *iter)
303303
304304static ssize_t pde_read (struct proc_dir_entry * pde , struct file * file , char __user * buf , size_t count , loff_t * ppos )
305305{
306- __auto_type read = pde -> proc_ops -> proc_read ;
306+ const auto read = pde -> proc_ops -> proc_read ;
307307 if (read )
308308 return read (file , buf , count , ppos );
309309 return - EIO ;
@@ -325,7 +325,7 @@ static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count,
325325
326326static ssize_t pde_write (struct proc_dir_entry * pde , struct file * file , const char __user * buf , size_t count , loff_t * ppos )
327327{
328- __auto_type write = pde -> proc_ops -> proc_write ;
328+ const auto write = pde -> proc_ops -> proc_write ;
329329 if (write )
330330 return write (file , buf , count , ppos );
331331 return - EIO ;
@@ -347,7 +347,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t
347347
348348static __poll_t pde_poll (struct proc_dir_entry * pde , struct file * file , struct poll_table_struct * pts )
349349{
350- __auto_type poll = pde -> proc_ops -> proc_poll ;
350+ const auto poll = pde -> proc_ops -> proc_poll ;
351351 if (poll )
352352 return poll (file , pts );
353353 return DEFAULT_POLLMASK ;
@@ -369,7 +369,7 @@ static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts)
369369
370370static long pde_ioctl (struct proc_dir_entry * pde , struct file * file , unsigned int cmd , unsigned long arg )
371371{
372- __auto_type ioctl = pde -> proc_ops -> proc_ioctl ;
372+ const auto ioctl = pde -> proc_ops -> proc_ioctl ;
373373 if (ioctl )
374374 return ioctl (file , cmd , arg );
375375 return - ENOTTY ;
@@ -392,7 +392,7 @@ static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
392392#ifdef CONFIG_COMPAT
393393static long pde_compat_ioctl (struct proc_dir_entry * pde , struct file * file , unsigned int cmd , unsigned long arg )
394394{
395- __auto_type compat_ioctl = pde -> proc_ops -> proc_compat_ioctl ;
395+ const auto compat_ioctl = pde -> proc_ops -> proc_compat_ioctl ;
396396 if (compat_ioctl )
397397 return compat_ioctl (file , cmd , arg );
398398 return - ENOTTY ;
@@ -414,7 +414,7 @@ static long proc_reg_compat_ioctl(struct file *file, unsigned int cmd, unsigned
414414
415415static int pde_mmap (struct proc_dir_entry * pde , struct file * file , struct vm_area_struct * vma )
416416{
417- __auto_type mmap = pde -> proc_ops -> proc_mmap ;
417+ const auto mmap = pde -> proc_ops -> proc_mmap ;
418418 if (mmap )
419419 return mmap (file , vma );
420420 return - EIO ;
@@ -497,7 +497,7 @@ static int proc_reg_open(struct inode *inode, struct file *file)
497497 if (!use_pde (pde ))
498498 return - ENOENT ;
499499
500- __auto_type release = pde -> proc_ops -> proc_release ;
500+ const auto release = pde -> proc_ops -> proc_release ;
501501 if (release ) {
502502 pdeo = kmem_cache_alloc (pde_opener_cache , GFP_KERNEL );
503503 if (!pdeo ) {
@@ -534,10 +534,9 @@ static int proc_reg_release(struct inode *inode, struct file *file)
534534 struct pde_opener * pdeo ;
535535
536536 if (pde_is_permanent (pde )) {
537- __auto_type release = pde -> proc_ops -> proc_release ;
538- if (release ) {
537+ const auto release = pde -> proc_ops -> proc_release ;
538+ if (release )
539539 return release (inode , file );
540- }
541540 return 0 ;
542541 }
543542
0 commit comments