Skip to content

Commit

Permalink
xen/blkback: Fix checkpatch warnings in vbd.c
Browse files Browse the repository at this point in the history
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent 5489377 commit 3c64b58
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/xen/blkback/vbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@

#include "common.h"

#define vbd_sz(_v) ((_v)->bdev->bd_part ? \
(_v)->bdev->bd_part->nr_sects : get_capacity((_v)->bdev->bd_disk))
#define vbd_sz(_v) ((_v)->bdev->bd_part ? \
(_v)->bdev->bd_part->nr_sects : \
get_capacity((_v)->bdev->bd_disk))

unsigned long long vbd_size(struct vbd *vbd)
{
Expand All @@ -40,7 +41,7 @@ unsigned long long vbd_size(struct vbd *vbd)

unsigned int vbd_info(struct vbd *vbd)
{
return vbd->type | (vbd->readonly?VDISK_READONLY:0);
return vbd->type | (vbd->readonly ? VDISK_READONLY : 0);
}

unsigned long vbd_secsize(struct vbd *vbd)
Expand Down Expand Up @@ -126,15 +127,15 @@ void vbd_resize(struct blkif_st *blkif)

printk(KERN_INFO "VBD Resize: Domid: %d, Device: (%d, %d)\n",
blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice));
printk(KERN_INFO "VBD Resize: new size %Lu\n", new_size);
printk(KERN_INFO "VBD Resize: new size %llu\n", new_size);
vbd->size = new_size;
again:
err = xenbus_transaction_start(&xbt);
if (err) {
printk(KERN_WARNING "Error starting transaction");
return;
}
err = xenbus_printf(xbt, dev->nodename, "sectors", "%Lu",
err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
vbd_size(vbd));
if (err) {
printk(KERN_WARNING "Error writing new size");
Expand Down

0 comments on commit 3c64b58

Please sign in to comment.