error: implicit declaration of function 'msleep' (was: Re: [media]radio-aimslab.c: Fix gcc 4.5+ bug)

From: Geert Uytterhoeven
Date: Mon Jan 10 2011 - 14:48:55 EST


On Fri, Jan 7, 2011 at 04:02, Linux Kernel Mailing List
<linux-kernel@xxxxxxxxxxxxxxx> wrote:
> Gitweb: Â Â http://git.kernel.org/linus/e3c92215198cb6aa00ad38db2780faa6b72e0a3f
> Commit: Â Â e3c92215198cb6aa00ad38db2780faa6b72e0a3f
> Parent: Â Â a7862aa90ffd1113bc2898ae6be2e4861b1f76cc
> Author: Â Â Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> AuthorDate: Thu Jan 6 08:16:04 2011 -0200
> Committer: ÂMauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> CommitDate: Thu Jan 6 08:26:02 2011 -0200
>
> Â Â[media] radio-aimslab.c: Fix gcc 4.5+ bug
>
> Â Âgcc 4.5+ doesn't properly evaluate some inlined expressions.
> Â ÂA previous patch were proposed by Andrew Morton using noinline.
> Â ÂHowever, the entire inlined function is bogus, so let's just
> Â Âremove it and be happy.
>
> Â ÂReported-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Â ÂCc: stable@xxxxxxxxxx
> Â ÂSigned-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> ---
> Âdrivers/media/radio/radio-aimslab.c | Â 23 ++++++-----------------
> Â1 files changed, 6 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
> index 05e832f..6cc5d13 100644
> --- a/drivers/media/radio/radio-aimslab.c
> +++ b/drivers/media/radio/radio-aimslab.c
> @@ -31,7 +31,6 @@
> Â#include <linux/module.h>   Â/* Modules           Â*/
> Â#include <linux/init.h>        Â/* Initdata           */
> Â#include <linux/ioport.h>   Â/* request_region        */
> -#include <linux/delay.h>    /* udelay            */

Woops...

> Âstatic void rt_decvol(struct rtrack *rt)
> Â{
>    Âoutb(0x58, rt->io);       /* volume down + sigstr + on  Â*/
> - Â Â Â sleep_delay(100000);
> + Â Â Â msleep(100);

... still needed due to msleep(), cfr.
http://kisskb.ellerman.id.au/kisskb/buildresult/3776074/:

| drivers/media/radio/radio-aimslab.c:76: error: implicit declaration
of function 'msleep'

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/