X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fenc28j60.c;h=ec33764f5ecb93a791db1b63fa477cb29f056724;hb=97598fcf10eba577622f3387eaecd43dd710da0d;hp=d55cacdac8c0acf9b453d0341c779b2856b77571;hpb=09c04c20962afd25ce5797e263906f84de5b1f4c;p=u-boot diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index d55cacdac8..ec33764f5e 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -4,20 +4,7 @@ * Martin Krause, Martin.Krause@tqs.de * reworked original enc28j60.c * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -432,7 +419,6 @@ static void enc_receive(enc_dev_t *enc) u16 pkt_len; u16 copy_len; u16 status; - u8 eir_reg; u8 pkt_cnt = 0; u16 rxbuf_rdpt; u8 hbuf[6]; @@ -476,7 +462,7 @@ static void enc_receive(enc_dev_t *enc) /* read pktcnt */ pkt_cnt = enc_r8(enc, CTL_REG_EPKTCNT); if (copy_len == 0) { - eir_reg = enc_r8(enc, CTL_REG_EIR); + (void)enc_r8(enc, CTL_REG_EIR); enc_reset_rx(enc); printf("%s: receive copy_len=0\n", enc->dev->name); continue; @@ -489,7 +475,7 @@ static void enc_receive(enc_dev_t *enc) NetReceive(packet, pkt_len); if (enc_claim_bus(enc)) return; - eir_reg = enc_r8(enc, CTL_REG_EIR); + (void)enc_r8(enc, CTL_REG_EIR); } while (pkt_cnt); /* Use EPKTCNT not EIR.PKTIF flag, see errata pt. 6 */ } @@ -500,14 +486,13 @@ static void enc_receive(enc_dev_t *enc) static void enc_poll(enc_dev_t *enc) { u8 eir_reg; - u8 estat_reg; u8 pkt_cnt; #ifdef CONFIG_USE_IRQ /* clear global interrupt enable bit in enc28j60 */ enc_bclr(enc, CTL_REG_EIE, ENC_EIE_INTIE); #endif - estat_reg = enc_r8(enc, CTL_REG_ESTAT); + (void)enc_r8(enc, CTL_REG_ESTAT); eir_reg = enc_r8(enc, CTL_REG_EIR); if (eir_reg & ENC_EIR_TXIF) { /* clear TXIF bit in EIR */ @@ -877,7 +862,7 @@ static int enc_recv(struct eth_device *dev) */ static int enc_send( struct eth_device *dev, - volatile void *packet, + void *packet, int length) { enc_dev_t *enc = dev->priv;