Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  [BLOCK] s390 xpram typo
  [BLOCK] Only include the compat ioctl code if CONFIG_BLOCK is set
  [BLOCK] Better fix for do_blk_trace_setup() for !CONFIG_BLOCK
  [BLOCK] Move sector_div() from blkdev.h to kernel.h
  • Loading branch information
Linus Torvalds committed Oct 12, 2007
2 parents 000233e + b018fc0 commit 7e6973e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
4 changes: 4 additions & 0 deletions block/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ config BLK_DEV_BSG
protocols (e.g. Task Management Functions and SMP in Serial
Attached SCSI).

config BLOCK_COMPAT
bool
default y

endif # BLOCK

source block/Kconfig.iosched
2 changes: 1 addition & 1 deletion block/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o

obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o
obj-$(CONFIG_COMPAT) += compat_ioctl.o
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
14 changes: 0 additions & 14 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@

#include <asm/scatterlist.h>

#ifdef CONFIG_LBD
# include <asm/div64.h>
# define sector_div(a, b) do_div(a, b)
#else
# define sector_div(n, b)( \
{ \
int _res; \
_res = (n) % (b); \
(n) /= (b); \
_res; \
} \
)
#endif

struct scsi_ioctl_command;

struct request_queue;
Expand Down
7 changes: 1 addition & 6 deletions include/linux/blktrace_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
static inline int do_blk_trace_setup(struct request_queue *q,
struct block_device *bdev,
struct blk_user_trace_setup *buts)
{
return 0;
}
#define do_blk_trace_setup(q, bdev, buts) (-ENOTTY)
#endif /* CONFIG_BLK_DEV_IO_TRACE */
#endif /* __KERNEL__ */
#endif
14 changes: 14 additions & 0 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ extern const char linux_proc_banner[];
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))

#ifdef CONFIG_LBD
# include <asm/div64.h>
# define sector_div(a, b) do_div(a, b)
#else
# define sector_div(n, b)( \
{ \
int _res; \
_res = (n) % (b); \
(n) /= (b); \
_res; \
} \
)
#endif

/**
* upper_32_bits - return bits 32-63 of a number
* @n: the number we're accessing
Expand Down

0 comments on commit 7e6973e

Please sign in to comment.