All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Jimi Xenidis <jimix@pobox.com>,
	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 <benh@kernel.crashing.org>,
	"David S. Miller" <davem@davemloft.net>,
	Julian Calaby <julian.calaby@gmail.com>
Subject: Re: [PATCH v2] drivers/of: Constify device_node->name and ->path_component_name
Date: Wed, 28 Nov 2012 10:46:04 +1100	[thread overview]
Message-ID: <23435.1354059964@neuling.org> (raw)
In-Reply-To: <1353075625-7755-1-git-send-email-grant.likely@secretlab.ca>

> 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.

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;
 };

WARNING: multiple messages have this Message-ID (diff)
From: Michael Neuling <mikey@neuling.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Jimi Xenidis <jimix@pobox.com>,
	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 <benh@kernel.crashing.org>,
	"David S. Miller" <davem@davemloft.net>,
	Julian Calaby <julian.calaby@gmail.com>
Subject: Re: [PATCH v2] drivers/of: Constify device_node->name and ->path_component_name
Date: Tue, 27 Nov 2012 23:46:04 +0000	[thread overview]
Message-ID: <23435.1354059964@neuling.org> (raw)
In-Reply-To: <1353075625-7755-1-git-send-email-grant.likely@secretlab.ca>

> 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.

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;
 };

  parent reply	other threads:[~2012-11-27 23:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 14:20 [PATCH v2] drivers/of: Constify device_node->name and ->path_component_name Grant Likely
2012-11-16 17:33 ` David Miller
2012-11-16 17:33   ` David Miller
2012-11-27 23:46 ` Michael Neuling [this message]
2012-11-27 23:46   ` Michael Neuling
2012-11-29 16:34   ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23435.1354059964@neuling.org \
    --to=mikey@neuling.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jimix@pobox.com \
    --cc=julian.calaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.