From patchwork Sun Dec 5 06:33:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 380651 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB56aBSZ015917 for ; Sun, 5 Dec 2010 06:39:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481Ab0LEGjV (ORCPT ); Sun, 5 Dec 2010 01:39:21 -0500 Received: from mail-gx0-f180.google.com ([209.85.161.180]:38377 "EHLO mail-gx0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186Ab0LEGjV (ORCPT ); Sun, 5 Dec 2010 01:39:21 -0500 Received: by gxk19 with SMTP id 19so5953082gxk.11 for ; Sat, 04 Dec 2010 22:39:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=G7zNR7Nq2g35a3wzIo8Q+m5zAEoGLV9hFyj5UFtWmp4=; b=NODsIOn0b44tHfrij/JAHRQK/F2+UhDCjAQ+d2QUXS5fAtDVOnnp1aJHcQZ9H7QrJE HqjdHYu7g2c/E31r/0m+pNHZAOcJmxMCgz9sFkjn+4tV0uU9nkD8T1DEDoEEQjCFqZ8b kec0HsnWTDWn+/KItqk8/tpxlopE97c5O2XCg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=I2zmqIPKLbeTDZK0PBB0ZYddzD0SKUS/bi5NbTEPC5fZF8Uy2bw307krLPp7DXrYae +NdsIZi+g1zPoXAY8WmKffhmoLIkPFpmB+5VU0IJjQewMHvFQ34T3iRdvuS2UEqC1viw 9/5zjdqWbZE1gtLuAUJG1sZpTVrW705mkRqBk= Received: by 10.150.146.14 with SMTP id t14mr6905984ybd.191.1291530845588; Sat, 04 Dec 2010 22:34:05 -0800 (PST) Received: from localhost.localdomain (75-119-248-218.dsl.teksavvy.com [75.119.248.218]) by mx.google.com with ESMTPS id u3sm781967yba.4.2010.12.04.22.34.04 (version=SSLv3 cipher=RC4-MD5); Sat, 04 Dec 2010 22:34:05 -0800 (PST) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org Cc: Arnaud Lacombe Subject: [PATCH] kconfig: nuke second argument of conf_write_symbol() Date: Sun, 5 Dec 2010 01:33:16 -0500 Message-Id: <1291530796-16379-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.dirty Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 05 Dec 2010 06:39:21 +0000 (UTC) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index f349bdc..6fd43d7 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -440,12 +440,11 @@ static void conf_write_string(bool headerfile, const char *name, fputs("\"\n", out); } -static void conf_write_symbol(struct symbol *sym, enum symbol_type type, - FILE *out, bool write_no) +static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no) { const char *str; - switch (type) { + switch (sym->type) { case S_BOOLEAN: case S_TRISTATE: switch (sym_get_tristate_value(sym)) { @@ -532,7 +531,7 @@ int conf_write_defconfig(const char *filename) goto next_menu; } } - conf_write_symbol(sym, sym->type, out, true); + conf_write_symbol(sym, out, true); } next_menu: if (menu->list != NULL) { @@ -633,14 +632,8 @@ int conf_write(const char *name) if (!(sym->flags & SYMBOL_WRITE)) goto next; sym->flags &= ~SYMBOL_WRITE; - type = sym->type; - if (type == S_TRISTATE) { - sym_calc_value(modules_sym); - if (modules_sym->curr.tri == no) - type = S_BOOLEAN; - } /* Write config symbol to file */ - conf_write_symbol(sym, type, out, true); + conf_write_symbol(sym, out, true); } next: @@ -842,7 +835,7 @@ int conf_write_autoconf(void) continue; /* write symbol to config file */ - conf_write_symbol(sym, sym->type, out, false); + conf_write_symbol(sym, out, false); /* update autoconf and tristate files */ switch (sym->type) {