.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/net/ethernet/ibm/emac/mal.h |
---|
3 | 4 | * |
---|
.. | .. |
---|
14 | 15 | * Based on original work by |
---|
15 | 16 | * Armin Kuster <akuster@mvista.com> |
---|
16 | 17 | * Copyright 2002 MontaVista Softare Inc. |
---|
17 | | - * |
---|
18 | | - * This program is free software; you can redistribute it and/or modify it |
---|
19 | | - * under the terms of the GNU General Public License as published by the |
---|
20 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
21 | | - * option) any later version. |
---|
22 | | - * |
---|
23 | 18 | */ |
---|
24 | 19 | #ifndef __IBM_NEWEMAC_MAL_H |
---|
25 | 20 | #define __IBM_NEWEMAC_MAL_H |
---|
.. | .. |
---|
136 | 131 | |
---|
137 | 132 | static inline int mal_tx_chunks(int len) |
---|
138 | 133 | { |
---|
139 | | - return (len + MAL_MAX_TX_SIZE - 1) / MAL_MAX_TX_SIZE; |
---|
| 134 | + return DIV_ROUND_UP(len, MAL_MAX_TX_SIZE); |
---|
140 | 135 | } |
---|
141 | 136 | |
---|
142 | 137 | #define MAL_CHAN_MASK(n) (0x80000000 >> (n)) |
---|