Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:hmzhao:branches:openSUSE:Factory
drbd
0027-drbd-fix-function-cast-warnings-in-state-m...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0027-drbd-fix-function-cast-warnings-in-state-machine.patch of Package drbd
From fa5329fb2c7e089cbe712acecb2c75ba8887754e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= <christoph.boehmwalder@linbit.com> Date: Fri, 6 Sep 2024 15:16:49 +0200 Subject: [PATCH 27/32] drbd: fix function cast warnings in state machine Equivalent to upstream commit fe0b1e9a ("drbd: fix function cast warnings in state machine"). --- drbd/drbd_state.c | 16 ++++++++++------ drbd/drbd_state_change.h | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c index 44f55ee5c939..100e32ba037f 100644 --- a/drbd/drbd_state.c +++ b/drbd/drbd_state.c @@ -3212,10 +3212,11 @@ static union drbd_state state_change_word(struct drbd_state_change *state_change int notify_resource_state_change(struct sk_buff *skb, unsigned int seq, - struct drbd_state_change *state_change, + void *state_change, enum drbd_notification_type type) { - struct drbd_resource_state_change *resource_state_change = state_change->resource; + struct drbd_resource_state_change *resource_state_change = + ((struct drbd_state_change *)state_change)->resource; struct drbd_resource *resource = resource_state_change->resource; struct resource_info resource_info = { .res_role = resource_state_change->role[NEW], @@ -3232,9 +3233,10 @@ int notify_resource_state_change(struct sk_buff *skb, int notify_connection_state_change(struct sk_buff *skb, unsigned int seq, - struct drbd_connection_state_change *connection_state_change, + void *state_change, enum drbd_notification_type type) { + struct drbd_connection_state_change *connection_state_change = state_change; struct drbd_connection *connection = connection_state_change->connection; struct connection_info connection_info = { .conn_connection_state = connection_state_change->cstate[NEW], @@ -3246,9 +3248,10 @@ int notify_connection_state_change(struct sk_buff *skb, int notify_device_state_change(struct sk_buff *skb, unsigned int seq, - struct drbd_device_state_change *device_state_change, + void *state_change, enum drbd_notification_type type) { + struct drbd_device_state_change *device_state_change = state_change; struct drbd_device *device = device_state_change->device; struct device_info device_info; device_state_change_to_info(&device_info, device_state_change); @@ -3258,10 +3261,11 @@ int notify_device_state_change(struct sk_buff *skb, int notify_peer_device_state_change(struct sk_buff *skb, unsigned int seq, - struct drbd_peer_device_state_change *state_change, + void *state_change, enum drbd_notification_type type) { - struct drbd_peer_device *peer_device = state_change->peer_device; + struct drbd_peer_device_state_change *peer_device_state_change = state_change; + struct drbd_peer_device *peer_device = peer_device_state_change->peer_device; struct peer_device_info peer_device_info; peer_device_state_change_to_info(&peer_device_info, state_change); diff --git a/drbd/drbd_state_change.h b/drbd/drbd_state_change.h index 3dc8616dedd4..40687d40b222 100644 --- a/drbd/drbd_state_change.h +++ b/drbd/drbd_state_change.h @@ -69,19 +69,19 @@ extern void forget_state_change(struct drbd_state_change *); extern int notify_resource_state_change(struct sk_buff *, unsigned int, - struct drbd_state_change *, + void *, enum drbd_notification_type type); extern int notify_connection_state_change(struct sk_buff *, unsigned int, - struct drbd_connection_state_change *, + void *, enum drbd_notification_type type); extern int notify_device_state_change(struct sk_buff *, unsigned int, - struct drbd_device_state_change *, + void *, enum drbd_notification_type type); extern int notify_peer_device_state_change(struct sk_buff *, unsigned int, - struct drbd_peer_device_state_change *, + void *, enum drbd_notification_type type); #endif /* DRBD_STATE_CHANGE_H */ -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor