mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-03 18:20:25 +02:00 
			
		
		
		
	dma-debug: use named initializers for dir2name
Make dir2name a little more readable and maintainable by using named initializers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
This commit is contained in:
		
							parent
							
								
									f1565c24b5
								
							
						
					
					
						commit
						23efed6fa7
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -144,8 +144,12 @@ static const char *type2name[] = {
 | 
			
		|||
	[dma_debug_resource] = "resource",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const char *dir2name[4] = { "DMA_BIDIRECTIONAL", "DMA_TO_DEVICE",
 | 
			
		||||
				   "DMA_FROM_DEVICE", "DMA_NONE" };
 | 
			
		||||
static const char *dir2name[] = {
 | 
			
		||||
	[DMA_BIDIRECTIONAL]	= "DMA_BIDIRECTIONAL",
 | 
			
		||||
	[DMA_TO_DEVICE]		= "DMA_TO_DEVICE",
 | 
			
		||||
	[DMA_FROM_DEVICE]	= "DMA_FROM_DEVICE",
 | 
			
		||||
	[DMA_NONE]		= "DMA_NONE",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * The access to some variables in this macro is racy. We can't use atomic_t
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue