public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line
Date: Tue, 2 Jun 2009 10:57:37 +0200	[thread overview]
Message-ID: <20090602085736.GM4062@amd.com> (raw)
In-Reply-To: <20090601150813.84c932f4.akpm@linux-foundation.org>

On Mon, Jun 01, 2009 at 03:08:13PM -0700, Andrew Morton wrote:
> On Thu, 28 May 2009 17:19:30 +0200
> Joerg Roedel <joerg.roedel@amd.com> wrote:
> 
> > This patch add the dma_debug_driver= boot parameter to enable the driver
> > filter for early boot.
> > 
> 
> Please always update Documentation/kernel-parameters.txt when adding
> new boot options.
> 
> > +static int __init parse_dma_debug_driver(char *str)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < NAME_MAX_LEN - 1; ++i, ++str) {
> > +		current_driver_name[i] = *str;
> > +		if (*str == ' ' || *str == '\t' || isspace(*str) || *str == 0)
> 
> The comparisons with ' ' and '\t' are unneeded, surely?
> 
> > +			break;
> > +	}
> > +	current_driver_name[i] = 0;
> > +
> > +	if (current_driver_name[0])
> > +		printk(KERN_INFO "DMA-API: enable driver filter for "
> > +				 "driver [%s]\n", current_driver_name);
> > +
> > +
> > +	return 1;
> > +}
> > +__setup("dma_debug_driver=", parse_dma_debug_driver);
> 
> The whole thing seems a bit overdone - take a look at some other __setup
> functions, see what they're doing.  None of them bother looking for
> spaces in the input - higher level code took care of that.
> 
> It's conventional for the name of a __setup function to end in "_setup".

Ok, thanks. Will check again here.

Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


  reply	other threads:[~2009-06-02  8:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 15:19 [PATCH 0/4] dma-debug: driver filter Joerg Roedel
2009-05-28 15:19 ` [PATCH 1/4] dma-debug: add variables and checks for " Joerg Roedel
2009-06-01 21:55   ` Andrew Morton
2009-06-02  8:27     ` Joerg Roedel
2009-05-28 15:19 ` [PATCH 2/4] dma-debug: add debugfs file " Joerg Roedel
2009-06-01 22:04   ` Andrew Morton
2009-06-02  8:55     ` Joerg Roedel
2009-06-02 13:33     ` Joerg Roedel
2009-05-28 15:19 ` [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line Joerg Roedel
2009-06-01 22:08   ` Andrew Morton
2009-06-02  8:57     ` Joerg Roedel [this message]
2009-05-28 15:19 ` [PATCH 4/4] dma-debug: add documentation for the driver filter Joerg Roedel
  -- strict thread matches above, loose matches on Subject: below --
2009-06-02 14:36 [PATCH 0/4] dma-debug: driver filter v2 Joerg Roedel
2009-06-02 14:36 ` [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line Joerg Roedel

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=20090602085736.GM4062@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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