Message ID | 1324189772-26914-1-git-send-email-swarren@nvidia.com |
---|---|
State | New, archived |
Headers | show |
On Sun, Dec 18, 2011 at 11:59 AM, Stephen Warren <swarren@nvidia.com> wrote: > This fixes some section mismatch build warnings. What was the error was a devinit function called from these? > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > v2: New patch. > > drivers/i2c/busses/i2c-tegra.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c > index 46b6500..e8560ed 100644 > --- a/drivers/i2c/busses/i2c-tegra.c > +++ b/drivers/i2c/busses/i2c-tegra.c > @@ -558,7 +558,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { > .functionality = tegra_i2c_func, > }; > > -static int tegra_i2c_probe(struct platform_device *pdev) > +static int __devinit tegra_i2c_probe(struct platform_device *pdev) > { > struct tegra_i2c_dev *i2c_dev; > struct tegra_i2c_platform_data *pdata = pdev->dev.platform_data; > @@ -690,7 +690,7 @@ err_iounmap: > return ret; > } > > -static int tegra_i2c_remove(struct platform_device *pdev) > +static int __devexit tegra_i2c_remove(struct platform_device *pdev) > { > struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev); > i2c_del_adapter(&i2c_dev->adapter); > -- > 1.7.5.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-i2c" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Shubhrajyoti Datta wrote at Sunday, December 18, 2011 11:54 PM: > On Sun, Dec 18, 2011 at 11:59 AM, Stephen Warren <swarren@nvidia.com> wrote: > > This fixes some section mismatch build warnings. > > What was the error was a devinit function called from these? As I Understand It, probe/remove are devinit/exit functions, and hence should be marked as such. The errors were from building with CONFIG_DEBUG_SECTION_MISMATCH=y. I guess the section mismatch errors won't actually show up in the code that's in the kernel right now; they only showed up because I had a local patch that modified probe() to reference tegra_i2c_of_match[] which is __devinitconst. I since reworked that patch so that it doesn't introduce that reference, for other reasons. Still, I think this is a good cleanup change even if nothing is actually causing these mismatch errors to fire right now.
On Sat, Dec 17, 2011 at 11:29:29PM -0700, Stephen Warren wrote: > This fixes some section mismatch build warnings. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> Ben, since the patch is trivial, I've picked it up in tegra for-3.3/drivers and will merge that way. Let me know if you disagree. Thanks, -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Dec 17, 2011 at 11:29:29PM -0700, Stephen Warren wrote: > This fixes some section mismatch build warnings. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > v2: New patch. > > drivers/i2c/busses/i2c-tegra.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c > index 46b6500..e8560ed 100644 > --- a/drivers/i2c/busses/i2c-tegra.c > +++ b/drivers/i2c/busses/i2c-tegra.c > @@ -558,7 +558,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { > .functionality = tegra_i2c_func, > }; > > -static int tegra_i2c_probe(struct platform_device *pdev) > +static int __devinit tegra_i2c_probe(struct platform_device *pdev) > { > struct tegra_i2c_dev *i2c_dev; > struct tegra_i2c_platform_data *pdata = pdev->dev.platform_data; > @@ -690,7 +690,7 @@ err_iounmap: > return ret; > } > > -static int tegra_i2c_remove(struct platform_device *pdev) > +static int __devexit tegra_i2c_remove(struct platform_device *pdev) > { > struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev); > i2c_del_adapter(&i2c_dev->adapter); You need t oupdate the platform driver's .remove method with __devexit_p to ensure that it nulls it out.
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 46b6500..e8560ed 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -558,7 +558,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { .functionality = tegra_i2c_func, }; -static int tegra_i2c_probe(struct platform_device *pdev) +static int __devinit tegra_i2c_probe(struct platform_device *pdev) { struct tegra_i2c_dev *i2c_dev; struct tegra_i2c_platform_data *pdata = pdev->dev.platform_data; @@ -690,7 +690,7 @@ err_iounmap: return ret; } -static int tegra_i2c_remove(struct platform_device *pdev) +static int __devexit tegra_i2c_remove(struct platform_device *pdev) { struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev); i2c_del_adapter(&i2c_dev->adapter);
This fixes some section mismatch build warnings. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- v2: New patch. drivers/i2c/busses/i2c-tegra.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)