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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 8 Feb 2013 02:35:17 +0000
From:	"Kumar, Anil" <anilkumar.v@...com>
To:	"Nori, Sekhar" <nsekhar@...com>
CC:	"linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"davinci-linux-open-source@...ux.davincidsp.com" 
	<davinci-linux-open-source@...ux.davincidsp.com>,
	"wim@...ana.be" <wim@...ana.be>
Subject: RE: [PATCH] watchdog: davinci_wdt: update to devm_* API

Hi Sekhar,

Thanks for the review. 

On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
> 
> On 2/7/2013 9:02 AM, Kumar, Anil wrote:
> > Update the code to use devm_* API so that driver
> > core will manage resources.
> > 
> > Signed-off-by: Kumar, Anil <anilkumar.v@...com>
> > ---
> > This patch applies on top of v3.8-rc6.
> > 
> > Tested on da850 EVM.
> > 
> > :100644 100644 e8e8724... 6ad76a3... M	drivers/watchdog/davinci_wdt.c
> >  drivers/watchdog/davinci_wdt.c |   34 +++++++++-------------------------
> >  1 files changed, 9 insertions(+), 25 deletions(-)
> > 
> > diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> > index e8e8724..6ad76a3 100644
> > --- a/drivers/watchdog/davinci_wdt.c
> > +++ b/drivers/watchdog/davinci_wdt.c
> > @@ -69,7 +69,6 @@ static unsigned long wdt_status;
> >  #define WDT_REGION_INITED 2
> >  #define WDT_DEVICE_INITED 3
> >  
> > -static struct resource	*wdt_mem;
> >  static void __iomem	*wdt_base;
> >  struct clk		*wdt_clk;
> >  
> > @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
> >  
> >  static int davinci_wdt_probe(struct platform_device *pdev)
> >  {
> > -	int ret = 0, size;
> > -	struct device *dev = &pdev->dev;
> 
> Its not clear why you had to drop use of this variable?

Actually, I have not found any particular need to take pointer
into dev and then use in the code. Rather we can directly use.  

> 
> > +	int ret = 0;
> > +	static struct resource  *wdt_mem;
> >  
> > -	wdt_clk = clk_get(dev, NULL);
> > +	wdt_clk = clk_get(&pdev->dev, NULL);
> 
> When you are converting to use devres, why not convert this to
> devm_clk_get() as well?
> 
Right. I will do it.

Thanks,
Anil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ