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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090602085736.GM4062@amd.com>
Date:	Tue, 2 Jun 2009 10:57:37 +0200
From:	Joerg Roedel <joerg.roedel@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] dma-debug: add dma_debug_driver kernel command line

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@....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

--
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