mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: Michael Abbott <michael@araneidae.co.uk>
Cc: Ben Dooks <ben-linux@fluff.org>,
	linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] DM9000: Reimplement 2-resource device specification (fwd)
Date: Thu, 24 Apr 2008 18:34:32 +0100	[thread overview]
Message-ID: <20080424173432.GE16284@fluff.org.uk> (raw)
In-Reply-To: <20080424125217.M52274@saturn.araneidae.co.uk>

On Thu, Apr 24, 2008 at 12:57:08PM +0000, Michael Abbott wrote:
> From: Michael Abbott <michael.abbott@diamond.ac.uk>
>
> [PATCH] DM9000: Reimplement 2-resource device specification
>
> In commit 1a5f1c4ff80f522555d78d4dd0109f18395c6d83 a change was made to
> the handling of the resources passed the DM9000 device.  Unfortunately,
> if only two resources are passed (the read and write register in the same
> area) the pointer db->irq_res ends up being used without being initialised.
>
> This patch tidies this up a little.  Only one architecture class,
> blackfin, uses two resource specification, so it may be better to enforce
> three resource specification as before by simply removing the 0 and 2
> resource branches from dm9000_probe.

I think then we should probably make the driver simpler and remove the
special case for the two resources... any small saving of using just
two resources is probably cancelled out by the extra code needed.

> +#define res_size(_r) (((_r)->end - (_r)->start) + 1)
> +

I'd like to see something like this as an inline function in the
relevant header, and some patches to get other users to find it.

> -
>  		if (pdata->outblk != NULL)
>  			db->outblk = pdata->outblk;
> -
>  		if (pdata->dumpblk != NULL)
>  			db->dumpblk = pdata->dumpblk;

I'd rather not see spacing changes done, especially as I don't like
to see lots of code cramped together. 

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2008-04-24 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24 12:57 Michael Abbott
2008-04-24 17:34 ` Ben Dooks [this message]
2008-04-25  9:39   ` Michael Abbott

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=20080424173432.GE16284@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=michael@araneidae.co.uk \
    /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®