lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpomLbNhLhs3rgVaHp=R0kHVSN-sFePN_Nc205RxXczmu3A@mail.gmail.com>
Date:	Fri, 9 Nov 2012 08:37:40 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	akpm@...ux-foundation.org
Cc:	rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org,
	a.zummo@...ertech.it, spear-devel@...t.st.com,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 1/3] rtc: rtc-spear: Use devm_*() routines

On 8 November 2012 20:07, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> This patch frees rtc-spear driver from tension of freeing resources :)
> devm_* derivatives of multiple routines are used while allocating resources,
> which would be freed automatically by kernel.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>

Hi Andrew,

Can you please apply this fixup to this patch?

commit ad4a753df699e525d9c91a353f4406fd0e363599
Author: Viresh Kumar <viresh.kumar@...aro.org>
Date:   Fri Nov 9 08:36:29 2012 +0530

    fixup! rtc: rtc-spear: Use devm_*() routines
---
 drivers/rtc/rtc-spear.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index 0c4805c..141fc94 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -363,11 +363,6 @@ static int __devinit spear_rtc_probe(struct
platform_device *pdev)
                dev_err(&pdev->dev, "no resource defined\n");
                return -EBUSY;
        }
-       if (!devm_request_mem_region(&pdev->dev, res->start, resource_size(res),
-                               pdev->name)) {
-               dev_err(&pdev->dev, "rtc region already claimed\n");
-               return -EBUSY;
-       }

        config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL);
        if (!config) {
@@ -390,10 +385,9 @@ static int __devinit spear_rtc_probe(struct
platform_device *pdev)
                return status;
        }

-       config->ioaddr = devm_ioremap(&pdev->dev, res->start,
-                       resource_size(res));
+       config->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
        if (!config->ioaddr) {
-               dev_err(&pdev->dev, "ioremap fail\n");
+               dev_err(&pdev->dev, "request-ioremap fail\n");
                return -ENOMEM;
        }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ