From 9604efb1832de13b51f93ad0a3581f9ed6dc04b5 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 22 Feb 2023 16:40:56 +0100 Subject: Fix typos in the remaining lib folders Found with the "codespell" utility. Signed-off-by: Thomas Huth Signed-off-by: Alexey Kardashevskiy --- lib/libbcm/bcm57xx.c | 4 ++-- lib/libbcm/bcm57xx.h | 4 ++-- lib/libc/stdio/vsnprintf.c | 7 +++---- lib/libe1k/e1k.c | 6 +++--- lib/libtpm/tcgbios.c | 4 ++-- lib/libusb/usb-ohci.c | 2 +- lib/libusb/usb-xhci.c | 2 +- lib/libvirtio/virtio-blk.c | 6 +++--- lib/libvirtio/virtio-net.c | 2 +- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lib/libbcm/bcm57xx.c b/lib/libbcm/bcm57xx.c index 2ecb517..f6765ce 100644 --- a/lib/libbcm/bcm57xx.c +++ b/lib/libbcm/bcm57xx.c @@ -16,7 +16,7 @@ * reference: * Broadcom 57xx * Host Programmer Interface Specification for the - * NetXtreme Family of Highly-Integrated Media Access Controlers + * NetXtreme Family of Highly-Integrated Media Access Controllers */ #include #include @@ -3255,7 +3255,7 @@ bcm_setmac(char mac_addr1[6], char mac_addr2[6]) manu[(0xCC-0x74)/4] = val3; manu[(0xD0-0x74)/4] = val4; - /* Calculate the new manufacturing datas CRC */ + /* Calculate the new manufacturing data CRC */ crc = util_gen_crc(((char *)manu), MANUFACTURING_INFO_SIZE - 4, 0xFFFFFFFF); diff --git a/lib/libbcm/bcm57xx.h b/lib/libbcm/bcm57xx.h index efaba60..3566f60 100644 --- a/lib/libbcm/bcm57xx.h +++ b/lib/libbcm/bcm57xx.h @@ -41,11 +41,11 @@ #define PCI_BAR2_R ( (uint16_t) 0x0014 ) // PCI bar1 register #define PCI_SUBID_R ( (uint16_t) 0x002e ) -// PCI-X Comand register +// PCI-X Command register #define PCI_X_COM_R ( (uint16_t) 0x0042 ) // Message Data Register #define MSG_DATA_R ( (uint16_t) 0x0064 ) -// PCI misc host contrl register +// PCI misc host control register #define PCI_MISC_HCTRL_R ( (uint16_t) 0x0068 ) // DMA Read/Write Control register #define DMA_RW_CTRL_R ( (uint16_t) 0x006c ) diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index 12f3043..ad91132 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -234,13 +234,12 @@ print_format(char **buffer, size_t bufsize, const char *format, void *var) form++; } - return (long int) (*buffer - start); } /* - * The vsnprintf function prints a formated strings into a buffer. + * The vsnprintf function prints a formatted string into a buffer. * BUG: buffer size checking does not fully work yet */ int @@ -266,7 +265,7 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg) if(*ptr == '%') { char formstr[20]; int i=0; - + do { formstr[i] = *ptr; ptr++; @@ -292,7 +291,7 @@ vsnprintf(char *buffer, size_t bufsize, const char *format, va_list arg) ptr++; } } - + *buffer = '\0'; return (buffer - bstart); diff --git a/lib/libe1k/e1k.c b/lib/libe1k/e1k.c index 3bbc75f..514e7c2 100644 --- a/lib/libe1k/e1k.c +++ b/lib/libe1k/e1k.c @@ -369,7 +369,7 @@ e1k_init_receiver(void) e1k_wr32(RCTL, 0); /* - * clear receive desciptors and setup buffer pointers + * clear receive descriptors and setup buffer pointers */ for (i = 0; i < E1K_NUM_RX_DESC; i++) { memset((uint8_t *) &m_e1k.m_rx_ring_pst[i], 0, @@ -421,7 +421,7 @@ e1k_init_transmitter(void) uint64_t addr; /* - * clear transmit desciptors and setup buffer pointers + * clear transmit descriptors and setup buffer pointers */ for (i = 0; i < E1K_NUM_TX_DESC; i++) { memset((uint8_t *) &m_e1k.m_tx_ring_pst[i], 0, @@ -451,7 +451,7 @@ e1k_init_transmitter(void) */ e1k_wr32(TCTL, BIT32(1) | // enable transmitter BIT32(3) | // pad short packets - ((uint32_t) 0x0f << 4) | // collision threshhold + ((uint32_t) 0x0f << 4) | // collision threshold ((uint32_t) 0x40 << 12)); // collision distance } diff --git a/lib/libtpm/tcgbios.c b/lib/libtpm/tcgbios.c index 3b2e76d..aefa865 100644 --- a/lib/libtpm/tcgbios.c +++ b/lib/libtpm/tcgbios.c @@ -332,7 +332,7 @@ static int tpm20_build_digest(struct tpm_log_entry *le, } if (sel != end) { - dprintf("Malformed pcr selection structure fron TPM\n"); + dprintf("Malformed pcr selection structure from TPM\n"); return -1; } @@ -739,7 +739,7 @@ static int tpm20_write_EfiSpecIdEventStruct(void) } if (sel != end) { - dprintf("Malformed pcr selection structure fron TPM\n"); + dprintf("Malformed pcr selection structure from TPM\n"); return -1; } diff --git a/lib/libusb/usb-ohci.c b/lib/libusb/usb-ohci.c index 3f2ecf3..8c9ab01 100644 --- a/lib/libusb/usb-ohci.c +++ b/lib/libusb/usb-ohci.c @@ -645,7 +645,7 @@ static int ohci_transfer_bulk(struct usb_pipe *pipe, void *td_ptr, __func__, pipe, data_phys, datalen, dir, td, td_phys); if (!tds) { - printf("%s: tds NULL recieved\n", __func__); + printf("%s: tds NULL received\n", __func__); ret = false; goto end; } diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c index cdf8042..6708bc0 100644 --- a/lib/libusb/usb-xhci.c +++ b/lib/libusb/usb-xhci.c @@ -714,7 +714,7 @@ static int xhci_port_scan(struct xhci_hcd *xhcd, cap = xhcd->cap_regs; port_cnt = num_ports = read_reg32(&cap->hcsparams1) >> 24; - /* Read the xHCI extented capability to find usb3 ports and offset*/ + /* Read the xHCI extended capability to find usb3 ports and offset*/ xecp_off = XHCI_HCCPARAMS_XECP(read_reg32(&cap->hccparams)); base = (uint32_t *)cap; while (xecp_off > 0) { diff --git a/lib/libvirtio/virtio-blk.c b/lib/libvirtio/virtio-blk.c index 0363038..471c4e1 100644 --- a/lib/libvirtio/virtio-blk.c +++ b/lib/libvirtio/virtio-blk.c @@ -111,10 +111,10 @@ static void fill_blk_hdr(struct virtio_blk_req *blkhdr, bool is_modern, * Read / write blocks * @param reg pointer to "reg" property * @param buf pointer to destination buffer - * @param blocknum block number of the first block that should be transfered - * @param cnt amount of blocks that should be transfered + * @param blocknum block number of the first block that should be transferred + * @param cnt number of blocks that should be transferred * @param type VIRTIO_BLK_T_OUT for write, VIRTIO_BLK_T_IN for read transfers - * @return number of blocks that have been transfered successfully + * @return number of blocks that have been transferred successfully */ int virtioblk_transfer(struct virtio_device *dev, char *buf, uint64_t blocknum, diff --git a/lib/libvirtio/virtio-net.c b/lib/libvirtio/virtio-net.c index 5a0d190..6609024 100644 --- a/lib/libvirtio/virtio-net.c +++ b/lib/libvirtio/virtio-net.c @@ -66,7 +66,7 @@ static uint16_t last_rx_idx; /* Last index in RX "used" ring */ /** * Module init for virtio via PCI. - * Checks whether we're reponsible for the given device and set up + * Checks whether we're responsible for the given device and set up * the virtqueue configuration. */ static int virtionet_init_pci(struct virtio_net *vnet, struct virtio_device *dev) -- cgit v1.1