From: Adrian Bunk <bunk@fs.tum.de>
To: Andrew Morton <akpm@osdl.org>,
Luca Risolia <luca.risolia@studio.unibo.it>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com,
linux-usb-devel@lists.sourceforge.net
Subject: [patch] 2.6.8-rc1-mm1: USB w9968cf compile error
Date: Wed, 14 Jul 2004 20:49:53 +0200 [thread overview]
Message-ID: <20040714184953.GI7308@fs.tum.de> (raw)
In-Reply-To: <20040713182559.7534e46d.akpm@osdl.org>
On Tue, Jul 13, 2004 at 06:25:59PM -0700, Andrew Morton wrote:
>...
> All 252 patches:
>...
> bk-usb.patch
>...
This patch marks w9968cf_valid_depth as inline, although it's used
before it's defined.
gcc 3.4 therefore correctly fails with:
<-- snip -->
...
CC drivers/usb/media/w9968cf.o
drivers/usb/media/w9968cf.c: In function `w9968cf_set_picture':
drivers/usb/media/w9968cf.c:487: sorry, unimplemented: inlining failed
in call to 'w9968cf_valid_depth': function body not available
drivers/usb/media/w9968cf.c:1722: sorry, unimplemented: called from here
make[3]: *** [drivers/usb/media/w9968cf.o] Error 1
<-- snip -->
This patch moves w9968cf_valid_depth above it's first user (it also uses
two other functions to keep the ordering of functions a bit more
consistent).
diffstat output:
drivers/usb/media/w9968cf.c | 92 ++++++++++++++++++------------------
1 files changed, 46 insertions(+), 46 deletions(-)
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.8-rc1-mm1-full-3.4/drivers/usb/media/w9968cf.c.old 2004-07-14 20:31:39.000000000 +0200
+++ linux-2.6.8-rc1-mm1-full-3.4/drivers/usb/media/w9968cf.c 2004-07-14 20:42:52.000000000 +0200
@@ -481,11 +481,11 @@
static void w9968cf_adjust_configuration(struct w9968cf_device*);
static int w9968cf_turn_on_led(struct w9968cf_device*);
static int w9968cf_init_chip(struct w9968cf_device*);
-static int w9968cf_set_picture(struct w9968cf_device*, struct video_picture);
-static int w9968cf_set_window(struct w9968cf_device*, struct video_window);
static inline u16 w9968cf_valid_palette(u16 palette);
static inline u16 w9968cf_valid_depth(u16 palette);
static inline u8 w9968cf_need_decompression(u16 palette);
+static int w9968cf_set_picture(struct w9968cf_device*, struct video_picture);
+static int w9968cf_set_window(struct w9968cf_device*, struct video_window);
static int w9968cf_postprocess_frame(struct w9968cf_device*,
struct w9968cf_frame_t*);
static int w9968cf_adjust_window_size(struct w9968cf_device*, u16* w, u16* h);
@@ -1709,6 +1709,50 @@
/*--------------------------------------------------------------------------
+ Return non-zero if the palette is supported, 0 otherwise.
+ --------------------------------------------------------------------------*/
+static inline u16 w9968cf_valid_palette(u16 palette)
+{
+ u8 i = 0;
+ while (w9968cf_formatlist[i].palette != 0) {
+ if (palette == w9968cf_formatlist[i].palette)
+ return palette;
+ i++;
+ }
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
+ Return the depth corresponding to the given palette.
+ Palette _must_ be supported !
+ --------------------------------------------------------------------------*/
+static inline u16 w9968cf_valid_depth(u16 palette)
+{
+ u8 i=0;
+ while (w9968cf_formatlist[i].palette != palette)
+ i++;
+
+ return w9968cf_formatlist[i].depth;
+}
+
+
+/*--------------------------------------------------------------------------
+ Return non-zero if the format requires decompression, 0 otherwise.
+ --------------------------------------------------------------------------*/
+static inline u8 w9968cf_need_decompression(u16 palette)
+{
+ u8 i = 0;
+ while (w9968cf_formatlist[i].palette != 0) {
+ if (palette == w9968cf_formatlist[i].palette)
+ return w9968cf_formatlist[i].compression;
+ i++;
+ }
+ return 0;
+}
+
+
+/*--------------------------------------------------------------------------
Change the picture settings of the camera.
Return 0 on success, a negative number otherwise.
--------------------------------------------------------------------------*/
@@ -1966,50 +2010,6 @@
}
-/*--------------------------------------------------------------------------
- Return non-zero if the palette is supported, 0 otherwise.
- --------------------------------------------------------------------------*/
-static inline u16 w9968cf_valid_palette(u16 palette)
-{
- u8 i = 0;
- while (w9968cf_formatlist[i].palette != 0) {
- if (palette == w9968cf_formatlist[i].palette)
- return palette;
- i++;
- }
- return 0;
-}
-
-
-/*--------------------------------------------------------------------------
- Return the depth corresponding to the given palette.
- Palette _must_ be supported !
- --------------------------------------------------------------------------*/
-static inline u16 w9968cf_valid_depth(u16 palette)
-{
- u8 i=0;
- while (w9968cf_formatlist[i].palette != palette)
- i++;
-
- return w9968cf_formatlist[i].depth;
-}
-
-
-/*--------------------------------------------------------------------------
- Return non-zero if the format requires decompression, 0 otherwise.
- --------------------------------------------------------------------------*/
-static inline u8 w9968cf_need_decompression(u16 palette)
-{
- u8 i = 0;
- while (w9968cf_formatlist[i].palette != 0) {
- if (palette == w9968cf_formatlist[i].palette)
- return w9968cf_formatlist[i].compression;
- i++;
- }
- return 0;
-}
-
-
/*--------------------------------------------------------------------------
Adjust the asked values for window width and height.
Return 0 on success, -1 otherwise.
next prev parent reply other threads:[~2004-07-14 18:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-14 1:25 2.6.8-rc1-mm1 Andrew Morton
2004-07-14 7:29 ` 2.6.8-rc1-mm1 Andrew Morton
2004-07-14 8:11 ` 2.6.8-rc1-mm1 David Howells
2004-07-14 16:36 ` 2.6.8-rc1-mm1 John Cherry
2004-07-14 18:49 ` Adrian Bunk [this message]
2004-07-14 19:03 ` [patch] 2.6.8-rc1-mm1: USB w9968cf compile error Greg KH
2004-07-14 19:08 ` Adrian Bunk
2004-07-14 20:29 ` 2.6.8-rc1-mm1 Dominik Karall
2004-07-14 20:43 ` [patch] 2.6.8-rc1-mm1: 8139too: uninline rtl8139_start_thread Adrian Bunk
2004-07-14 20:45 ` Jeff Garzik
2004-07-27 18:00 ` Jeff Garzik
2004-07-14 21:08 ` 2.6.8-rc1-mm1 Dominik Karall
2004-07-14 21:53 ` 2.6.8-rc1-mm1 Tim Bird
2004-07-15 10:35 ` 2.6.8-rc1-mm1 Ralf Hildebrandt
2004-07-18 3:53 ` [patch] 2.6.8-rc1-mm1: work around broken USB DocBook generation Adrian Bunk
2004-07-20 0:02 ` 2.6.8-rc1-mm1 J.A. Magallon
2004-07-22 12:56 ` 2.6.8-rc1-mm1 Jens Axboe
2004-07-20 0:05 ` 2.6.8-rc1-mm1 J.A. Magallon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040714184953.GI7308@fs.tum.de \
--to=bunk@fs.tum.de \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=luca.risolia@studio.unibo.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox