Loading drivers/rpmsg/qcom_glink_spi.c +5 −3 Original line number Diff line number Diff line Loading @@ -561,7 +561,7 @@ static void glink_spi_rx_advance(struct glink_spi *glink, size_t count) tail = pipe->local_addr; tail += count; if (tail > pipe->fifo_base + pipe->length) if (tail >= pipe->fifo_base + pipe->length) tail -= pipe->length; pipe->local_addr = tail; Loading Loading @@ -2443,8 +2443,10 @@ static void glink_spi_remove(struct glink_spi *glink) spin_lock_irqsave(&glink->idr_lock, flags); /* Release any defunct local channels, waiting for close-ack */ idr_for_each_entry(&glink->lcids, channel, cid) kref_put(&channel->refcount, glink_spi_channel_release); idr_for_each_entry(&glink->lcids, channel, cid) { if (kref_put(&channel->refcount, glink_spi_channel_release)) idr_remove(&glink->lcids, cid); } /* Release any defunct local channels, waiting for close-req */ idr_for_each_entry(&glink->lcids, channel, cid) Loading Loading
drivers/rpmsg/qcom_glink_spi.c +5 −3 Original line number Diff line number Diff line Loading @@ -561,7 +561,7 @@ static void glink_spi_rx_advance(struct glink_spi *glink, size_t count) tail = pipe->local_addr; tail += count; if (tail > pipe->fifo_base + pipe->length) if (tail >= pipe->fifo_base + pipe->length) tail -= pipe->length; pipe->local_addr = tail; Loading Loading @@ -2443,8 +2443,10 @@ static void glink_spi_remove(struct glink_spi *glink) spin_lock_irqsave(&glink->idr_lock, flags); /* Release any defunct local channels, waiting for close-ack */ idr_for_each_entry(&glink->lcids, channel, cid) kref_put(&channel->refcount, glink_spi_channel_release); idr_for_each_entry(&glink->lcids, channel, cid) { if (kref_put(&channel->refcount, glink_spi_channel_release)) idr_remove(&glink->lcids, cid); } /* Release any defunct local channels, waiting for close-req */ idr_for_each_entry(&glink->lcids, channel, cid) Loading