mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	HID: roccat: declare meaning of pack pragma usage in driver headers
Using pack pragma to prevent padding bytes in binary data structures used for hardware communication. Explanation of these pragmas was requested. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
		
							parent
							
								
									5012aada50
								
							
						
					
					
						commit
						bd3a2b9663
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -14,6 +14,9 @@
 | 
			
		|||
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Binary data structures used for hardware communication must have no padding.
 | 
			
		||||
 */
 | 
			
		||||
#pragma pack(push)
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,6 +14,9 @@
 | 
			
		|||
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Binary data structures used for hardware communication must have no padding.
 | 
			
		||||
 */
 | 
			
		||||
#pragma pack(push)
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue