rtc: Remove unnecessary OOM messages
cover rtc: Remove unnecessary OOM messages
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. For example, k.alloc and v.alloc failures use dump_stack().
Jingoo Han (10):
rtc: rtc-at32ap700x: Remove unnecessary OOM messages
rtc: rtc-davinci: Remove unnecessary OOM messages
rtc: rtc-ds1390: Remove unnecessary OOM messages
rtc: rtc-lpc32xx: Remove unnecessary OOM messages
rtc: rtc-moxart: Remove unnecessary OOM messages
rtc: rtc-nuc900: Remove unnecessary OOM messages
rtc: rtc-pm8xxx: Remove unnecessary OOM messages
rtc: rtc-rx8025: Remove unnecessary OOM messages
rtc: rtc-sirfsoc: Remove unnecessary OOM messages
rtc: rtc-spear: Remove unnecessary OOM messages
--- drivers/rtc/rtc-at32ap700x.c | 4 +--- drivers/rtc/rtc-davinci.c | 4 +--- drivers/rtc/rtc-ds1390.c | 5 ++--- drivers/rtc/rtc-lpc32xx.c | 5 ++--- drivers/rtc/rtc-moxart.c | 4 +--- drivers/rtc/rtc-nuc900.c | 5 ++--- drivers/rtc/rtc-pm8xxx.c | 4 +--- drivers/rtc/rtc-rx8025.c | 1 - drivers/rtc/rtc-sirfsoc.c | 6 +----- drivers/rtc/rtc-spear.c | 4 +--- 10 files changed, 12 insertions(+), 30 deletions(-)
PATCH 1/10 rtc: rtc-at32ap700x: Remove unnecessary OOM messages
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-at32ap700x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-at32ap700x.c +1 -3
@@ -204,10 +204,8 @@ static int __init at32_rtc_probe(struct platform_device *pdev) rtc =devm_kzalloc (&pdev->dev,sizeof (struct rtc_at32ap700x ),GFP_KERNEL ); -if (!rtc) { -dev_dbg (&pdev->dev,"out of memory\n" ); +if (!rtc)return -ENOMEM ; - } regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!regs) {
Signature · 1 line
1.7.10.4
Re: [PATCH 01/10] rtc: rtc-at32ap700x: Remove unnecessary OOM messages
Quoted 2 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Thanks for cleaning up.
Quoted 2 lines
Signed-off-by Jingoo Han <[email protected]>
Quoted 20 lines
--- drivers/rtc/rtc-at32ap700x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/rtc/rtc-at32ap700x.c +1
-3@@ -204,10 +204,8 @@ static int __init at32_rtc_probe(struct platform_device *pdev) rtc =devm_kzalloc (&pdev->dev,sizeof (struct rtc_at32ap700x ),GFP_KERNEL ); -if (!rtc) { -dev_dbg (&pdev->dev,"out of memory\n" ); +if (!rtc)return -ENOMEM ; - } regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!regs) {
Signature · 2 lines
mvh Hans-Christian Egtvedt
PATCH 2/10 rtc: rtc-davinci: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-davinci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-davinci.c +1 -3
@@ -484,10 +484,8 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)int ret =0 ; davinci_rtc =devm_kzalloc (&pdev->dev,sizeof (struct davinci_rtc ),GFP_KERNEL ); -if (!davinci_rtc) { -dev_dbg (dev,"could not allocate memory for private data\n" ); +if (!davinci_rtc)return -ENOMEM ; - } davinci_rtc->irq =platform_get_irq (pdev,0 );if (davinci_rtc->irq <0 ) {
Signature · 1 line
1.7.10.4
PATCH 3/10 rtc: rtc-ds1390: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-ds1390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-ds1390.c +2 -3
@@ -132,10 +132,9 @@ static int ds1390_probe(struct spi_device *spi)spi_setup (spi); chip =devm_kzalloc (&spi->dev,sizeof (*chip),GFP_KERNEL ); -if (!chip) { -dev_err (&spi->dev,"unable to allocate device memory\n" ); +if (!chip)return -ENOMEM ; - } +spi_set_drvdata (spi, chip); res =ds1390_get_reg (&spi->dev,DS1390_REG_SECONDS , &tmp);
Signature · 1 line
1.7.10.4
PATCH 4/10 rtc: rtc-lpc32xx: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-lpc32xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-lpc32xx.c +2 -3
@@ -211,10 +211,9 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev) } rtc =devm_kzalloc (&pdev->dev,sizeof (*rtc),GFP_KERNEL ); -if (unlikely (!rtc)) { -dev_err (&pdev->dev,"Can't allocate memory\n" ); +if (unlikely (!rtc))return -ENOMEM ; - } + rtc->irq = rtcirq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
Signature · 1 line
1.7.10.4
PATCH 5/10 rtc: rtc-moxart: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-moxart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-moxart.c +1 -3
@@ -247,10 +247,8 @@ static int moxart_rtc_probe(struct platform_device *pdev)int ret =0 ; moxart_rtc =devm_kzalloc (&pdev->dev,sizeof (*moxart_rtc),GFP_KERNEL ); -if (!moxart_rtc) { -dev_err (&pdev->dev,"devm_kzalloc failed\n" ); +if (!moxart_rtc)return -ENOMEM ; - } moxart_rtc->gpio_data =of_get_named_gpio (pdev->dev.of_node,"gpio-rtc-data" ,0 );
Signature · 1 line
1.7.10.4
PATCH 6/10 rtc: rtc-nuc900: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-nuc900.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-nuc900.c +2 -3
@@ -229,10 +229,9 @@ static int __init nuc900_rtc_probe(struct platform_device *pdev) nuc900_rtc =devm_kzalloc (&pdev->dev,sizeof (struct nuc900_rtc ),GFP_KERNEL ); -if (!nuc900_rtc) { -dev_err (&pdev->dev,"kzalloc nuc900_rtc failed\n" ); +if (!nuc900_rtc)return -ENOMEM ; - } + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); nuc900_rtc->rtc_reg =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (nuc900_rtc->rtc_reg))
Signature · 1 line
1.7.10.4
PATCH 7/10 rtc: rtc-pm8xxx: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-pm8xxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-pm8xxx.c +1 -3
@@ -396,10 +396,8 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) rtc_write_enable = pdata->rtc_write_enable; rtc_dd =devm_kzalloc (&pdev->dev,sizeof (*rtc_dd),GFP_KERNEL ); -if (rtc_dd ==NULL ) { -dev_err (&pdev->dev,"Unable to allocate memory!\n" ); +if (rtc_dd ==NULL )return -ENOMEM ; - }/* Initialise spinlock to protect RTC control register */ spin_lock_init (&rtc_dd->ctrl_reg_lock);
Signature · 1 line
1.7.10.4
PATCH 8/10 rtc: rtc-rx8025: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-rx8025.c | 1 - 1 file changed, 1 deletion(-)
drivers/rtc/rtc-rx8025.c +0 -1
@@ -551,7 +551,6 @@ static int rx8025_probe(struct i2c_client *client, rx8025 =devm_kzalloc (&client->dev,sizeof (*rx8025),GFP_KERNEL );if (!rx8025) { -dev_err (&adapter->dev,"failed to alloc memory\n" ); err = -ENOMEM ; goto errout; }
Signature · 1 line
1.7.10.4
PATCH 9/10 rtc: rtc-sirfsoc: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-sirfsoc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/rtc/rtc-sirfsoc.c +1 -5
@@ -264,12 +264,8 @@ static int sirfsoc_rtc_probe(struct platform_device *pdev) rtcdrv =devm_kzalloc (&pdev->dev,sizeof (struct sirfsoc_rtc_drv ),GFP_KERNEL ); -if (rtcdrv ==NULL ) { -dev_err (&pdev->dev, -"%s: can't alloc mem for drv struct\n" , - pdev->name); +if (rtcdrv ==NULL )return -ENOMEM ; - } err =of_property_read_u32 (np,"reg" , &rtcdrv->rtc_base);if (err) {
Signature · 1 line
1.7.10.4
Re: [PATCH 09/10] rtc: rtc-sirfsoc: Remove unnecessary OOM messages
2014-02-07 16:12 GMT+08:00 Jingoo Han <[email protected]>:
Quoted 5 lines
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Signed-off-by Jingoo Han <[email protected]>---
Quoted 22 lines
drivers/rtc/rtc-sirfsoc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/rtc/rtc-sirfsoc.c +1
-6@@ -264,12 +264,8 @@ static int sirfsoc_rtc_probe(struct platform_device *pdev) rtcdrv =devm_kzalloc (&pdev->dev,sizeof (struct sirfsoc_rtc_drv ),GFP_KERNEL ); -if (rtcdrv ==NULL ) { -dev_err (&pdev->dev, -"%s: can't alloc mem for drv struct\n" , - pdev->name); +if (rtcdrv ==NULL )return -ENOMEM ; - } err =of_property_read_u32 (np,"reg" , &rtcdrv->rtc_base);if (err) { --
Quoted 3 lines
1.7.10.4
-barry
PATCH 10/10 rtc: rtc-spear: Remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/rtc/rtc-spear.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-spear.c +1 -3
@@ -365,10 +365,8 @@ static int spear_rtc_probe(struct platform_device *pdev) } config =devm_kzalloc (&pdev->dev,sizeof (*config),GFP_KERNEL ); -if (!config) { -dev_err (&pdev->dev,"out of memory\n" ); +if (!config)return -ENOMEM ; - }/* alarm irqs */ irq =platform_get_irq (pdev,0 );
Signature · 1 line
1.7.10.4
Re: [PATCH 10/10] rtc: rtc-spear: Remove unnecessary OOM messages
Quoted 14 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Signed-off-by Jingoo Han <[email protected]>--- drivers/rtc/rtc-spear.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/rtc/rtc-spear.c +0
-0@@ -365,10 +365,8 @@ static int spear_rtc_probe(struct platform_device *pdev) }
drivers/rtc/rtc-spear.c static int spear_rtc_probe(struct platform_device *pdev) · line 372
Quoted 10 lines
drivers/rtc/rtc-spear.c +1
-3config =devm_kzalloc (&pdev->dev,sizeof (*config),GFP_KERNEL ); -if (!config) { -dev_err (&pdev->dev,"out of memory\n" ); +if (!config)return -ENOMEM ; - }/* alarm irqs */ irq =platform_get_irq (pdev,0 );