X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fs390%2Fblock%2Fdcssblk.c;h=04787eab10168f20465725e8a0da0e36563addba;hb=cf816ecb533ab96b883dfdc0db174598b5b5c4d2;hp=3faf0538b328d8b029357c7aa15cd0d397e3a78e;hpb=a8e98d6d51a3eb7bb061b1625193a129c8bd094f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 3faf0538b32..04787eab101 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -142,57 +142,6 @@ dcssblk_get_device_by_name(char *name) return NULL; } -/* - * print appropriate error message for segment_load()/segment_type() - * return code - */ -static void -dcssblk_segment_warn(int rc, char* seg_name) -{ - switch (rc) { - case -ENOENT: - PRINT_WARN("cannot load/query segment %s, does not exist\n", - seg_name); - break; - case -ENOSYS: - PRINT_WARN("cannot load/query segment %s, not running on VM\n", - seg_name); - break; - case -EIO: - PRINT_WARN("cannot load/query segment %s, hardware error\n", - seg_name); - break; - case -ENOTSUPP: - PRINT_WARN("cannot load/query segment %s, is a multi-part " - "segment\n", seg_name); - break; - case -ENOSPC: - PRINT_WARN("cannot load/query segment %s, overlaps with " - "storage\n", seg_name); - break; - case -EBUSY: - PRINT_WARN("cannot load/query segment %s, overlaps with " - "already loaded dcss\n", seg_name); - break; - case -EPERM: - PRINT_WARN("cannot load/query segment %s, already loaded in " - "incompatible mode\n", seg_name); - break; - case -ENOMEM: - PRINT_WARN("cannot load/query segment %s, out of memory\n", - seg_name); - break; - case -ERANGE: - PRINT_WARN("cannot load/query segment %s, exceeds kernel " - "mapping range\n", seg_name); - break; - default: - PRINT_WARN("cannot load/query segment %s, return value %i\n", - seg_name, rc); - break; - } -} - static void dcssblk_unregister_callback(struct device *dev) { device_unregister(dev); @@ -423,7 +372,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char rc = segment_load(local_buf, SEGMENT_SHARED, &dev_info->start, &dev_info->end); if (rc < 0) { - dcssblk_segment_warn(rc, dev_info->segment_name); + segment_warning(rc, dev_info->segment_name); goto dealloc_gendisk; } seg_byte_size = (dev_info->end - dev_info->start + 1); @@ -666,7 +615,7 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio) page_addr = (unsigned long) page_address(bvec->bv_page) + bvec->bv_offset; source_addr = dev_info->start + (index<<12) + bytes_done; - if (unlikely(page_addr & 4095) != 0 || (bvec->bv_len & 4095) != 0) + if (unlikely((page_addr & 4095) != 0) || (bvec->bv_len & 4095) != 0) // More paranoia. goto fail; if (bio_data_dir(bio) == READ) {