lkml.org 
[lkml]   [2007]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regression: commit "ide: constify struct ide_port_info" causes breakage
Hello.

Russell King wrote:

> commit 8562043606430185cad26d085d46adcc7ad67fd1 is broken, causing:

> CC drivers/ide/pci/cmd64x.o
> CC drivers/ide/pci/hpt366.o
> drivers/ide/pci/hpt366.c:1428: error: hpt366_chipsets causes a section type conflict

> and therefore should be reverted.
>
> The problem arises because hpt366 has other data marked with __devinitdata,
> so the compiler tries to define the initdata section with read-write
> attributes at one point, and read-only attributes when encountering the
> const-but-devinitdata declaration:
>
> static struct hpt_info hpt36x __devinitdata = {
> static struct hpt_info hpt370 __devinitdata = {
> static struct hpt_info hpt370a __devinitdata = {
> ...
> static const struct ide_port_info hpt366_chipsets[] __devinitdata = {

> If we want ide_port_info to be read-only initdata, then we need
> __devroinitdata and __roinitdata tags.

We can just convert cariables declared as 'struct hpt_info' to const too
-- they are read-only templates.

MBR, Sergei
-
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/

\
 
 \ /
  Last update: 2007-10-26 18:13    [W:0.067 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site