[lkml]   [2004]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2.6] clean-up: fixes "shadows global", "unused parameter" warnings
    On Mon, 6 Dec 2004, Riina Kikas wrote:

    > This patch fixes warnings "declaration of `prefetch' shadows a global
    > declaration"
    > (occuring on line 141) and "unused parameter `addr'" (occuring on line 136)
    > Signed-off-by: Riina Kikas <>
    > --- a/arch/i386/mm/fault.c 2004-12-02 21:30:30.000000000 +0000
    > +++ b/arch/i386/mm/fault.c 2004-12-02 21:30:59.000000000 +0000
    > @@ -133,12 +133,12 @@
    > * Sometimes AMD Athlon/Opteron CPUs report invalid exceptions on prefetch.
    > * Check that here and ignore it.
    > */
    > -static int __is_prefetch(struct pt_regs *regs, unsigned long addr)
    > +static int __is_prefetch(struct pt_regs *regs)

    If you make that change, at least also change the caller of __is_prefetch
    As the patch stands it will break the build of fault.c - I suspect you
    didn't compile test it.??

    Also, addr gets passed in to is_prefetch() from several different
    locations before it gets passed on to __is_prefetch() - are you sure it's
    correct to just remove the function argument - can you prove that it does
    no harm? could it be that the correct fix would be to actually use it for
    something instead? I don't know the code enough to be able to answer
    that, but I think it's a good question that needs to be answered.

    What kernel source is this against? it doesn't seem to apply to my
    2.6.10-rc3-bk2 tree here.

    Jesper Juhl

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:08    [W:0.020 / U:45.780 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site