Displaying 3 results from an estimated 3 matches for "458,19".
Did you mean:
448,19
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...cmd);
/* Give the UPS some time to chew on what we just sent */
- usleep(50000);
+ struct timespec delay = {0, 50e6}; nanosleep(&delay, NULL);
/* delete command echo up to \012 but no further */
for (ch = '\0'; ch != '\012'; ser_get_char(upsfd, &ch, 0, 10000));
@@ -458,18 +458,19 @@ void upsdrv_help(void)
static void sync_serial(void) {
char buffer[10];
+ struct timespec delay = {UPSDELAY, 0};
ser_flush_in(upsfd, "", 1);
ser_send(upsfd, "\r");
- sleep(UPSDELAY);
+ nanosleep(&delay, NULL);
ser_get_line(upsfd, buffer, sizeof(b...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...case 2: /* 2 bytes */
buf16 = (u16 *) buf;
*buf16 = __le16_to_cpu(readw(ptr));
goto out;
- break;
case 4: /* 4 bytes */
*(buf) = __le32_to_cpu(readl(ptr));
goto out;
- break;
}
while (i < size_bytes) {
if (size_bytes - i == 2) {
/* Handle 2 bytes in the end */
@@ -458,19 +456,18 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), ptr);
return 2;
- break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...case 2: /* 2 bytes */
buf16 = (u16 *) buf;
*buf16 = __le16_to_cpu(readw(ptr));
goto out;
- break;
case 4: /* 4 bytes */
*(buf) = __le32_to_cpu(readl(ptr));
goto out;
- break;
}
while (i < size_bytes) {
if (size_bytes - i == 2) {
/* Handle 2 bytes in the end */
@@ -458,19 +456,18 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), ptr);
return 2;
- break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling...