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:	Mon, 04 May 2009 20:25:43 -0300
From:	Mauro Carvalho Chehab <mchehab@...hat.com>
To:	Borislav Petkov <borislav.petkov@....com>
CC:	akpm@...ux-foundation.org, greg@...ah.com, mingo@...e.hu,
	tglx@...utronix.de, hpa@...or.com, dougthompson@...ssion.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/21] amd64_edac: add f10-and-later methods-p2

Borislav Petkov escreveu:
> +/*
> + * f10_lookup_addr_in_dct
> + *
> + *	Iterate over the DRAM DCT "base" and "mask" register looking for
> + *	a SystemAddr match on the specified 'ChannelSelect' and 'NodeID'
> + *
> + * Return:
> + *	-1  NOT FOUND
> + *	0..csrow = Chip-Select Row
> + */
> +static int f10_lookup_addr_in_dct(u32 InputAddr, u32 NodeID, u32 ChannelSelect)
> +{
> +	struct mem_ctl_info *mci;
> +	struct amd64_pvt *pvt;
> +	u32 CSBase, CSMask;
> +	int CSFound = -1;
> +	int csrow;
> +
> +	mci = mci_lookup[NodeID];
> +	if (!mci)
> +		return CSFound;
>   

It is better to use a standard error code like -EINVAL instead of using 
-1 for error.


Cheers,
Mauro.
--
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