Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436AbbK0V3i (ORCPT ); Fri, 27 Nov 2015 16:29:38 -0500 Received: from mailrelay119.isp.belgacom.be ([195.238.20.146]:64880 "EHLO mailrelay119.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754791AbbK0V2v (ORCPT ); Fri, 27 Nov 2015 16:28:51 -0500 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2B/AgC5ylhW/6YUtFtegmlSgUK8BYIaAQ2BZIYPAoE+ORQBAQEBAQEBgQqENQEBBFYjEFE5HhmIMgGycIoOAQEII4ZUiiWEEgWHR4cOiAKNOJxhHwEBQoQFPTSFUgEBAQ From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Philipp Reisner , Fabian Frederick , Lars Ellenberg , drbd-dev@lists.linbit.com Subject: [PATCH 06/21] drbd: use const char * const for drbd strings Date: Fri, 27 Nov 2015 22:26:11 +0100 Message-Id: <1448659575-13485-7-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1448659575-13485-1-git-send-email-fabf@skynet.be> References: <1448659575-13485-1-git-send-email-fabf@skynet.be> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1802 Lines: 53 Be more strict with constant arrays Signed-off-by: Fabian Frederick --- drivers/block/drbd/drbd_strings.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_strings.c b/drivers/block/drbd/drbd_strings.c index 80b0f63..0eeab14 100644 --- a/drivers/block/drbd/drbd_strings.c +++ b/drivers/block/drbd/drbd_strings.c @@ -26,7 +26,7 @@ #include #include "drbd_strings.h" -static const char *drbd_conn_s_names[] = { +static const char * const drbd_conn_s_names[] = { [C_STANDALONE] = "StandAlone", [C_DISCONNECTING] = "Disconnecting", [C_UNCONNECTED] = "Unconnected", @@ -53,13 +53,13 @@ static const char *drbd_conn_s_names[] = { [C_BEHIND] = "Behind", }; -static const char *drbd_role_s_names[] = { +static const char * const drbd_role_s_names[] = { [R_PRIMARY] = "Primary", [R_SECONDARY] = "Secondary", [R_UNKNOWN] = "Unknown" }; -static const char *drbd_disk_s_names[] = { +static const char * const drbd_disk_s_names[] = { [D_DISKLESS] = "Diskless", [D_ATTACHING] = "Attaching", [D_FAILED] = "Failed", @@ -71,7 +71,7 @@ static const char *drbd_disk_s_names[] = { [D_UP_TO_DATE] = "UpToDate", }; -static const char *drbd_state_sw_errors[] = { +static const char * const drbd_state_sw_errors[] = { [-SS_TWO_PRIMARIES] = "Multiple primaries not allowed by config", [-SS_NO_UP_TO_DATE_DISK] = "Need access to UpToDate data", [-SS_NO_LOCAL_DISK] = "Can not resync without local disk", -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/