From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262775AbUDAIkf (ORCPT ); Thu, 1 Apr 2004 03:40:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262788AbUDAIke (ORCPT ); Thu, 1 Apr 2004 03:40:34 -0500 Received: from ns.suse.de ([195.135.220.2]:17567 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S262775AbUDAIkW (ORCPT ); Thu, 1 Apr 2004 03:40:22 -0500 Date: Thu, 01 Apr 2004 10:37:55 +0200 Message-ID: From: Takashi Iwai To: Pavel Machek Cc: perex@suse.cz, Tjeerd.Mulder@fujitsu-siemens.com, kernel list Subject: Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...] In-Reply-To: <20040401082905.GE224@elf.ucw.cz> References: <20040331145206.GA384@elf.ucw.cz> <20040401080954.GA464@elf.ucw.cz> <20040401082905.GE224@elf.ucw.cz> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 1 Apr 2004 10:29:05 +0200, Pavel Machek wrote: > > Hi! > > > > via82xx command line parsing code is *evil*. It has completely > > > different parameters as a module / in kernel, and in-kernel parameters > > > shift according to the joystick support! (which is config_time option). Ouch. > > > > yep, i know it - it annoys me too... > > > > > Is there some easy way to convert MODULE_PARM with an array to some > > > more modern interface? > > > > there is a patch pending in my tree to allow empty boot options, such > > as > > snd-via82xx=,,,,,2 > > but it doesn't improve so much. > > > > perhaps the better way would be like > > > > snd-via82xx=enable:1,ac97_quirk:4 > > > > ?? > > > > in this way, it's hard to keep the compatibility with old boot > > parameters, but i don't think no one will complain if they see it > > nicer. > > Its so broken that we do not want compatibility, I believe. Having to > use snd-via82xx=,,,,,2 normally, but add one "," if joystick is > configured in is evil. > > snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax > already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with > new param handling code. oh that's good to know. > I'm just not sure how it is supposed to work > with arrays: > > static char *psmouse_proto; > static unsigned int psmouse_max_proto = -1U; > module_param_named(proto, psmouse_proto, charp, 0); > MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, > imps, exps). Useful for KVM switches."); > > ...automatically produces "proto" param for module and "psmouse.proto" > param for kernel. > > Something similar should be the way to go. ok, i'll take a look at it. thanks! Takashi