From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbdJPKIj (ORCPT ); Mon, 16 Oct 2017 06:08:39 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:56585 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbdJPKIh (ORCPT ); Mon, 16 Oct 2017 06:08:37 -0400 X-Google-Smtp-Source: ABhQp+SpBRqqziLDXS4ycyXDIcFFDQcXztHXc/7Eyh/quqrJ7vI2fJMZnx//oYB8WYSFKiDnN/LQWw== From: Bhumika Goyal To: julia.lawall@lip6.fr, nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 1/2] ARM: davinci: make the function argument as const Date: Mon, 16 Oct 2017 12:08:23 +0200 Message-Id: <1508148504-2771-2-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508148504-2771-1-git-send-email-bhumirks@gmail.com> References: <1508148504-2771-1-git-send-email-bhumirks@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the function argument of the function davinci_common_init as const as it's memory contents are only copied during a memcpy call. So, the fields of the structure to which the argument soc_info points to never gets modified and therefore the argument can be made const. Add const to the prototype too. Signed-off-by: Bhumika Goyal --- arch/arm/mach-davinci/common.c | 2 +- arch/arm/mach-davinci/include/mach/common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 9f9fbfa..bcb6a7b 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c @@ -77,7 +77,7 @@ static int __init davinci_init_id(struct davinci_soc_info *soc_info) return -EINVAL; } -void __init davinci_common_init(struct davinci_soc_info *soc_info) +void __init davinci_common_init(const struct davinci_soc_info *soc_info) { int ret; diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index 037aa66..433a008 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h @@ -79,7 +79,7 @@ struct davinci_soc_info { extern struct davinci_soc_info davinci_soc_info; -extern void davinci_common_init(struct davinci_soc_info *soc_info); +extern void davinci_common_init(const struct davinci_soc_info *soc_info); extern void davinci_init_ide(void); void davinci_restart(enum reboot_mode mode, const char *cmd); void davinci_init_late(void); -- 1.9.1