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]
Message-ID: <460D70D9.5020704@linux-foundation.org>
Date:	Fri, 30 Mar 2007 13:19:37 -0700
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	Auke Kok <auke-jan.h.kok@...el.com>
CC:	jeff@...zik.org, bruce.w.allan@...el.com,
	jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
	cramerj@...el.com, john.ronciak@...el.com,
	arjan.van.de.ven@...el.com, akpm@...ux-foundation.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH 19/19] e1000: major part of the new API changes


>  
> +s32
> +e1000_alloc_zeroed_dev_spec_struct(struct e1000_hw *hw, u32 size)
> +{
> +	hw->dev_spec = kmalloc(size, GFP_KERNEL);
> +
> +	if (!hw->dev_spec)
> +		return -ENOMEM;
> +
> +	memset(hw->dev_spec, 0, size);
> +
> +	return E1000_SUCCESS;
> +}
>   

This is what is wrong with a lot of the new code. It is written as
verbose as possible.

What is wrong with open coded
    hw->dev_spec = kzalloc(size, GFP_KERNEL).
> +
> +void
> +e1000_free_dev_spec_struct(struct e1000_hw *hw)
> +{
> +	if (!hw->dev_spec)
> +		return;
> +
> +	kfree(hw->dev_spec);
> +}
> +
>   
Almost looks like you contracted this out to someone paid by the LOC.


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ