mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	jbd2: avoid -Wempty-body warnings
Building with 'make W=1' shows a harmless -Wempty-body warning:
fs/jbd2/recovery.c: In function 'fc_do_one_pass':
fs/jbd2/recovery.c:267:75: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
  267 |                 jbd_debug(3, "Fast commit replay failed, err = %d\n", err);
      |                                                                           ^
Change the empty dprintk() macros to no_printk(), which avoids this
warning and adds format string checking.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210322102152.95684-1-arnd@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
			
			
This commit is contained in:
		
							parent
							
								
									1ae98e295f
								
							
						
					
					
						commit
						d556435156
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -61,7 +61,7 @@ void __jbd2_debug(int level, const char *file, const char *func,
 | 
				
			||||||
#define jbd_debug(n, fmt, a...) \
 | 
					#define jbd_debug(n, fmt, a...) \
 | 
				
			||||||
	__jbd2_debug((n), __FILE__, __func__, __LINE__, (fmt), ##a)
 | 
						__jbd2_debug((n), __FILE__, __func__, __LINE__, (fmt), ##a)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define jbd_debug(n, fmt, a...)    /**/
 | 
					#define jbd_debug(n, fmt, a...)  no_printk(fmt, ##a)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern void *jbd2_alloc(size_t size, gfp_t flags);
 | 
					extern void *jbd2_alloc(size_t size, gfp_t flags);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue