mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	hexdump: do not print debug dumps for !CONFIG_DEBUG
print_hex_dump_debug() is likely supposed to be analogous to pr_debug() or dev_dbg() & friends. Currently it will adhere to dynamic debug, but will not stub out prints if CONFIG_DEBUG is not set. Let's make it do the right thing, because I am tired of having my dmesg buffer full of hex dumps on production systems. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									9bf98f168b
								
							
						
					
					
						commit
						cdf17449af
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -456,11 +456,17 @@ static inline void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
 | 
				
			||||||
			     groupsize, buf, len, ascii)	\
 | 
								     groupsize, buf, len, ascii)	\
 | 
				
			||||||
	dynamic_hex_dump(prefix_str, prefix_type, rowsize,	\
 | 
						dynamic_hex_dump(prefix_str, prefix_type, rowsize,	\
 | 
				
			||||||
			 groupsize, buf, len, ascii)
 | 
								 groupsize, buf, len, ascii)
 | 
				
			||||||
#else
 | 
					#elif defined(DEBUG)
 | 
				
			||||||
#define print_hex_dump_debug(prefix_str, prefix_type, rowsize,		\
 | 
					#define print_hex_dump_debug(prefix_str, prefix_type, rowsize,		\
 | 
				
			||||||
			     groupsize, buf, len, ascii)		\
 | 
								     groupsize, buf, len, ascii)		\
 | 
				
			||||||
	print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize,	\
 | 
						print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize,	\
 | 
				
			||||||
		       groupsize, buf, len, ascii)
 | 
							       groupsize, buf, len, ascii)
 | 
				
			||||||
#endif /* defined(CONFIG_DYNAMIC_DEBUG) */
 | 
					#else
 | 
				
			||||||
 | 
					static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
 | 
				
			||||||
 | 
										int rowsize, int groupsize,
 | 
				
			||||||
 | 
										const void *buf, size_t len, bool ascii)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue