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, 18 Mar 2011 09:11:40 +0100
From:	Wim Van Sebroeck <wim@...ana.be>
To:	Julia Lawall <julia@...u.dk>
Cc:	Kukjin Kim <kgene.kim@...sung.com>,
	'Ben Dooks' <ben-linux@...ff.org>,
	kernel-janitors@...r.kernel.org,
	'Wim Van Sebroeck' <wim@...ana.be>,
	linux-arm-kernel@...ts.infradead.org,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] drivers/watchdog/s3c2410_wdt.c: Convert
	release_resource to release_region/release_mem_region

Hi Julia, Kukjin Kim,

> > Hmm...I think, 'res' is better for platform_get_resource().
> > Do we _really_ need to change the name?...
> 
> wdt_mem is a global variable.  Is res a good name for a global variable?  
> One could say wdt_mem = res, if that seems better.

If you look at the code then you have:
static struct resource  *wdt_mem;
static struct resource  *wdt_irq;

and in the probe function you have:
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	...
	wdt_mem = request_mem_region(res->start, size, pdev->name);
	...
	wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);

So doing Julia's:
	wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	...
	if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
	...
	wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0)

seems the best solution to me (since you then have both resources being polulated via platform_get_resource(pdev,... ).

Kind regards,
Wim.

--
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