From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941276AbcLVS4v convert rfc822-to-8bit (ORCPT ); Thu, 22 Dec 2016 13:56:51 -0500 Received: from outbound.smtp.vt.edu ([198.82.183.121]:43816 "EHLO omr2.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934398AbcLVS4u (ORCPT ); Thu, 22 Dec 2016 13:56:50 -0500 X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6+dev To: Petr Mladek , Jessica Yu cc: linux-kernel@vger.kernel.org, Andrew Morton , Al Viro Subject: [PATCH] Fix usage of true and false as field names in struct taint_flag From: Valdis Kletnieks MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <66756.1482432998.1@turing-police.cc.vt.edu> Content-Transfer-Encoding: 8BIT Date: Thu, 22 Dec 2016 13:56:38 -0500 Message-ID: <66759.1482432998@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 7fd8329ba502ef76dd91db561c7aed696b2c7720 Author: Petr Mladek Date: Wed Sep 21 13:47:22 2016 +0200 taint/module: Clean up global and module taint flags handling Contains this chunk: --- a/include/linux/kernel.h +struct taint_flag { + char true; /* character printed when tainted */ + char false; /* character printed when not tainted */ + bool module; /* also show as a per-module taint flag */ +}; and hilarity ensues when an out-of-tree module has this: # ifndef true # define true (1) # endif # ifndef false # define false (0) # endif Change the field names to not shadow something likely to be used by third-party modules. Signed-off-by: Valdis Kletnieks --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 56aec84237ad..420d4b87feb0 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -514,8 +514,8 @@ extern enum system_states { #define TAINT_FLAGS_COUNT 16 struct taint_flag { - char true; /* character printed when tainted */ - char false; /* character printed when not tainted */ + char tainted; /* character printed when tainted */ + char untainted; /* character printed when not tainted */ bool module; /* also show as a per-module taint flag */ }; diff --git a/kernel/module.c b/kernel/module.c index f7482db0f843..6a0434de5dbd 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1145,7 +1145,7 @@ static size_t module_flags_taint(struct module *mod, char *buf) for (i = 0; i < TAINT_FLAGS_COUNT; i++) { if (taint_flags[i].module && test_bit(i, &mod->taints)) - buf[l++] = taint_flags[i].true; + buf[l++] = taint_flags[i].tainted; } return l; diff --git a/kernel/panic.c b/kernel/panic.c index c51edaa04fce..e02da0928910 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -355,7 +355,7 @@ const char *print_tainted(void) for (i = 0; i < TAINT_FLAGS_COUNT; i++) { const struct taint_flag *t = &taint_flags[i]; *s++ = test_bit(i, &tainted_mask) ? - t->true : t->false; + t->tainted : t->untainted; } *s = 0; } else