Module Name:    src
Committed By:   skrll
Date:           Tue Jan  5 16:30:37 UTC 2021

Modified Files:
        src/sys/arch/mips/adm5120/dev: ahci.c

Log Message:
Misc KNF.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/adm5120/dev/ahci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/adm5120/dev/ahci.c
diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.22 src/sys/arch/mips/adm5120/dev/ahci.c:1.23
--- src/sys/arch/mips/adm5120/dev/ahci.c:1.22	Sun Apr  5 20:59:38 2020
+++ src/sys/arch/mips/adm5120/dev/ahci.c	Tue Jan  5 16:30:37 2021
@@ -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 @@ ahci_device_ctrl_start(struct usbd_xfer 
 	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 @@ ahci_device_bulk_start(struct usbd_xfer 
 
 	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++;
 	};
 

Reply via email to