mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	scsi: core: Fix -Wformat for scsi_host
Clang is more aggressive about -Wformat warnings when the format flag
specifies a type smaller than the parameter. Turns out, struct Scsi_Host's
member can_queue is actually an int. Fixes:
[-Wformat]
shost_rd_attr(can_queue, "%hd\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          %d
Link: https://github.com/ClangBuiltLinux/linux/issues/378
Link: https://lore.kernel.org/r/20201107081132.2629071-1-ndesaulniers@google.com
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
warning: format specifies type 'short' but the argument has type 'int'
			
			
This commit is contained in:
		
							parent
							
								
									16d6317ea4
								
							
						
					
					
						commit
						883928201b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -370,7 +370,7 @@ static DEVICE_ATTR(eh_deadline, S_IRUGO | S_IWUSR, show_shost_eh_deadline, store
 | 
				
			||||||
 | 
					
 | 
				
			||||||
shost_rd_attr(unique_id, "%u\n");
 | 
					shost_rd_attr(unique_id, "%u\n");
 | 
				
			||||||
shost_rd_attr(cmd_per_lun, "%hd\n");
 | 
					shost_rd_attr(cmd_per_lun, "%hd\n");
 | 
				
			||||||
shost_rd_attr(can_queue, "%hd\n");
 | 
					shost_rd_attr(can_queue, "%d\n");
 | 
				
			||||||
shost_rd_attr(sg_tablesize, "%hu\n");
 | 
					shost_rd_attr(sg_tablesize, "%hu\n");
 | 
				
			||||||
shost_rd_attr(sg_prot_tablesize, "%hu\n");
 | 
					shost_rd_attr(sg_prot_tablesize, "%hu\n");
 | 
				
			||||||
shost_rd_attr(unchecked_isa_dma, "%d\n");
 | 
					shost_rd_attr(unchecked_isa_dma, "%d\n");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue