Message ID | 1360427896-12004-8-git-send-email-ezequiel.garcia@free-electrons.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Sat, Feb 09, 2013 at 01:38:16PM -0300, Ezequiel Garcia wrote: > Since the condition is not an error but a warning, replace > printk KERN_ERR with dev_warn. > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> > --- > arch/arm/mach-omap2/gpmc-onenand.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c > index 4771945..fd6e35b 100644 > --- a/arch/arm/mach-omap2/gpmc-onenand.c > +++ b/arch/arm/mach-omap2/gpmc-onenand.c > @@ -367,7 +367,7 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) > > if (cpu_is_omap24xx() && > (gpmc_onenand_data->flags & ONENAND_SYNC_READWRITE)) { > - printk(KERN_ERR "Onenand using only SYNC_READ on 24xx\n"); > + dev_warn(dev, "OneNAND using only SYNC_READ on 24xx\n"); it would seem more natural to use dev_err() instead.
On Sat, Feb 09, 2013 at 06:55:32PM +0200, Felipe Balbi wrote: > Hi, > > On Sat, Feb 09, 2013 at 01:38:16PM -0300, Ezequiel Garcia wrote: > > Since the condition is not an error but a warning, replace > > printk KERN_ERR with dev_warn. > > > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> > > --- > > arch/arm/mach-omap2/gpmc-onenand.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c > > index 4771945..fd6e35b 100644 > > --- a/arch/arm/mach-omap2/gpmc-onenand.c > > +++ b/arch/arm/mach-omap2/gpmc-onenand.c > > @@ -367,7 +367,7 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) > > > > if (cpu_is_omap24xx() && > > (gpmc_onenand_data->flags & ONENAND_SYNC_READWRITE)) { > > - printk(KERN_ERR "Onenand using only SYNC_READ on 24xx\n"); > > + dev_warn(dev, "OneNAND using only SYNC_READ on 24xx\n"); > > it would seem more natural to use dev_err() instead. > Are you sure? The error seems more a warning to me, although I guess it's arguable. Let me know and I'll fix it in v2.
On Sat, Feb 09, 2013 at 03:05:31PM -0300, Ezequiel Garcia wrote: > On Sat, Feb 09, 2013 at 06:55:32PM +0200, Felipe Balbi wrote: > > Hi, > > > > On Sat, Feb 09, 2013 at 01:38:16PM -0300, Ezequiel Garcia wrote: > > > Since the condition is not an error but a warning, replace > > > printk KERN_ERR with dev_warn. > > > > > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> > > > --- > > > arch/arm/mach-omap2/gpmc-onenand.c | 2 +- > > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > > > diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c > > > index 4771945..fd6e35b 100644 > > > --- a/arch/arm/mach-omap2/gpmc-onenand.c > > > +++ b/arch/arm/mach-omap2/gpmc-onenand.c > > > @@ -367,7 +367,7 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) > > > > > > if (cpu_is_omap24xx() && > > > (gpmc_onenand_data->flags & ONENAND_SYNC_READWRITE)) { > > > - printk(KERN_ERR "Onenand using only SYNC_READ on 24xx\n"); > > > + dev_warn(dev, "OneNAND using only SYNC_READ on 24xx\n"); > > > > it would seem more natural to use dev_err() instead. > > > > Are you sure? The error seems more a warning to me, > although I guess it's arguable. > > Let me know and I'll fix it in v2. my bad, should've read the code more carefuly. Indeed it looks more like a warning as we continue to try to use the IP. My bad.
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 4771945..fd6e35b 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c @@ -367,7 +367,7 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) if (cpu_is_omap24xx() && (gpmc_onenand_data->flags & ONENAND_SYNC_READWRITE)) { - printk(KERN_ERR "Onenand using only SYNC_READ on 24xx\n"); + dev_warn(dev, "OneNAND using only SYNC_READ on 24xx\n"); gpmc_onenand_data->flags &= ~ONENAND_SYNC_READWRITE; gpmc_onenand_data->flags |= ONENAND_SYNC_READ; }
Since the condition is not an error but a warning, replace printk KERN_ERR with dev_warn. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> --- arch/arm/mach-omap2/gpmc-onenand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)