[Patch 2/10] dm: Lift to_bytes() and to_sectors() into dm.h

From: Joe Thornber (thornber_at_redhat.com)
Date: 02/10/04

  • Next message: John Cherry: "Re: Linux 2.6.3-rc2 (compile stats)"
    Date:	Tue, 10 Feb 2004 16:59:02 +0000
    To: Joe Thornber <thornber@redhat.com>
    
    

    Lift to_bytes() and to_sectors() into dm.h
    --- diff/drivers/md/dm.c 2004-01-19 10:22:56.000000000 +0000
    +++ source/drivers/md/dm.c 2004-02-10 16:11:24.000000000 +0000
    @@ -233,15 +233,6 @@
      * interests of getting something for people to use I give
      * you this clearly demarcated crap.
      *---------------------------------------------------------------*/
    -static inline sector_t to_sector(unsigned int bytes)
    -{
    - return bytes >> SECTOR_SHIFT;
    -}
    -
    -static inline unsigned int to_bytes(sector_t sector)
    -{
    - return sector << SECTOR_SHIFT;
    -}
     
     /*
      * Decrements the number of outstanding ios that a bio has been
    --- diff/drivers/md/dm.h 2004-02-10 16:11:17.000000000 +0000
    +++ source/drivers/md/dm.h 2004-02-10 16:11:24.000000000 +0000
    @@ -151,6 +151,16 @@
             return dm_round_up(n, size) / size;
     }
     
    +static inline sector_t to_sector(unsigned long n)
    +{
    + return (n >> 9);
    +}
    +
    +static inline unsigned long to_bytes(sector_t n)
    +{
    + return (n << 9);
    +}
    +
     /*
      * The device-mapper can be driven through one of two interfaces;
      * ioctl or filesystem, depending which patch you have applied.
    -
    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: John Cherry: "Re: Linux 2.6.3-rc2 (compile stats)"

    Relevant Pages

    • Re: powernow-k8-acpi driver
      ... -static inline u32 freq_from_fid(u8 fid) ... static inline u32 kfreq_from_fid ... -static inline int check_supported_cpu ...
      (Linux-Kernel)
    • [git pull] generic bitops
      ... this started out as improvements/generalizations to x86 bitops, ... * @addr: The address to base the search on ... -static inline long ... +static inline unsigned long __fls ...
      (Linux-Kernel)
    • [git pull] generic bitops, take 2
      ... * @addr: The address to base the search on ... -static inline long ... +static inline unsigned long __fls ... static inline int fls64 ...
      (Linux-Kernel)
    • [git pull] generic bitops, take 3
      ... UML seems unaffected and properly picks up these symbols from the x86 ... * @addr: The address to base the search on ... -static inline long ... +static inline unsigned long __fls ...
      (Linux-Kernel)
    • [2.6 patch] cris: "extern inline" -> "static inline"
      ... "extern inline" doesn't make much sense. ... -extern inline void ... +static inline void ... -extern inline unsigned int ...
      (Linux-Kernel)