Skip to content

Commit

Permalink
ipmi_si: remove ipmi_smi_alloc() function
Browse files Browse the repository at this point in the history
It's only used in one place now, so it's overkill.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
Corey Minyard committed Sep 28, 2017
1 parent 58e2763 commit 67f4fb0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,15 +1302,6 @@ int ipmi_std_irq_setup(struct si_sm_io *io)
return rv;
}

static struct smi_info *smi_info_alloc(void)
{
struct smi_info *info = kzalloc(sizeof(*info), GFP_KERNEL);

if (info)
spin_lock_init(&info->si_lock);
return info;
}

static int wait_for_msg_done(struct smi_info *smi_info)
{
enum si_sm_result smi_result;
Expand Down Expand Up @@ -1902,9 +1893,10 @@ int ipmi_si_add_smi(struct si_sm_io *io)
}
}

new_smi = smi_info_alloc();
new_smi = kzalloc(sizeof(*new_smi), GFP_KERNEL);
if (!new_smi)
return -ENOMEM;
spin_lock_init(&new_smi->si_lock);

new_smi->io = *io;

Expand Down

0 comments on commit 67f4fb0

Please sign in to comment.