Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbbK1Okn (ORCPT ); Sat, 28 Nov 2015 09:40:43 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:21159 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbbK1Okj (ORCPT ); Sat, 28 Nov 2015 09:40:39 -0500 X-IronPort-AV: E=Sophos;i="5.20,357,1444687200"; d="scan'208";a="155448002" From: Julia Lawall To: Konrad Rzeszutek Wilk Cc: kernel-janitors@vger.kernel.org, Boris Ostrovsky , David Vrabel , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH] xen/grant-table: constify gnttab_ops structure Date: Sat, 28 Nov 2015 15:28:40 +0100 Message-Id: <1448720920-10606-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1226 Lines: 38 The gnttab_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/xen/grant-table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index c49f79e..effbaf9 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -128,7 +128,7 @@ struct unmap_refs_callback_data { int result; }; -static struct gnttab_ops *gnttab_interface; +static const struct gnttab_ops *gnttab_interface; static int grant_table_version; static int grefs_per_grant_frame; @@ -1013,7 +1013,7 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx) return rc; } -static struct gnttab_ops gnttab_v1_ops = { +static const struct gnttab_ops gnttab_v1_ops = { .map_frames = gnttab_map_frames_v1, .unmap_frames = gnttab_unmap_frames_v1, .update_entry = gnttab_update_entry_v1, -- 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/