firmware: arm_scmi: remove unnecessary bitmap_zero
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 9 May 2018 16:52:06 +0000 (17:52 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Thu, 10 May 2018 09:51:58 +0000 (10:51 +0100)
kcalloc zeros the memory and it's totally unnecessary to zero the bitmap
again using bitmap_zero. This patch just drops the unnecessary use of
the bitmap_zero in the context.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c

index 33d2b78af3ff6f2a65f1f9cd96e14e928ce66cec..4087d6c50ecd8b95e16c8988d326499bf9ff7262 100644 (file)
@@ -636,8 +636,6 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo)
        if (!info->xfer_alloc_table)
                return -ENOMEM;
 
-       bitmap_zero(info->xfer_alloc_table, desc->max_msg);
-
        /* Pre-initialize the buffer pointer to pre-allocated buffers */
        for (i = 0, xfer = info->xfer_block; i < desc->max_msg; i++, xfer++) {
                xfer->rx.buf = devm_kcalloc(dev, sizeof(u8), desc->max_msg_size,