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:	Tue, 29 Dec 2015 14:36:14 +0100
From:	Laurent Navet <laurent.navet@...il.com>
To:	Bojan Prtvar <prtvar.b@...il.com>
Cc:	toshi.kani@...com, dan.j.williams@...el.com,
	akpm@...ux-foundation.org, jsitnicki@...il.com,
	jiang.liu@...ux.intel.com, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] resources: Remove unneeded initialization of local variable

why not directly ?

struct region_devres *dr = devres_alloc(devm_region_release,
sizeof(struct region_devres),..



2015-12-29 14:24 UTC+01:00, Bojan Prtvar <prtvar.b@...il.com>:
> Few lines below dr is reinitialized by devres_alloc()
> so we don't need to init it by NULL in the beginning of
> __devm_request_region()
>
> Signed-off-by: Bojan Prtvar <prtvar.b@...il.com>
> ---
>  kernel/resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/resource.c b/kernel/resource.c
> index f150dbb..1e48ede 100644
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -1356,7 +1356,7 @@ struct resource * __devm_request_region(struct device
> *dev,
>  				struct resource *parent, resource_size_t start,
>  				resource_size_t n, const char *name)
>  {
> -	struct region_devres *dr = NULL;
> +	struct region_devres *dr;
>  	struct resource *res;
>
>  	dr = devres_alloc(devm_region_release, sizeof(struct region_devres),
> --
> 2.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors"
> in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
« On ne résout pas un problème avec les modes de pensée qui l’ont engendré. »
« You cannot solve current problems with current thinking. Current
problems are the result of current thinking »
--
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