mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: Re: [RFC 4/4] firewire: add mem1394
Date: Sun, 5 Feb 2006 00:43:27 -0800	[thread overview]
Message-ID: <20060205004327.78926498.akpm@osdl.org> (raw)
In-Reply-To: <1138920185.3621.24.camel@localhost>

Johannes Berg <johannes@sipsolutions.net> wrote:
>
> +config IEEE1394_MEMDEV
> +	tristate "IEEE1394 memory device support"
> +	depends on IEEE1394 && EXPERIMENTAL
> +	help
> +	  Say Y here if you want support for the ieee1394 memory device.
> +	  This is useful for debugging systems attached via firewire
> +	  since it usually allows you to read from and write to their memory,
> +	  depending on the controller and machine setup.

1394 is evil.  Does this mean that if a machine is completely
dead-and-crashed, we can still suck all its memory out over 1394 with no
cooperation from the dead machine's kernel?  If not, what limitations are
there?



Triviata:

> +static int mem1394_read(struct file *file, char __user * buffer,
> +			size_t count, loff_t *offset)
> +{
> +	struct mem1394_file_info *fi = (struct mem1394_file_info*)file->private_data;

Unneeded cast.

> +	packet = hpsb_make_readpacket(fi->memdev->ne->host, fi->memdev->ne->nodeid, *offset, submitcount);

xterm too big!

> +static int mem1394_release(struct inode *inode, struct file *file)
> +{
> +	struct mem1394_file_info *fi = (struct mem1394_file_info*)file->private_data;

Unneeded cast.

> +	

Adds trailing whitespace ;)

> +static struct mem1394_dev * alloc_mem1394_dev(struct device *dev)
> +{
> +	struct mem1394_dev *result;
> +	struct node_entry *ne = container_of(dev, struct node_entry, device);
> +	int ret;
> +	struct class_device * mem1394_class_member;

Inconsistent space-after-asterisk policy (no-space is preferred).

> +	mem1394_class_member = class_device_create(mem1394_sysfs_class, NULL, result->cdev.dev,
> +						dev, "fwmem-%d", atomic_read(&mem1394_dev_ctr));

My eyes!

> +	if (IS_ERR(mem1394_class_member)) {
> +		printk(KERN_WARNING "mem1394: class_device_create failed\n");
> +	} else {
> +		class_set_devdata(mem1394_class_member, result);
> +	}

Unneeded braces.

> +	if (IS_ERR(mem1394_sysfs_class)) {
> +		return PTR_ERR(mem1394_sysfs_class);
> +	}

Ditto.


  parent reply	other threads:[~2006-02-05  8:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02 22:27 [RFC 0/4] firewire: interface to remote memory (mem1394) Johannes Berg
2006-02-02 22:38 ` [RFC 1/4] firewire: node interface Johannes Berg
2006-02-02 22:40 ` [RFC 2/4] firewire: dynamic cdev allocation below firewire major Johannes Berg
2006-02-05 13:11   ` Stefan Richter
2006-02-13  3:51   ` Jody McIntyre
2006-02-13  7:32     ` Arjan van de Ven
2006-02-13 12:02       ` Johannes Berg
2006-02-13 16:49         ` Stefan Richter
2006-02-13 21:10         ` Arjan van de Ven
2006-02-14 15:41           ` Johannes Berg
2006-02-02 22:41 ` [RFC 3/4] firewire: unconditionally export hpsb_send_packet_and_wait Johannes Berg
2006-02-05 13:42   ` Stefan Richter
2006-02-07 10:45     ` Johannes Berg
2006-02-02 22:43 ` [RFC 4/4] firewire: add mem1394 Johannes Berg
2006-02-03 11:35   ` Andy Wingo
2006-02-03 11:47     ` Johannes Berg
2006-02-05 12:59       ` Stefan Richter
2006-02-05  8:43   ` Andrew Morton [this message]
2006-02-05  9:09     ` Kyle Moffett
     [not found]       ` <43E5D599.5040503@s5r6.in-berlin.de>
2006-02-05 20:09         ` Stefan Richter
2006-02-05 20:17     ` Andi Kleen
2006-02-05 20:50       ` Stefan Richter
2006-02-06  8:44         ` Andi Kleen
2006-02-05 14:19   ` Stefan Richter
2006-02-07 10:41     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060205004327.78926498.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®