Re: [PATCH] 2.6.9-rc3 fix warnings in sound/drivers/opl3/opl3_lib.c

From: Takashi Iwai (tiwai_at_suse.de)
Date: 09/30/04

  • Next message: Borislav Petkov: "Re: Fw: Re: 2.6.9-rc2-mm4"
    Date:	Thu, 30 Sep 2004 18:07:10 +0200
    To: viro@parcelfarce.linux.theplanet.co.uk
    
    

    At Thu, 30 Sep 2004 16:52:28 +0100,
    viro@parcelfarce.linux.theplanet.co.uk wrote:
    >
    > On Thu, Sep 30, 2004 at 04:25:44PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
    > > On Thu, Sep 30, 2004 at 02:28:53PM +0200, Borislav Petkov wrote:
    > > > Hi there,
    > > > I get these warnings while compiling 2.6.9-rc3:
    > > > sound/drivers/opl3/opl3_lib.c: In function `snd_opl3_cs4281_command':
    > > > sound/drivers/opl3/opl3_lib.c:101: warning: passing arg 2 of `writel' makes pointer from integer without a cast
    > > > sound/drivers/opl3/opl3_lib.c:104: warning: passing arg 2 of `writel' makes pointer from integer without a cast
    > > >
    > > > Hope this fix is correct.
    > >
    > > It looks very odd. At the very least we don't want to overload the
    > > fields in question (->r_port and ->l_port) that way.
    >
    > *Yuck*
    >
    > ALSA code, as pretty as ever. No, that's not a fix; it's only shutting the
    > rightfully complaining compiler up.
    >
    > What happens there is a dirty kludge created for the benefit of a single
    > driver (sound/pci/cs4281.c). Said driver has a bunch of registers
    > memory-mapped, while its relatives use port IO instead. Driver does
    > (correctly) ioremap(); then it overloads the arguments of snd_opl3_create()
    > normally used for port numbers and shoves *address obtained from ioremap
    > and divided by 4* in them.

    This ugly shift was already removed in the current version
    in linux-sound bk. The l_port and r_port point the iomem pointers now
    on cs4281 like others. I don't know why the author of cs4281
    implemented in such a way.

    BTW, all __iomem fixes are already there, too.

    > Sigh... At the very least that kind of abuse should stop. FWIW, I would
    > suggest having cs4281.c set the ->command() directly and killing that crap
    > with ->l_port/->r_port overloading.

    Yes, it'd be definitely better.
    Will work on it.

    Takashi
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Borislav Petkov: "Re: Fw: Re: 2.6.9-rc2-mm4"

    Relevant Pages

    • libata: dma, io error messages
      ... abnormal status 0xD0 on port 0xD081B087 ... Unrecovered read error - auto reallocate failed ... I/O error, dev sda, sector 33935366 ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: KLive: Linux Kernel Live Usage Monitor
      ... Some of us sit behind corporate firewalls and proxies that have ... The proxy settings could also be a .config thing. ... use port 25 because everybody has port 25 open ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: patch for sysfs in the cyclades driver
      ... If I can attach this data to the port, ... > will have to test it (I'm grateful for you, Scott). ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • More FTDI 232BM chip issues...
      ... Mar 24 23:46:42 displaytest kernel: usb 2-2: new full speed USB device ... Of course I have a test program running overnight and when the device ... Is there any particular reason the hub would disable that port? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: VM fixes [2/4]
      ... >> freeable memory which could have been satisfied with higher zones. ... > I already had to port to 2.6.5 too, and that's enough for now unless I ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)