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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Feb 2016 17:26:32 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Shawn Lin <shawn.lin@...k-chips.com>
Cc:	linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] spi: rockchip: add debug interface support

On Mon, Feb 15, 2016 at 04:28:22PM +0800, Shawn Lin wrote:

> +#ifdef CONFIG_DEBUG_FS
> +#include <linux/debugfs.h>
> +#endif

Just include the header.  Only add ifdefs if they do something.

> +static int rockchip_spi_debugfs_init(struct rockchip_spi *rs)
> +{
> +	rs->debugfs = debugfs_create_dir("rockchip_spi", NULL);
> +	if (!rs->debugfs)
> +		return -ENOMEM;
> +
> +	debugfs_create_file("regs", S_IFREG | S_IRUGO,
> +		rs->debugfs, (void *)rs, &rockchip_spi_dbg_ops);
> +	return 0;
> +}

This is completely separate to the core debugfs support for SPI, if
we're adding new debugfs stuff that's per device we should be extending
the core debugfs stuff so everything is in one place.

Your register dump stuff looks like you might want to consider using
regmap, it's got this and other register access diagnostics already.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ