From patchwork Tue Nov 27 23:46:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 202322 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1FF5B2C008E for ; Wed, 28 Nov 2012 10:46:41 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756549Ab2K0XqI (ORCPT ); Tue, 27 Nov 2012 18:46:08 -0500 Received: from ozlabs.org ([203.10.76.45]:50718 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507Ab2K0XqG (ORCPT ); Tue, 27 Nov 2012 18:46:06 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 020F42C0081; Wed, 28 Nov 2012 10:46:05 +1100 (EST) Received: by localhost.localdomain (Postfix, from userid 1000) id C2F41D4790A; Wed, 28 Nov 2012 10:46:04 +1100 (EST) Received: from neuling.org (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id C186AD47908; Wed, 28 Nov 2012 10:46:04 +1100 (EST) From: Michael Neuling To: Grant Likely cc: Jimi Xenidis , sfr@canb.auug.org.au, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, sparclinux@vger.kernel.org, Benjamin Herrenschmidt , "David S. Miller" , Julian Calaby Subject: Re: [PATCH v2] drivers/of: Constify device_node->name and ->path_component_name In-reply-to: <1353075625-7755-1-git-send-email-grant.likely@secretlab.ca> References: <1353075625-7755-1-git-send-email-grant.likely@secretlab.ca> Comments: In-reply-to Grant Likely message dated "Fri, 16 Nov 2012 14:20:25 -0000." X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.3.1 Date: Wed, 28 Nov 2012 10:46:04 +1100 Message-ID: <23435.1354059964@neuling.org> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org > Neither of these should ever be changed once set. Make them const and > fix up the users that try to modify it in-place. In one case > kmalloc+memcpy is replaced with kstrdup() to avoid modifying the string. > > Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among > others. Grant, This breaks powerpc chroma_defconfig in next-20121127 with: arch/powerpc/sysdev/scom.c:160:17: error: assignment discards 'const' qualifier from pointer target type [-Werror] The following fixes it. The change is to generic code, so I'm not sure it's the right fix as it may break other configs/archs. the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 66c434f..77f64e4 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h @@ -23,7 +23,7 @@ struct file_operations; struct debugfs_blob_wrapper { - void *data; + const void *data; unsigned long size; }; -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in