[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211556320.28967.35.camel@pmac.infradead.org>
Date: Fri, 23 May 2008 16:25:20 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Takashi Iwai <tiwai@...e.de>
Cc: linux-kernel@...r.kernel.org, aoliva@...hat.com,
alan@...rguk.ukuu.org.uk, Abhay Salunke <Abhay_Salunke@...l.com>,
kay.sievers@...y.org, Haroldo Gamal <gamal@...ernex.com.br>
Subject: Re: [PATCH 1/3] firmware: allow firmware files to be built
into kernel image
On Fri, 2008-05-23 at 17:19 +0200, Takashi Iwai wrote:
> Hm, but request_firmware() returns the const pointer. It implies that
> the caller shouldn't change the content, doesn't it?
>
> I cannot guarantee that there must be no misbehaving drivers,
> though...
The 'struct firmware' is const. It contains a pointer to data.
That data is not const.
fw->data = some_other_data; // bad.
fw->data[0] = 0; // ok.
Of course, we could _make_ it const (if we can remember whether it's
'const u8 *' or 'u8 const *'...)
--
dwmw2
--
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