* [Qemu-devel] [PATCH 01/13] ppc: Add missing 'static' to spin_rw_ops
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 02/13] sh7750: Remove redundant 'struct' from MemoryRegionOps Stefan Hajnoczi
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi, Alexander Graf
From: Stefan Weil <sw@weilnetz.de>
spin_rw_ops is only used in hw/ppce500_spin.c.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
hw/ppce500_spin.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c
index 6b8a189..6ed676b 100644
--- a/hw/ppce500_spin.c
+++ b/hw/ppce500_spin.c
@@ -182,7 +182,7 @@ static uint64_t spin_read(void *opaque, target_phys_addr_t addr, unsigned len)
}
}
-const MemoryRegionOps spin_rw_ops = {
+static const MemoryRegionOps spin_rw_ops = {
.read = spin_read,
.write = spin_write,
.endianness = DEVICE_BIG_ENDIAN,
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 02/13] sh7750: Remove redundant 'struct' from MemoryRegionOps
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 01/13] ppc: Add missing 'static' to spin_rw_ops Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 03/13] qom: Fix spelling in documentation Stefan Hajnoczi
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
The 'struct' is not needed, and all other MemoryRegionOps don't use it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
hw/sh7750.c | 2 +-
hw/sh_intc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sh7750.c b/hw/sh7750.c
index 4f4d8e7..e712928 100644
--- a/hw/sh7750.c
+++ b/hw/sh7750.c
@@ -712,7 +712,7 @@ static void sh7750_mmct_write(void *opaque, target_phys_addr_t addr,
}
}
-static const struct MemoryRegionOps sh7750_mmct_ops = {
+static const MemoryRegionOps sh7750_mmct_ops = {
.read = sh7750_mmct_read,
.write = sh7750_mmct_write,
.endianness = DEVICE_NATIVE_ENDIAN,
diff --git a/hw/sh_intc.c b/hw/sh_intc.c
index b24ec77..7d31ced 100644
--- a/hw/sh_intc.c
+++ b/hw/sh_intc.c
@@ -283,7 +283,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset,
#endif
}
-static const struct MemoryRegionOps sh_intc_ops = {
+static const MemoryRegionOps sh_intc_ops = {
.read = sh_intc_read,
.write = sh_intc_write,
.endianness = DEVICE_NATIVE_ENDIAN,
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 03/13] qom: Fix spelling in documentation
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 01/13] ppc: Add missing 'static' to spin_rw_ops Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 02/13] sh7750: Remove redundant 'struct' from MemoryRegionOps Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 04/13] qmp: Fix spelling fourty -> forty Stefan Hajnoczi
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This fixes a new spelling issue which was detected by codespell.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
include/qemu/object.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/qemu/object.h b/include/qemu/object.h
index 69e4b7b..dd7f3c0 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -288,7 +288,7 @@ struct Object
* implementing an explicit class type if they are not adding additional
* virtual functions.
* @class_init: This function is called after all parent class initialization
- * has occured to allow a class to set its default virtual method pointers.
+ * has occurred to allow a class to set its default virtual method pointers.
* This is also the function to use to override virtual methods from a parent
* class.
* @class_finalize: This function is called during class destruction and is
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 04/13] qmp: Fix spelling fourty -> forty
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (2 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 03/13] qom: Fix spelling in documentation Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 05/13] block/vmdk: Fix warning from splint (comparision of unsigned value) Stefan Hajnoczi
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This was found by codespell.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
test-qmp-output-visitor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test-qmp-output-visitor.c b/test-qmp-output-visitor.c
index c94c208..5452cd4 100644
--- a/test-qmp-output-visitor.c
+++ b/test-qmp-output-visitor.c
@@ -221,8 +221,8 @@ static void test_visitor_out_struct_nested(TestOutputVisitorData *data,
QObject *obj;
QDict *qdict, *dict1, *dict2, *dict3, *userdef;
const char *string = "user def string";
- const char *strings[] = { "fourty two", "fourty three", "fourty four",
- "fourty five" };
+ const char *strings[] = { "forty two", "forty three", "forty four",
+ "forty five" };
ud2 = g_malloc0(sizeof(*ud2));
ud2->string0 = g_strdup(strings[0]);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 05/13] block/vmdk: Fix warning from splint (comparision of unsigned value)
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (3 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 04/13] qmp: Fix spelling fourty -> forty Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 06/13] Fix sign of sscanf format specifiers Stefan Hajnoczi
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
l1_entry_sectors will never be less than 0.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
block/vmdk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 5623ac1..45c003a 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -453,7 +453,7 @@ static int vmdk_open_vmdk4(BlockDriverState *bs,
}
l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte)
* le64_to_cpu(header.granularity);
- if (l1_entry_sectors <= 0) {
+ if (l1_entry_sectors == 0) {
return -EINVAL;
}
l1_size = (le64_to_cpu(header.capacity) + l1_entry_sectors - 1)
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 06/13] Fix sign of sscanf format specifiers
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (4 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 05/13] block/vmdk: Fix warning from splint (comparision of unsigned value) Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 07/13] vnc: Fix packed boolean struct members Stefan Hajnoczi
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
All values read by sscanf are unsigned, so replace %d by %u.
This signed / unsigned mismatch was detected by splint.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
cursor.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cursor.c b/cursor.c
index efc5917..76e262c 100644
--- a/cursor.c
+++ b/cursor.c
@@ -15,7 +15,8 @@ static QEMUCursor *cursor_parse_xpm(const char *xpm[])
uint8_t idx;
/* parse header line: width, height, #colors, #chars */
- if (sscanf(xpm[line], "%d %d %d %d", &width, &height, &colors, &chars) != 4) {
+ if (sscanf(xpm[line], "%u %u %u %u",
+ &width, &height, &colors, &chars) != 4) {
fprintf(stderr, "%s: header parse error: \"%s\"\n",
__FUNCTION__, xpm[line]);
return NULL;
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 07/13] vnc: Fix packed boolean struct members
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (5 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 06/13] Fix sign of sscanf format specifiers Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 08/13] libcacard: Use format specifier %u instead of %d for unsigned values Stefan Hajnoczi
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This patch fixes warnings reported by splint:
For variables which are packed in a single bit, a signed data type
like 'int' does not make much sense.
There is no obvious reason why the two values should be packed,
so I removed the packing and changed the data type to bool
because both are used as boolean values.
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
ui/vnc-auth-sasl.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/vnc-auth-sasl.h b/ui/vnc-auth-sasl.h
index fd9b18a..ee243a9 100644
--- a/ui/vnc-auth-sasl.h
+++ b/ui/vnc-auth-sasl.h
@@ -37,9 +37,9 @@ typedef struct VncDisplaySASL VncDisplaySASL;
struct VncStateSASL {
sasl_conn_t *conn;
/* If we want to negotiate an SSF layer with client */
- int wantSSF :1;
+ bool wantSSF;
/* If we are now running the SSF layer */
- int runSSF :1;
+ bool runSSF;
/*
* If this is non-zero, then wait for that many bytes
* to be written plain, before switching to SSF encoding
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 08/13] libcacard: Use format specifier %u instead of %d for unsigned values
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (6 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 07/13] vnc: Fix packed boolean struct members Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 09/13] vnc: Add break statement Stefan Hajnoczi
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
splint reported warnings for those code statements.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
libcacard/vscclient.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index e317a25..0adae13 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -66,7 +66,7 @@ send_msg(
qemu_mutex_lock(&write_lock);
if (verbose > 10) {
- printf("sending type=%d id=%d, len =%d (0x%x)\n",
+ printf("sending type=%d id=%u, len =%u (0x%x)\n",
type, reader_id, length, length);
}
@@ -167,7 +167,7 @@ event_thread(void *arg)
case VEVENT_READER_REMOVE:
/* future, tell qemu that an old CCID reader has been removed */
if (verbose > 10) {
- printf(" READER REMOVE: %d\n", reader_id);
+ printf(" READER REMOVE: %u\n", reader_id);
}
send_msg(VSC_ReaderRemove, reader_id, NULL, 0);
break;
@@ -178,7 +178,7 @@ event_thread(void *arg)
vreader_power_on(event->reader, atr, &atr_len);
/* ATR call functions as a Card Insert event */
if (verbose > 10) {
- printf(" CARD INSERT %d: ", reader_id);
+ printf(" CARD INSERT %u: ", reader_id);
print_byte_array(atr, atr_len);
}
send_msg(VSC_ATR, reader_id, atr, atr_len);
@@ -186,7 +186,7 @@ event_thread(void *arg)
case VEVENT_CARD_REMOVE:
/* Card removed */
if (verbose > 10) {
- printf(" CARD REMOVE %d:\n", reader_id);
+ printf(" CARD REMOVE %u:\n", reader_id);
}
send_msg(VSC_CardRemove, reader_id, NULL, 0);
break;
@@ -256,7 +256,7 @@ do_command(void)
reader ? vreader_get_name(reader)
: "invalid reader", error);
} else {
- printf("no reader by id %d found\n", reader_id);
+ printf("no reader by id %u found\n", reader_id);
}
} else if (strncmp(string, "remove", 6) == 0) {
if (string[6] == ' ') {
@@ -269,7 +269,7 @@ do_command(void)
reader ? vreader_get_name(reader)
: "invalid reader", error);
} else {
- printf("no reader by id %d found\n", reader_id);
+ printf("no reader by id %u found\n", reader_id);
}
} else if (strncmp(string, "select", 6) == 0) {
if (string[6] == ' ') {
@@ -280,11 +280,11 @@ do_command(void)
reader = vreader_get_reader_by_id(reader_id);
}
if (reader) {
- printf("Selecting reader %d, %s\n", reader_id,
+ printf("Selecting reader %u, %s\n", reader_id,
vreader_get_name(reader));
default_reader_id = reader_id;
} else {
- printf("Reader with id %d not found\n", reader_id);
+ printf("Reader with id %u not found\n", reader_id);
}
} else if (strncmp(string, "debug", 5) == 0) {
if (string[5] == ' ') {
@@ -303,7 +303,7 @@ do_command(void)
if (reader_id == -1) {
continue;
}
- printf("%3d %s %s\n", reader_id,
+ printf("%3u %s %s\n", reader_id,
vreader_card_is_present(reader) == VREADER_OK ?
"CARD_PRESENT" : " ",
vreader_get_name(reader));
@@ -563,7 +563,7 @@ main(
mhHeader.reader_id = ntohl(mhHeader.reader_id);
mhHeader.length = ntohl(mhHeader.length);
if (verbose) {
- printf("Header: type=%d, reader_id=%d length=%d (0x%x)\n",
+ printf("Header: type=%d, reader_id=%u length=%d (0x%x)\n",
mhHeader.type, mhHeader.reader_id, mhHeader.length,
mhHeader.length);
}
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 09/13] vnc: Add break statement
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (7 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 08/13] libcacard: Use format specifier %u instead of %d for unsigned values Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 10/13] Spelling fixes in comments (it's -> its) Stefan Hajnoczi
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
This was not a bug, but it is not common practice to omit the break statement
from the last case statement before an empty default case.
Any change of the default case would introduce a bug.
This was reported as a warning by splint.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
ui/vnc-enc-hextile-template.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ui/vnc-enc-hextile-template.h b/ui/vnc-enc-hextile-template.h
index b9f9f5e..a7310e1 100644
--- a/ui/vnc-enc-hextile-template.h
+++ b/ui/vnc-enc-hextile-template.h
@@ -175,6 +175,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
/* we really don't have to invalidate either the bg or fg
but we've lost the old values. oh well. */
}
+ break;
default:
break;
}
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 10/13] Spelling fixes in comments (it's -> its)
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (8 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 09/13] vnc: Add break statement Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 11/13] libcacard: Spelling and grammar fixes in documentation Stefan Hajnoczi
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
* it's -> its (fixed for all files)
* dont -> don't (only fixed in a line which was touched by the previous fix)
* distrub -> disturb (fixed in the same line)
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
configure | 2 +-
hw/exynos4210_mct.c | 2 +-
hw/usb-ccid.c | 2 +-
include/qemu/object.h | 4 ++--
kvm-all.c | 2 +-
libcacard/vscclient.c | 2 +-
linux-user/signal.c | 2 +-
qemu-file.h | 2 +-
target-mips/op_helper.c | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/configure b/configure
index a5eb832..e19b6e3 100755
--- a/configure
+++ b/configure
@@ -232,7 +232,7 @@ for opt do
done
# OS specific
# Using uname is really, really broken. Once we have the right set of checks
-# we can eliminate it's usage altogether
+# we can eliminate its usage altogether.
cc="${CC-${cross_prefix}gcc}"
ar="${AR-${cross_prefix}ar}"
diff --git a/hw/exynos4210_mct.c b/hw/exynos4210_mct.c
index 01e3fb8..7474fcf 100644
--- a/hw/exynos4210_mct.c
+++ b/hw/exynos4210_mct.c
@@ -888,7 +888,7 @@ static void exynos4210_ltick_event(void *opaque)
static uint64_t time2[2] = {0};
#endif
- /* Call tick_timer event handler, it will update it's tcntb and icntb */
+ /* Call tick_timer event handler, it will update its tcntb and icntb. */
exynos4210_ltick_timer_event(&s->tick_timer);
/* get tick_timer cnt */
diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c
index ce01e34..ced687f 100644
--- a/hw/usb-ccid.c
+++ b/hw/usb-ccid.c
@@ -5,7 +5,7 @@
*
* Written by Alon Levy, with contributions from Robert Relyea.
*
- * Based on usb-serial.c, see it's copyright and attributions below.
+ * Based on usb-serial.c, see its copyright and attributions below.
*
* This work is licensed under the terms of the GNU GPL, version 2.1 or later.
* See the COPYING file in the top-level directory.
diff --git a/include/qemu/object.h b/include/qemu/object.h
index dd7f3c0..ec2d294 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -124,7 +124,7 @@ typedef struct InterfaceInfo InterfaceInfo;
*
* Once all of the parent classes have been initialized, #TypeInfo::class_init
* is called to let the class being instantiated provide default initialize for
- * it's virtual functions. Here is how the above example might be modified
+ * its virtual functions. Here is how the above example might be modified
* to introduce an overridden virtual function:
*
* <example>
@@ -527,7 +527,7 @@ Type type_register_static(const TypeInfo *info);
* type_register:
* @info: The #TypeInfo of the new type
*
- * Unlike type_register_static(), this call does not require @info or it's
+ * Unlike type_register_static(), this call does not require @info or its
* string members to continue to exist after the call returns.
*
* Returns: 0 on failure, the new #Type on success.
diff --git a/kvm-all.c b/kvm-all.c
index 77eadf6..549828a 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -35,7 +35,7 @@
#include <sys/eventfd.h>
#endif
-/* KVM uses PAGE_SIZE in it's definition of COALESCED_MMIO_MAX */
+/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */
#define PAGE_SIZE TARGET_PAGE_SIZE
//#define DEBUG_KVM
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index 0adae13..b64c93d 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -129,7 +129,7 @@ event_thread(void *arg)
vevent_delete(event);
continue;
}
- /* this reader hasn't been told it's status from qemu yet, wait for
+ /* this reader hasn't been told its status from qemu yet, wait for
* that status */
while (pending_reader != NULL) {
qemu_cond_wait(&pending_reader_condition, &pending_reader_lock);
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 79a39dc..cefd2ff 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2700,7 +2700,7 @@ get_sigframe(struct target_sigaction *ka, CPUState *regs, size_t frame_size)
sp = regs->active_tc.gpr[29];
/*
- * FPU emulator may have it's own trampoline active just
+ * FPU emulator may have its own trampoline active just
* above the user stack, 16-bytes before the next lowest
* 16 byte boundary. Try to avoid trashing it.
*/
diff --git a/qemu-file.h b/qemu-file.h
index 8da1021..31b83f6 100644
--- a/qemu-file.h
+++ b/qemu-file.h
@@ -47,7 +47,7 @@ typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf,
*/
typedef int (QEMUFileCloseFunc)(void *opaque);
-/* Called to determine if the file has exceeded it's bandwidth allocation. The
+/* Called to determine if the file has exceeded its bandwidth allocation. The
* bandwidth capping is a soft limit, not a hard limit.
*/
typedef int (QEMUFileRateLimit)(void *opaque);
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index c51b9cb..87e9799 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -1930,7 +1930,7 @@ target_ulong helper_evpe(void)
do {
if (other_cpu != env
- /* If the VPE is WFI, dont distrub it's sleep. */
+ /* If the VPE is WFI, don't disturb its sleep. */
&& !mips_vpe_is_wfi(other_cpu)) {
/* Enable the VPE. */
other_cpu->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 11/13] libcacard: Spelling and grammar fixes in documentation
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (9 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 10/13] Spelling fixes in comments (it's -> its) Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 12/13] osdep: Remove local definition of macro offsetof Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 13/13] configure: Quote the configure args printed in config.log Stefan Hajnoczi
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori
Cc: Peter Maydell, Stefan Hajnoczi, Stefan Weil, qemu-devel,
Alon Levy, Robert Relyea
From: Stefan Weil <sw@weilnetz.de>
* it's -> its
* it's -> it is (that's no fix, but makes future checks easier)
* this functions -> this function
* replacable -> replaceable
* reader's -> readers
* logins into -> logs into
v2:
Also replace 'aid' by 'AID' (thanks to Peter Maydell for this hint).
v3:
Fix sentence (contributed by Alon Levy / Robert Relyea).
Cc: Alon Levy <alevy@redhat.com>
Cc: Robert Relyea <rrelyea@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
docs/libcacard.txt | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/docs/libcacard.txt b/docs/libcacard.txt
index f7d7519..8db421d 100644
--- a/docs/libcacard.txt
+++ b/docs/libcacard.txt
@@ -10,7 +10,7 @@ such as signing, card removal/insertion, etc. are mapped to real, physical
cards which are shared with the client machine the emulator is running on, or
the cards could be pure software constructs.
-The emulator is structured to allow multiple replacable or additional pieces,
+The emulator is structured to allow multiple replaceable or additional pieces,
so it can be easily modified for future requirements. The primary envisioned
modifications are:
@@ -32,7 +32,7 @@ be emulated as well, including PIV, newer versions of CAC, PKCS #15, etc.
--------------------
Replacing the Socket Based Virtual Reader Interface.
-The current implementation contains a replacable module vscclient.c. The
+The current implementation contains a replaceable module vscclient.c. The
current vscclient.c implements a sockets interface to the virtual ccid reader
on the guest. CCID commands that are pertinent to emulation are passed
across the socket, and their responses are passed back along that same socket.
@@ -42,7 +42,7 @@ implements a program with a main entry. It also handles argument parsing for
the emulator.
An application that wants to use the virtual reader can replace vscclient.c
-with it's own implementation that connects to it's own CCID reader. The calls
+with its own implementation that connects to its own CCID reader. The calls
that the CCID reader can call are:
VReaderList * vreader_get_reader_list();
@@ -72,12 +72,12 @@ that the CCID reader can call are:
VReader * vreader_list_get_reader(VReaderListEntry *)
This function returns the reader stored in the reader List entry. Caller gets
- a new reference to a reader. The caller must free it's reference when it is
+ a new reference to a reader. The caller must free its reference when it is
finished with vreader_free().
void vreader_free(VReader *reader);
- This function frees a reference to a reader. Reader's are reference counted
+ This function frees a reference to a reader. Readers are reference counted
and are automatically deleted when the last reference is freed.
void vreader_list_delete(VReaderList *list);
@@ -87,7 +87,7 @@ that the CCID reader can call are:
VReaderStatus vreader_power_on(VReader *reader, char *atr, int *len);
- This functions simulates a card power on. Virtual cards do not care about
+ This function simulates a card power on. A virtual card does not care about
the actual voltage and other physical parameters, but it does care that the
card is actually on or off. Cycling the card causes the card to reset. If
the caller provides enough space, vreader_power_on will return the ATR of
@@ -104,7 +104,7 @@ that the CCID reader can call are:
unsigned char *receive_buf,
int receive_buf_len);
- This functions send a raw apdu to a card and returns the card's response.
+ This function sends a raw apdu to a card and returns the card's response.
The CCID front end should return the response back. Most of the emulation
is driven from these APDUs.
@@ -217,10 +217,10 @@ the card using the following functions:
VCardStatus vcard_add_applet(VCard *card, VCardApplet *applet);
Add an applet onto the list of applets attached to the card. Once an applet
- has been added, it can be selected by it's aid, and then commands will be
- routed to it VCardProcessAPDU function. This function adopts the applet the
- passed int applet. Note: 2 applets with the same AID should not be added to
- the same card. It's permissible to add more than one applet. Multiple applets
+ has been added, it can be selected by its AID, and then commands will be
+ routed to it VCardProcessAPDU function. This function adopts the applet that
+ is passed into it. Note: 2 applets with the same AID should not be added to
+ the same card. It is permissible to add more than one applet. Multiple applets
may have the same VCardPRocessAPDU entry point.
The certs and keys should be attached to private data associated with one or
@@ -335,7 +335,7 @@ and applet.
VCard7816Status vcard_emul_login(VCard *card, unsigned char *pin,
int pin_len);
- This function logins into the card and return the standard 7816 status
+ This function logs into the card and returns the standard 7816 status
word depending on the success or failure of the call.
void vcard_emul_delete_key(VCardKey *key);
@@ -424,7 +424,7 @@ functions:
cert_len, and keys are all arrays of length cert_count. These are the
the same of the parameters xxxx_card_init() accepts.
- Finally the card is associated with it's reader by the call:
+ Finally the card is associated with its reader by the call:
VReaderStatus vreader_insert_card(VReader *vreader, VCard *vcard);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 12/13] osdep: Remove local definition of macro offsetof
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (10 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 11/13] libcacard: Spelling and grammar fixes in documentation Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
2012-03-07 12:44 ` [Qemu-devel] [PATCH 13/13] configure: Quote the configure args printed in config.log Stefan Hajnoczi
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
The macro offsetof is defined in stddef.h. It is conforming to
the standards C89, C99 and POSIX.1-2001 (see man page), so it
is a sufficiently old standard.
Therefore chances are very high that QEMU never needs a local
definition of this macro.
osdep.h already includes stddef.h, so this patch simply removes
the unneeded code from the files configure and osdep.h.
If we ever need the local definition again, it should be added
to compiler.h (the macro is usually provided with the compiler,
it is not OS specific).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
configure | 14 --------------
osdep.h | 3 ---
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/configure b/configure
index e19b6e3..ed3d907 100755
--- a/configure
+++ b/configure
@@ -2524,17 +2524,6 @@ if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
fi
##########################################
-# check if the compiler defines offsetof
-
-need_offsetof=yes
-cat > $TMPC << EOF
-#include <stddef.h>
-int main(void) { struct s { int f; }; return offsetof(struct s, f); }
-EOF
-if compile_prog "" "" ; then
- need_offsetof=no
-fi
-
# spice probe
if test "$spice" != "no" ; then
cat > $TMPC << EOF
@@ -3199,9 +3188,6 @@ fi
if test "$tcg_interpreter" = "yes" ; then
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
fi
-if test "$need_offsetof" = "yes" ; then
- echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
-fi
if test "$fdatasync" = "yes" ; then
echo "CONFIG_FDATASYNC=y" >> $config_host_mak
fi
diff --git a/osdep.h b/osdep.h
index 432b91e..0350383 100644
--- a/osdep.h
+++ b/osdep.h
@@ -26,9 +26,6 @@
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif
-#ifdef CONFIG_NEED_OFFSETOF
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
-#endif
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof(((type *) 0)->member) *__mptr = (ptr); \
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 13/13] configure: Quote the configure args printed in config.log
2012-03-07 12:44 [Qemu-devel] [PULL 00/13] Trivial patches for 25 February to 7 March 2012 Stefan Hajnoczi
` (11 preceding siblings ...)
2012-03-07 12:44 ` [Qemu-devel] [PATCH 12/13] osdep: Remove local definition of macro offsetof Stefan Hajnoczi
@ 2012-03-07 12:44 ` Stefan Hajnoczi
12 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2012-03-07 12:44 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Peter Maydell, qemu-devel, Stefan Hajnoczi
From: Peter Maydell <peter.maydell@linaro.org>
Use the same mechanism we use for printing the configure command
line to config-host.mak to print it to config.log. This fixes a
bug where the config.log version didn't quote arguments with spaces.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
configure | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index ed3d907..66a65d9 100755
--- a/configure
+++ b/configure
@@ -22,7 +22,9 @@ rm -f config.log
# Print a helpful header at the top of config.log
echo "# QEMU configure log $(date)" >> config.log
-echo "# produced by $0 $*" >> config.log
+printf "# Configured with:" >> config.log
+printf " '%s'" "$0" "$@" >> config.log
+echo >> config.log
echo "#" >> config.log
compile_object() {
--
1.7.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread