From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109AbbK2IAE (ORCPT ); Sun, 29 Nov 2015 03:00:04 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39966 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961AbbK2IAB (ORCPT ); Sun, 29 Nov 2015 03:00:01 -0500 Date: Sat, 28 Nov 2015 23:58:25 -0800 From: tip-bot for Julia Lawall Message-ID: Cc: linux-kernel@vger.kernel.org, jdmason@kudzu.us, muli@il.ibm.com, peterz@infradead.org, Julia.Lawall@lip6.fr, torvalds@linux-foundation.org, hpa@zytor.com, bp@alien8.de, tglx@linutronix.de, mingo@kernel.org Reply-To: Julia.Lawall@lip6.fr, peterz@infradead.org, jdmason@kudzu.us, muli@il.ibm.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, bp@alien8.de, torvalds@linux-foundation.org, hpa@zytor.com In-Reply-To: <1448726295-10959-1-git-send-email-Julia.Lawall@lip6.fr> References: <1448726295-10959-1-git-send-email-Julia.Lawall@lip6.fr> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/platform/calgary: Constify cal_chipset_ops structures Git-Commit-ID: d6b56b0bc68ba7927b286da86eda1d4d4dbe63f6 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d6b56b0bc68ba7927b286da86eda1d4d4dbe63f6 Gitweb: http://git.kernel.org/tip/d6b56b0bc68ba7927b286da86eda1d4d4dbe63f6 Author: Julia Lawall AuthorDate: Sat, 28 Nov 2015 16:58:15 +0100 Committer: Ingo Molnar CommitDate: Sun, 29 Nov 2015 08:50:58 +0100 x86/platform/calgary: Constify cal_chipset_ops structures The cal_chipset_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jon D. Mason Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1448726295-10959-1-git-send-email-Julia.Lawall@lip6.fr Signed-off-by: Ingo Molnar --- arch/x86/include/asm/calgary.h | 2 +- arch/x86/kernel/pci-calgary_64.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/calgary.h b/arch/x86/include/asm/calgary.h index 0d467b3..a8303eb 100644 --- a/arch/x86/include/asm/calgary.h +++ b/arch/x86/include/asm/calgary.h @@ -31,7 +31,7 @@ #include struct iommu_table { - struct cal_chipset_ops *chip_ops; /* chipset specific funcs */ + const struct cal_chipset_ops *chip_ops; /* chipset specific funcs */ unsigned long it_base; /* mapped address of tce table */ unsigned long it_hint; /* Hint for next alloc */ unsigned long *it_map; /* A simple allocation bitmap for now */ diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 0497f71..833b1d3 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c @@ -180,13 +180,13 @@ static void calioc2_dump_error_regs(struct iommu_table *tbl); static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl); static void get_tce_space_from_tar(void); -static struct cal_chipset_ops calgary_chip_ops = { +static const struct cal_chipset_ops calgary_chip_ops = { .handle_quirks = calgary_handle_quirks, .tce_cache_blast = calgary_tce_cache_blast, .dump_error_regs = calgary_dump_error_regs }; -static struct cal_chipset_ops calioc2_chip_ops = { +static const struct cal_chipset_ops calioc2_chip_ops = { .handle_quirks = calioc2_handle_quirks, .tce_cache_blast = calioc2_tce_cache_blast, .dump_error_regs = calioc2_dump_error_regs