sconfig: Some fixes
clang complained about a missing include and wrong fprintf use. Change-Id: Idc023b653e694147c624d5f8f9ed3b797c462e9f Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/1067 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Stefan Reinauer
					
				
			
			
				
	
			
			
			
						parent
						
							7c2d058d61
						
					
				
				
					commit
					2dbfcb750f
				
			@@ -18,6 +18,7 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <ctype.h>
 | 
				
			||||||
#include "sconfig.h"
 | 
					#include "sconfig.h"
 | 
				
			||||||
#include "sconfig.tab.h"
 | 
					#include "sconfig.tab.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -336,7 +337,7 @@ static void pass0(FILE *fil, struct device *ptr) {
 | 
				
			|||||||
static void pass1(FILE *fil, struct device *ptr) {
 | 
					static void pass1(FILE *fil, struct device *ptr) {
 | 
				
			||||||
	if (!ptr->used && (ptr->type == device)) {
 | 
						if (!ptr->used && (ptr->type == device)) {
 | 
				
			||||||
		if (ptr->id != 0)
 | 
							if (ptr->id != 0)
 | 
				
			||||||
			fprintf(fil, "static ", ptr->name);
 | 
								fprintf(fil, "static ");
 | 
				
			||||||
		fprintf(fil, "struct device %s = {\n", ptr->name);
 | 
							fprintf(fil, "struct device %s = {\n", ptr->name);
 | 
				
			||||||
		fprintf(fil, "\t.ops = %s,\n", (ptr->ops)?(ptr->ops):"0");
 | 
							fprintf(fil, "\t.ops = %s,\n", (ptr->ops)?(ptr->ops):"0");
 | 
				
			||||||
		fprintf(fil, "\t.bus = &%s_links[%d],\n", ptr->bus->name, ptr->bus->link);
 | 
							fprintf(fil, "\t.bus = &%s_links[%d],\n", ptr->bus->name, ptr->bus->link);
 | 
				
			||||||
@@ -358,7 +359,7 @@ static void pass1(FILE *fil, struct device *ptr) {
 | 
				
			|||||||
		if (ptr->children || ptr->multidev)
 | 
							if (ptr->children || ptr->multidev)
 | 
				
			||||||
			fprintf(fil, "\t.link_list = &%s_links[0],\n", ptr->name);
 | 
								fprintf(fil, "\t.link_list = &%s_links[0],\n", ptr->name);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			fprintf(fil, "\t.link_list = NULL,\n", ptr->name);
 | 
								fprintf(fil, "\t.link_list = NULL,\n");
 | 
				
			||||||
		if (ptr->sibling)
 | 
							if (ptr->sibling)
 | 
				
			||||||
			fprintf(fil, "\t.sibling = &%s,\n", ptr->sibling->name);
 | 
								fprintf(fil, "\t.sibling = &%s,\n", ptr->sibling->name);
 | 
				
			||||||
		if (ptr->chip->chiph_exists) {
 | 
							if (ptr->chip->chiph_exists) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user