[PATCH] dm: remove SECTOR_FORMAT
We don't know what type sector_t has. Sometimes it's unsigned long, sometimes it's unsigned long long. For example on ppc64 it's unsigned long with CONFIG_LBD=n and on x86_64 it's unsigned long long with CONFIG_LBD=n. The way to handle all of this is to always use unsigned long long and to always typecast the sector_t when printing it. Acked-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
930d332a23
commit
4ee218cd67
@@ -23,16 +23,6 @@
|
||||
#define DMEMIT(x...) sz += ((sz >= maxlen) ? \
|
||||
0 : scnprintf(result + sz, maxlen - sz, x))
|
||||
|
||||
/*
|
||||
* FIXME: I think this should be with the definition of sector_t
|
||||
* in types.h.
|
||||
*/
|
||||
#ifdef CONFIG_LBD
|
||||
#define SECTOR_FORMAT "%llu"
|
||||
#else
|
||||
#define SECTOR_FORMAT "%lu"
|
||||
#endif
|
||||
|
||||
#define SECTOR_SHIFT 9
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user