Skip to contentSkip to conversation

ocfs2: o2hb: remove useless force cast

PATCH New Junxiao Bi 2 participants 2 messages Mar 2, 2016 OCFS2

lore
Share & tools
lore

Junxiao Bi

author
#0 lore raw

PATCH 1/1 ocfs2: o2hb: remove useless force cast

---
 fs/ocfs2/cluster/heartbeat.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/ocfs2/cluster/heartbeat.c +4 -4
index 8ec85cac894e..023c72d35498 100644
@@ -1315,19 +1315,19 @@ static int o2hb_debug_open(struct inode *inode, struct file *file)
 
 	case O2HB_DB_TYPE_REGION_LIVENODES:
 		spin_lock(&o2hb_live_lock);
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		memcpy(map, reg->hr_live_node_bitmap, db->db_size);
 		spin_unlock(&o2hb_live_lock);
 		break;
 
 	case O2HB_DB_TYPE_REGION_NUMBER:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		out += snprintf(buf + out, PAGE_SIZE - out, "%d\n",
 				reg->hr_region_num);
 		goto done;
 
 	case O2HB_DB_TYPE_REGION_ELAPSED_TIME:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		lts = reg->hr_last_timeout_start;
 		/* If 0, it has never been set before */
 		if (lts)
@@ -1336,7 +1336,7 @@ static int o2hb_debug_open(struct inode *inode, struct file *file)
 		goto done;
 
 	case O2HB_DB_TYPE_REGION_PINNED:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		out += snprintf(buf + out, PAGE_SIZE - out, "%u\n",
 				!!reg->hr_item_pinned);
 		goto done;
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ocfs2: o2hb: remove useless force cast

Quoted 1 line · Junxiao Bi

Looks good, thanks.

Quoted 41 lines
---
 fs/ocfs2/cluster/heartbeat.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/ocfs2/cluster/heartbeat.c +4 -4
index 8ec85cac894e..023c72d35498 100644
@@ -1315,19 +1315,19 @@ static int o2hb_debug_open(struct inode *inode, struct file *file)
 
 	case O2HB_DB_TYPE_REGION_LIVENODES:
 		spin_lock(&o2hb_live_lock);
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		memcpy(map, reg->hr_live_node_bitmap, db->db_size);
 		spin_unlock(&o2hb_live_lock);
 		break;
 
 	case O2HB_DB_TYPE_REGION_NUMBER:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		out += snprintf(buf + out, PAGE_SIZE - out, "%d\n",
 				reg->hr_region_num);
 		goto done;
 
 	case O2HB_DB_TYPE_REGION_ELAPSED_TIME:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		lts = reg->hr_last_timeout_start;
 		/* If 0, it has never been set before */
 		if (lts)
@@ -1336,7 +1336,7 @@ static int o2hb_debug_open(struct inode *inode, struct file *file)
 		goto done;
 
 	case O2HB_DB_TYPE_REGION_PINNED:
-		reg = (struct o2hb_region *)db->db_data;
+		reg = db->db_data;
 		out += snprintf(buf + out, PAGE_SIZE - out, "%u\n",
 				!!reg->hr_item_pinned);
 		goto done;