diff mbox series

[3/4] Fix typos in the remaining lib folders

Message ID 20230222154057.904578-4-thuth@redhat.com
State Accepted
Headers show
Series Fix typos | expand

Commit Message

Thomas Huth Feb. 22, 2023, 3:40 p.m. UTC
Found with the "codespell" utility.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 lib/libbcm/bcm57xx.c       | 4 ++--
 lib/libbcm/bcm57xx.h       | 4 ++--
 lib/libc/stdio/vsnprintf.c | 2 +-
 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, 16 insertions(+), 16 deletions(-)

Comments

Segher Boessenkool Feb. 22, 2023, 4:12 p.m. UTC | #1
On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
> Found with the "codespell" utility.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

>  /*
> - * The vsnprintf function prints a formated strings into a buffer.
> + * The vsnprintf function prints a formatted strings into a buffer.

"String", singular.

> - * @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  amount of blocks that should be transferred

s/amount/number/

Number is "how many", amount is "how much".

> - * @return number of blocks that have been transfered successfully
> + * @return number of blocks that have been transferred successfully

This got it right, just two lines later, heh.


Segher
Thomas Huth Feb. 23, 2023, 10:39 a.m. UTC | #2
On 22/02/2023 17.12, Segher Boessenkool wrote:
> On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
>> Found with the "codespell" utility.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
>>   /*
>> - * The vsnprintf function prints a formated strings into a buffer.
>> + * The vsnprintf function prints a formatted strings into a buffer.
> 
> "String", singular.

Thanks! ... seems like I should also read the remaining parts of the 
sentences that I'm fixing ;-)

I'll respin a v2 with your suggestions!

  Thomas
Segher Boessenkool Feb. 23, 2023, 1:55 p.m. UTC | #3
On Thu, Feb 23, 2023 at 11:39:40AM +0100, Thomas Huth wrote:
> On 22/02/2023 17.12, Segher Boessenkool wrote:
> >On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
> >>Found with the "codespell" utility.
> >>
> >>Signed-off-by: Thomas Huth <thuth@redhat.com>
> >
> >>  /*
> >>- * The vsnprintf function prints a formated strings into a buffer.
> >>+ * The vsnprintf function prints a formatted strings into a buffer.
> >
> >"String", singular.
> 
> Thanks! ... seems like I should also read the remaining parts of the 
> sentences that I'm fixing ;-)

I was checking the patches if there are cases where Forth code is
incorrectly fixed for mispelings, and then I noticed this stuff.
There is no super big benefit from fixing these, do with it as you like
of course :-)

> I'll respin a v2 with your suggestions!

Thanks!


Segher
Alexey Kardashevskiy Feb. 28, 2023, 5:12 a.m. UTC | #4
On 23/02/2023 21:39, Thomas Huth wrote:
> On 22/02/2023 17.12, Segher Boessenkool wrote:
>> On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
>>> Found with the "codespell" utility.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>>>   /*
>>> - * The vsnprintf function prints a formated strings into a buffer.
>>> + * The vsnprintf function prints a formatted strings into a buffer.
>>
>> "String", singular.
> 
> Thanks! ... seems like I should also read the remaining parts of the 
> sentences that I'm fixing ;-)
> 
> I'll respin a v2 with your suggestions!

Wait till I push the existing stuff out :)
Thomas Huth March 1, 2023, 10:36 a.m. UTC | #5
On 28/02/2023 06.12, Alexey Kardashevskiy wrote:
> 
> 
> On 23/02/2023 21:39, Thomas Huth wrote:
>> On 22/02/2023 17.12, Segher Boessenkool wrote:
>>> On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
>>>> Found with the "codespell" utility.
>>>>
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>
>>>>   /*
>>>> - * The vsnprintf function prints a formated strings into a buffer.
>>>> + * The vsnprintf function prints a formatted strings into a buffer.
>>>
>>> "String", singular.
>>
>> Thanks! ... seems like I should also read the remaining parts of the 
>> sentences that I'm fixing ;-)
>>
>> I'll respin a v2 with your suggestions!
> 
> Wait till I push the existing stuff out :)

OK ... when will you do that? ... I don't see an update yet?

  Thomas
Alexey Kardashevskiy March 6, 2023, 7:41 a.m. UTC | #6
On 01/03/2023 21:36, Thomas Huth wrote:
> On 28/02/2023 06.12, Alexey Kardashevskiy wrote:
>>
>>
>> On 23/02/2023 21:39, Thomas Huth wrote:
>>> On 22/02/2023 17.12, Segher Boessenkool wrote:
>>>> On Wed, Feb 22, 2023 at 04:40:56PM +0100, Thomas Huth wrote:
>>>>> Found with the "codespell" utility.
>>>>>
>>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>>
>>>>>   /*
>>>>> - * The vsnprintf function prints a formated strings into a buffer.
>>>>> + * The vsnprintf function prints a formatted strings into a buffer.
>>>>
>>>> "String", singular.
>>>
>>> Thanks! ... seems like I should also read the remaining parts of the 
>>> sentences that I'm fixing ;-)
>>>
>>> I'll respin a v2 with your suggestions!
>>
>> Wait till I push the existing stuff out :)
> 
> OK ... when will you do that? ... I don't see an update yet?

Agrh. I pushed it here first in case someone rejects removing ?pick :) 
https://github.com/aik/SLOF-debug/commits/master

I have this debug repo for temporary stuff as everything from the main 
repo is mirrored to git.qemu.org and we do not want that (may be since 
then the mirroring got limited to "master" only).

Now it is pushed to the main repo.


> 
>   Thomas
> 
>
diff mbox series

Patch

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 <stdint.h>
 #include <stdio.h>
@@ -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..bb3b3aa 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -240,7 +240,7 @@  print_format(char **buffer, size_t bufsize, const char *format, void *var)
 
 
 /*
- * The vsnprintf function prints a formated strings into a buffer.
+ * The vsnprintf function prints a formatted strings into a buffer.
  * BUG: buffer size checking does not fully work yet
  */
 int
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..1f5077d 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  amount 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)