From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756708AbYEWPZc (ORCPT ); Fri, 23 May 2008 11:25:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751792AbYEWPZY (ORCPT ); Fri, 23 May 2008 11:25:24 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:42087 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbYEWPZX (ORCPT ); Fri, 23 May 2008 11:25:23 -0400 Subject: Re: [PATCH 1/3] firmware: allow firmware files to be built into kernel image From: David Woodhouse To: Takashi Iwai Cc: linux-kernel@vger.kernel.org, aoliva@redhat.com, alan@lxorguk.ukuu.org.uk, Abhay Salunke , kay.sievers@vrfy.org, Haroldo Gamal In-Reply-To: References: <1211550282.28967.8.camel@pmac.infradead.org> <1211554711.28967.25.camel@pmac.infradead.org> Content-Type: text/plain Date: Fri, 23 May 2008 16:25:20 +0100 Message-Id: <1211556320.28967.35.camel@pmac.infradead.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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