mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
9efeccacd3
__bitwise__ used to mean "yes, please enable sparse checks unconditionally", but now that we dropped __CHECK_ENDIAN__ __bitwise is exactly the same. There aren't many users, replace it by __bitwise everywhere. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Stefan Schmidt <stefan@osg.samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Akced-by: Lee Duncan <lduncan@suse.com>
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
/*
|
|
* Copyright (C) 2012 Red Hat, Inc.
|
|
*
|
|
* This file is released under the GPL.
|
|
*/
|
|
|
|
#ifndef DM_CACHE_BLOCK_TYPES_H
|
|
#define DM_CACHE_BLOCK_TYPES_H
|
|
|
|
#include "persistent-data/dm-block-manager.h"
|
|
|
|
/*----------------------------------------------------------------*/
|
|
|
|
/*
|
|
* It's helpful to get sparse to differentiate between indexes into the
|
|
* origin device, indexes into the cache device, and indexes into the
|
|
* discard bitset.
|
|
*/
|
|
|
|
typedef dm_block_t __bitwise dm_oblock_t;
|
|
typedef uint32_t __bitwise dm_cblock_t;
|
|
typedef dm_block_t __bitwise dm_dblock_t;
|
|
|
|
static inline dm_oblock_t to_oblock(dm_block_t b)
|
|
{
|
|
return (__force dm_oblock_t) b;
|
|
}
|
|
|
|
static inline dm_block_t from_oblock(dm_oblock_t b)
|
|
{
|
|
return (__force dm_block_t) b;
|
|
}
|
|
|
|
static inline dm_cblock_t to_cblock(uint32_t b)
|
|
{
|
|
return (__force dm_cblock_t) b;
|
|
}
|
|
|
|
static inline uint32_t from_cblock(dm_cblock_t b)
|
|
{
|
|
return (__force uint32_t) b;
|
|
}
|
|
|
|
static inline dm_dblock_t to_dblock(dm_block_t b)
|
|
{
|
|
return (__force dm_dblock_t) b;
|
|
}
|
|
|
|
static inline dm_block_t from_dblock(dm_dblock_t b)
|
|
{
|
|
return (__force dm_block_t) b;
|
|
}
|
|
|
|
#endif /* DM_CACHE_BLOCK_TYPES_H */
|