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] [day] [month] [year] [list]
Message-Id: <20071019140918.bedc6be5.akpm@linux-foundation.org>
Date:	Fri, 19 Oct 2007 14:09:18 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	dougthompson@...ssion.com
Cc:	dougthompson@...ssion.com, alan@...rguk.ukuu.org.uk,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] drivers-edac-add Cell MC driver

On Fri, 19 Oct 2007 13:17:43 -0600
dougthompson@...ssion.com wrote:

> +	/* The procedure for clearing FIR bits is a bit ... weird */
> +	if (clear) {
> +		fir &= ~(CBE_MIC_FIR_ECC_ERR_MASK | CBE_MIC_FIR_ECC_SET_MASK);
> +		fir |= CBE_MIC_FIR_ECC_RESET_MASK;
> +		fir &= ~clear;
> +		out_be64(&priv->regs->mic_fir, fir);
> +		(void)in_be64(&priv->regs->mic_fir);

The (void) cast isn't particularly popular practice.  Did you find that it
actually does anything useful?

> +
> +		mb();	/* sync up */

What's this here for?  It could do with a more usful comment.

If it's trying to perform some synchronisation of device register access
then I suspect it didn't work.  Or maybe it happens to work because of how
ppc implements mb(), in which case a direct use of the appropriate ppc
primitive might be clearer.

> +#ifdef DEBUG
> +		fir = in_be64(&priv->regs->mic_fir);
> +		dev_dbg(mci->dev, "fir clear  : 0x%016lx\n", fir);
> +#endif
> +	}
-
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