.. | .. |
---|
1 | | -/* Copyright (c) 2014 Broadcom Corporation |
---|
2 | | - * |
---|
3 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
4 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
5 | | - * copyright notice and this permission notice appear in all copies. |
---|
6 | | - * |
---|
7 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
8 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
9 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
---|
10 | | - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
11 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
---|
12 | | - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
---|
13 | | - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
| 1 | +// SPDX-License-Identifier: ISC |
---|
| 2 | +/* |
---|
| 3 | + * Copyright (c) 2014 Broadcom Corporation |
---|
14 | 4 | */ |
---|
15 | 5 | |
---|
16 | 6 | #include <linux/types.h> |
---|
.. | .. |
---|
190 | 180 | |
---|
191 | 181 | int brcmf_commonring_write_complete(struct brcmf_commonring *commonring) |
---|
192 | 182 | { |
---|
193 | | - void *address; |
---|
194 | | - |
---|
195 | | - address = commonring->buf_addr; |
---|
196 | | - address += (commonring->f_ptr * commonring->item_len); |
---|
197 | | - if (commonring->f_ptr > commonring->w_ptr) { |
---|
198 | | - address = commonring->buf_addr; |
---|
| 183 | + if (commonring->f_ptr > commonring->w_ptr) |
---|
199 | 184 | commonring->f_ptr = 0; |
---|
200 | | - } |
---|
201 | 185 | |
---|
202 | 186 | commonring->f_ptr = commonring->w_ptr; |
---|
203 | 187 | |
---|