@@ -1021,7 +1021,7 @@ static int check_pad_bytes(struct kmem_cache *s, struct slab *slab, u8 *p)
10211021}
10221022
10231023/* Check the pad bytes at the end of a slab page */
1024- static int slab_pad_check (struct kmem_cache * s , struct slab * slab )
1024+ static void slab_pad_check (struct kmem_cache * s , struct slab * slab )
10251025{
10261026 u8 * start ;
10271027 u8 * fault ;
@@ -1031,21 +1031,21 @@ static int slab_pad_check(struct kmem_cache *s, struct slab *slab)
10311031 int remainder ;
10321032
10331033 if (!(s -> flags & SLAB_POISON ))
1034- return 1 ;
1034+ return ;
10351035
10361036 start = slab_address (slab );
10371037 length = slab_size (slab );
10381038 end = start + length ;
10391039 remainder = length % s -> size ;
10401040 if (!remainder )
1041- return 1 ;
1041+ return ;
10421042
10431043 pad = end - remainder ;
10441044 metadata_access_enable ();
10451045 fault = memchr_inv (kasan_reset_tag (pad ), POISON_INUSE , remainder );
10461046 metadata_access_disable ();
10471047 if (!fault )
1048- return 1 ;
1048+ return ;
10491049 while (end > fault && end [-1 ] == POISON_INUSE )
10501050 end -- ;
10511051
@@ -1054,7 +1054,6 @@ static int slab_pad_check(struct kmem_cache *s, struct slab *slab)
10541054 print_section (KERN_ERR , "Padding " , pad , remainder );
10551055
10561056 restore_bytes (s , "slab padding" , POISON_INUSE , fault , end );
1057- return 0 ;
10581057}
10591058
10601059static int check_object (struct kmem_cache * s , struct slab * slab ,
@@ -1642,8 +1641,7 @@ static inline int free_debug_processing(
16421641 void * head , void * tail , int bulk_cnt ,
16431642 unsigned long addr ) { return 0 ; }
16441643
1645- static inline int slab_pad_check (struct kmem_cache * s , struct slab * slab )
1646- { return 1 ; }
1644+ static inline void slab_pad_check (struct kmem_cache * s , struct slab * slab ) {}
16471645static inline int check_object (struct kmem_cache * s , struct slab * slab ,
16481646 void * object , u8 val ) { return 1 ; }
16491647static inline void add_full (struct kmem_cache * s , struct kmem_cache_node * n ,
0 commit comments