patch] inotify: use bitmap.h functions

From: Robert Love (rml_at_novell.com)
Date: 09/27/04

  • Next message: Russell King: "Re: [PATCH 2.6.8.1] drivers/char: New serial driver."
    To: Paul Jackson <pj@sgi.com>
    Date:	Mon, 27 Sep 2004 16:22:15 -0400
    
    
    

    On Mon, 2004-09-27 at 12:48 -0700, Paul Jackson wrote:

    > > unsigned long bitmask[MAX_INOTIFY_DEV_WATCHERS/BITS_PER_LONG];
    >
    > This assumes that MAX_INOTIFY_DEV_WATCHERS is an integral multiple
    > of BITS_PER_LONG, otherwise, the last word will be missing.

    Yah. Since we defined MAX_INOTIFY_DEV_WATCHERS, I presumed to be able
    to ensure it was a multiple (e.g. just keep it a power of two) ...

    > Perhaps this would this better be written as:
    >
    > DECLARE_BITMAP(bitmask, MAX_INOTIFY_DEV_WATCHERS);

    ... but this is indeed cleaner.

    > and the clearing of it in the original patch:
    >
    > > + memset(dev->bitmask, 0,
    > > + sizeof(unsigned long) * MAX_INOTIFY_DEV_WATCHERS / BITS_PER_LONG);
    >
    > might better be written as:
    >
    > CLEAR_BITMAP(dev->bitmask, MAX_INOTIFY_DEV_WATCHERS);

    I think you mean bitmap_zero(), but yah. Agreed.

    John, here is a patch to use the bitmap.h functions to manipulate the
    bitmap.

            Robert Love

    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Russell King: "Re: [PATCH 2.6.8.1] drivers/char: New serial driver."

    Relevant Pages

    • Re: NUMA aware slab allocator V2
      ... > configuration but multiple ... > initialize a nonexistand second cpu by the NMI handler that I described ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: [PATCH] mask ADT: replace cpumask_t implementation [3/22]
      ... On Thu, 2004-04-01 at 07:22, Paul Jackson wrote: ... > Better a couple of inline instructions than a possible uncached ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: [PATCH] fix sys cpumap for > 352 NR_CPUS
      ... Paul Jackson wrote: ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [PATCH] nodemask_t x86_64 changes [5/7]
      ... Paul Jackson wrote: ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: /proc reliability & performance
      ... multiple reads due to scripts, top, or multiple ... reliability. ... your directory offset. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)