Skip to content

Commit

Permalink
powerpc/powernv: Use struct opal_prd_msg in more places
Browse files Browse the repository at this point in the history
Use the newly added struct opal_prd_msg in some other functions that
operate on opal_prd messages, rather than using other types.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230821142820.497107-2-mpe@ellerman.id.au
  • Loading branch information
mpe committed Aug 24, 2023
1 parent feea65a commit 22b1656
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/platforms/powernv/opal-prd.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ static ssize_t opal_prd_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct opal_prd_msg_header hdr;
struct opal_prd_msg *msg;
ssize_t size;
void *msg;
int rc;

size = sizeof(hdr);
Expand Down Expand Up @@ -254,12 +254,12 @@ static ssize_t opal_prd_write(struct file *file, const char __user *buf,

static int opal_prd_release(struct inode *inode, struct file *file)
{
struct opal_prd_msg_header msg;
struct opal_prd_msg msg;

msg.size = cpu_to_be16(sizeof(msg));
msg.type = OPAL_PRD_MSG_TYPE_FINI;
msg.header.size = cpu_to_be16(sizeof(msg));
msg.header.type = OPAL_PRD_MSG_TYPE_FINI;

opal_prd_msg((struct opal_prd_msg *)&msg);
opal_prd_msg(&msg);

atomic_xchg(&prd_usage, 0);

Expand Down

0 comments on commit 22b1656

Please sign in to comment.