Loading drivers/soc/qcom/glink_smem_native_xprt.c +7 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -447,6 +447,9 @@ static int fifo_read(struct edge_info *einfo, void *_data, int len) uint32_t fifo_size = einfo->rx_fifo_size; uint32_t n; if (read_index >= fifo_size || write_index >= fifo_size) return 0; while (len) { ptr = einfo->rx_fifo + read_index; if (read_index <= write_index) Loading Loading @@ -490,6 +493,9 @@ static uint32_t fifo_write_body(struct edge_info *einfo, const void *_data, uint32_t fifo_size = einfo->tx_fifo_size; uint32_t n; if (read_index >= fifo_size || *write_index >= fifo_size) return 0; while (len) { ptr = einfo->tx_fifo + *write_index; if (*write_index < read_index) { Loading Loading
drivers/soc/qcom/glink_smem_native_xprt.c +7 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -447,6 +447,9 @@ static int fifo_read(struct edge_info *einfo, void *_data, int len) uint32_t fifo_size = einfo->rx_fifo_size; uint32_t n; if (read_index >= fifo_size || write_index >= fifo_size) return 0; while (len) { ptr = einfo->rx_fifo + read_index; if (read_index <= write_index) Loading Loading @@ -490,6 +493,9 @@ static uint32_t fifo_write_body(struct edge_info *einfo, const void *_data, uint32_t fifo_size = einfo->tx_fifo_size; uint32_t n; if (read_index >= fifo_size || *write_index >= fifo_size) return 0; while (len) { ptr = einfo->tx_fifo + *write_index; if (*write_index < read_index) { Loading