Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/adm5120/dev Misc KNF. NFCI.



details:   https://anonhg.NetBSD.org/src/rev/768e47a796be
branches:  trunk
changeset: 949218:768e47a796be
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Jan 05 16:30:37 2021 +0000

description:
Misc KNF.  NFCI.

diffstat:

 sys/arch/mips/adm5120/dev/ahci.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (51 lines):

diff -r a487d62efdb0 -r 768e47a796be sys/arch/mips/adm5120/dev/ahci.c
--- a/sys/arch/mips/adm5120/dev/ahci.c  Tue Jan 05 16:15:09 2021 +0000
+++ b/sys/arch/mips/adm5120/dev/ahci.c  Tue Jan 05 16:30:37 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahci.c,v 1.22 2020/04/05 20:59:38 skrll Exp $  */
+/*     $NetBSD: ahci.c,v 1.23 2021/01/05 16:30:37 skrll Exp $  */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.22 2020/04/05 20:59:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.23 2021/01/05 16:30:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -889,7 +889,7 @@
        ep->control =  pipe->up_dev->ud_addr | \
                ((pipe->up_dev->ud_speed==USB_SPEED_FULL)?ADMHCD_ED_SPEED:0) | \
                ((UGETW(pipe->up_endpoint->ue_edesc->wMaxPacketSize))<<ADMHCD_ED_MAXSHIFT);
-       memcpy(KERNADDR(&reqdma, 0), req, sizeof *req);
+       memcpy(KERNADDR(&reqdma, 0), req, sizeof(*req));
 /*     printf("status: %x\n",REG_READ(ADMHCD_REG_PORTSTATUS0));
        printf("ep_control: %x\n",ep->control);
        printf("speed: %x\n",pipe->up_dev->ud_speed);
@@ -1236,16 +1236,17 @@
 
        i = 0;
        offset = 0;
-       while ((len>0) || (i==0)) {
+       while (len > 0) || i == 0) {
                tlen = uimin(len,4096);
-               td[i]->buffer = DMAADDR(&xfer->ux_dmabuf,offset) | 0xa0000000;
-               td[i]->buflen=tlen;
-               td[i]->control=(isread?ADMHCD_TD_IN:ADMHCD_TD_OUT) | toggle | ADMHCD_TD_OWN | short_ok;
-               td[i]->len=tlen;
+               td[i]->buffer = DMAADDR(&xfer->ux_dmabuf, offset) | 0xa0000000;
+               td[i]->buflen = tlen;
+               td[i]->control = (isread ? ADMHCD_TD_IN : ADMHCD_TD_OUT) |
+                   toggle | ADMHCD_TD_OWN | short_ok;
+               td[i]->len = tlen;
                toggle = ADMHCD_TD_TOGGLE;
                len -= tlen;
                offset += tlen;
-               td[i]->next = td[i+1];
+               td[i]->next = td[i + 1];
                i++;
        };
 



Home | Main Index | Thread Index | Old Index