summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_iblock.c
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2011-11-24 02:05:51 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2011-12-14 11:28:07 +0000
commit8359cf43b9dccddeebb0d247146719a14ce6371a (patch)
tree25421cb0e06d878709a826edf8d724ca102ab441 /drivers/target/target_core_iblock.c
parentfeae85644f1460b3373ef5141183ee43e6191b58 (diff)
downloadlinux-8359cf43b9dccddeebb0d247146719a14ce6371a.tar.gz
linux-8359cf43b9dccddeebb0d247146719a14ce6371a.tar.xz
linux-8359cf43b9dccddeebb0d247146719a14ce6371a.zip
target: remove useless casts
A reader should spend an extra moment whenever noticing a cast, because either something special is going on that deserves extra attention or, as is all too often the case, the code is wrong. These casts, afaics, have all been useless. They cast a foo* to a foo*, cast a void* to the assigned type, cast a foo* to void*, before assigning it to a void* variable, etc. In a few cases I also removed an additional &...[0], which is equally useless. Lastly I added three FIXMEs where, to the best of my judgement, the code appears to have a bug. It would be good if someone could check these. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r--drivers/target/target_core_iblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 3c1a7aa658a2..cc8e6b58ef20 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -464,7 +464,7 @@ static ssize_t iblock_show_configfs_dev_params(
if (bd) {
bl += sprintf(b + bl, "Major: %d Minor: %d %s\n",
MAJOR(bd->bd_dev), MINOR(bd->bd_dev), (!bd->bd_contains) ?
- "" : (bd->bd_holder == (struct iblock_dev *)ibd) ?
+ "" : (bd->bd_holder == ibd) ?
"CLAIMED: IBLOCK" : "CLAIMED: OS");
} else {
bl += sprintf(b + bl, "Major: 0 Minor: 0\n");