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: <s5hodmyju1w.wl%tiwai@suse.de>
Date:	Mon, 12 Mar 2007 17:38:51 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Ralf Baechle <ralf@...ux-mips.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, perex@...e.cz,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [SOUND] hda_intel: build fix

At Mon, 12 Mar 2007 15:46:47 +0000,
Ralf Baechle wrote:
> 
> On Mon, Mar 12, 2007 at 03:43:10PM +0100, Takashi Iwai wrote:
> 
> > Fair enough.  I agree that removing const is the only reasonable fix
> > right now.   But from semantics, const is a good thing, and people may
> > try to add it again later if we get rid of them now.  So, how about to
> > comment out such as /*const*/ in each place to remind that it's
> > intentional?
> 
> I consider that harder to read and uglier.  If anything maybe something
> like:
> 
> #define __const_devinit
> [...]
> static __const_devinit struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_status __devinitdata =
> 
> Worth it?  I doubt.

Well that's really a taste of matter...

> > Also, in your patch to ice1712, you don't have to remove const from the
> > codes in snd_ice1712_read_eeprom() and snd_ice1712_probe() functions.
> > They should work as const pointer.
> 
> No, that results in warnings:
> 
>   CC      sound/pci/ice1712/ice1712.o
> sound/pci/ice1712/ice1712.c: In function ‘snd_ice1712_read_eeprom’:
> sound/pci/ice1712/ice1712.c:2354: warning: assignment from incompatible pointer type
> sound/pci/ice1712/ice1712.c: In function ‘snd_ice1712_probe’:
> sound/pci/ice1712/ice1712.c:2693: warning: assignment from incompatible pointer type

Ah, that's a nasty part of C const.  It should be like
	const struct snd_ice1712_card_info *c;
but for pointer-of-pointer, something like
	struct snd_ice1712_card_info * const *tbl;
...?


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