mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	kconfig: remove unneeded symbol_empty variable
This is used only for initializing other variables. Use the empty string "" directly. Please note newval.tri is unused for S_INT/HEX/STRING. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
		
							parent
							
								
									0df8e97085
								
							
						
					
					
						commit
						4e244c10ea
					
				
					 1 changed files with 2 additions and 9 deletions
				
			
		| 
						 | 
					@ -29,12 +29,6 @@ struct symbol symbol_no = {
 | 
				
			||||||
	.flags = SYMBOL_CONST|SYMBOL_VALID,
 | 
						.flags = SYMBOL_CONST|SYMBOL_VALID,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct symbol symbol_empty = {
 | 
					 | 
				
			||||||
	.name = "",
 | 
					 | 
				
			||||||
	.curr = { "", no },
 | 
					 | 
				
			||||||
	.flags = SYMBOL_VALID,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct symbol *modules_sym;
 | 
					struct symbol *modules_sym;
 | 
				
			||||||
static tristate modules_val;
 | 
					static tristate modules_val;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -346,7 +340,7 @@ void sym_calc_value(struct symbol *sym)
 | 
				
			||||||
	case S_INT:
 | 
						case S_INT:
 | 
				
			||||||
	case S_HEX:
 | 
						case S_HEX:
 | 
				
			||||||
	case S_STRING:
 | 
						case S_STRING:
 | 
				
			||||||
		newval = symbol_empty.curr;
 | 
							newval.val = "";
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case S_BOOLEAN:
 | 
						case S_BOOLEAN:
 | 
				
			||||||
	case S_TRISTATE:
 | 
						case S_TRISTATE:
 | 
				
			||||||
| 
						 | 
					@ -697,13 +691,12 @@ const char *sym_get_string_default(struct symbol *sym)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct property *prop;
 | 
						struct property *prop;
 | 
				
			||||||
	struct symbol *ds;
 | 
						struct symbol *ds;
 | 
				
			||||||
	const char *str;
 | 
						const char *str = "";
 | 
				
			||||||
	tristate val;
 | 
						tristate val;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sym_calc_visibility(sym);
 | 
						sym_calc_visibility(sym);
 | 
				
			||||||
	sym_calc_value(modules_sym);
 | 
						sym_calc_value(modules_sym);
 | 
				
			||||||
	val = symbol_no.curr.tri;
 | 
						val = symbol_no.curr.tri;
 | 
				
			||||||
	str = symbol_empty.curr.val;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* If symbol has a default value look it up */
 | 
						/* If symbol has a default value look it up */
 | 
				
			||||||
	prop = sym_get_default_prop(sym);
 | 
						prop = sym_get_default_prop(sym);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue