* [PATCH 1/4] OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.
[not found] <1415899632-31802-1-git-send-email-anthony.perard@citrix.com>
@ 2014-11-13 17:27 ` Anthony PERARD
[not found] ` <1415899632-31802-2-git-send-email-anthony.perard@citrix.com>
1 sibling, 0 replies; 3+ messages in thread
From: Anthony PERARD @ 2014-11-13 17:27 UTC (permalink / raw)
To: EDK2 devel; +Cc: Anthony PERARD, Scott Duplichan, Xen Devel
Since a message to XenStore have a lenght of type UINT32, have
XenStore.c deal only with UINT32 instead of a mixmatch with UINTN.
This patch replaces the type of Len in WRITE_REQUEST and the type of the
argument Len of XenStoreWriteStore and XenStoreReadStore.
This patch should avoid to have type cast were it does not make sense to
have them.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
CC: Xen Devel <xen-devel@lists.xen.org>
---
OvmfPkg/XenBusDxe/XenStore.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c
index f176b95..7c272b3 100644
--- a/OvmfPkg/XenBusDxe/XenStore.c
+++ b/OvmfPkg/XenBusDxe/XenStore.c
@@ -69,7 +69,7 @@
typedef struct {
CONST VOID *Data;
- UINTN Len;
+ UINT32 Len;
} WRITE_REQUEST;
/* Register callback to watch subtree (node) in the XenStore. */
@@ -456,7 +456,7 @@ STATIC
XENSTORE_STATUS
XenStoreWriteStore (
IN CONST VOID *DataPtr,
- IN UINTN Len
+ IN UINT32 Len
)
{
XENSTORE_RING_IDX Cons, Prod;
@@ -535,7 +535,7 @@ STATIC
XENSTORE_STATUS
XenStoreReadStore (
OUT VOID *DataPtr,
- IN UINTN Len
+ IN UINT32 Len
)
{
XENSTORE_RING_IDX Cons, Prod;
@@ -883,7 +883,7 @@ XenStoreSingle (
WRITE_REQUEST WriteRequest;
WriteRequest.Data = (VOID *) Body;
- WriteRequest.Len = AsciiStrSize (Body);
+ WriteRequest.Len = (UINT32)AsciiStrSize (Body);
return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
LenPtr, Result);
@@ -912,9 +912,9 @@ XenStoreWatch (
WRITE_REQUEST WriteRequest[2];
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Token;
- WriteRequest[1].Len = AsciiStrSize (Token);
+ WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
return XenStoreTalkv (XST_NIL, XS_WATCH, WriteRequest, 2, NULL, NULL);
}
@@ -938,9 +938,9 @@ XenStoreUnwatch (
WRITE_REQUEST WriteRequest[2];
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Token;
- WriteRequest[1].Len = AsciiStrSize (Token);
+ WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
return XenStoreTalkv (XST_NIL, XS_UNWATCH, WriteRequest, 2, NULL, NULL);
}
@@ -1245,9 +1245,9 @@ XenStoreWrite (
Path = XenStoreJoin (DirectoryPath, Node);
WriteRequest[0].Data = (VOID *) Path;
- WriteRequest[0].Len = AsciiStrSize (Path);
+ WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
WriteRequest[1].Data = (VOID *) Str;
- WriteRequest[1].Len = AsciiStrLen (Str);
+ WriteRequest[1].Len = (UINT32)AsciiStrLen (Str);
Status = XenStoreTalkv (Transaction, XS_WRITE, WriteRequest, 2, NULL, NULL);
FreePool (Path);
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/4] OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.
[not found] ` <1415899632-31802-2-git-send-email-anthony.perard@citrix.com>
@ 2014-11-13 19:05 ` Konrad Rzeszutek Wilk
2014-11-14 16:32 ` [edk2] " Laszlo Ersek
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-11-13 19:05 UTC (permalink / raw)
To: Anthony PERARD; +Cc: EDK2 devel, Scott Duplichan, Xen Devel
On Thu, Nov 13, 2014 at 05:27:09PM +0000, Anthony PERARD wrote:
> Since a message to XenStore have a lenght of type UINT32, have
> XenStore.c deal only with UINT32 instead of a mixmatch with UINTN.
>
> This patch replaces the type of Len in WRITE_REQUEST and the type of the
> argument Len of XenStoreWriteStore and XenStoreReadStore.
>
> This patch should avoid to have type cast were it does not make sense to
> have them.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> CC: Xen Devel <xen-devel@lists.xen.org>
> ---
> OvmfPkg/XenBusDxe/XenStore.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c
> index f176b95..7c272b3 100644
> --- a/OvmfPkg/XenBusDxe/XenStore.c
> +++ b/OvmfPkg/XenBusDxe/XenStore.c
> @@ -69,7 +69,7 @@
>
> typedef struct {
> CONST VOID *Data;
> - UINTN Len;
> + UINT32 Len;
> } WRITE_REQUEST;
>
> /* Register callback to watch subtree (node) in the XenStore. */
> @@ -456,7 +456,7 @@ STATIC
> XENSTORE_STATUS
> XenStoreWriteStore (
> IN CONST VOID *DataPtr,
> - IN UINTN Len
> + IN UINT32 Len
> )
> {
> XENSTORE_RING_IDX Cons, Prod;
> @@ -535,7 +535,7 @@ STATIC
> XENSTORE_STATUS
> XenStoreReadStore (
> OUT VOID *DataPtr,
> - IN UINTN Len
> + IN UINT32 Len
> )
> {
> XENSTORE_RING_IDX Cons, Prod;
> @@ -883,7 +883,7 @@ XenStoreSingle (
> WRITE_REQUEST WriteRequest;
>
> WriteRequest.Data = (VOID *) Body;
> - WriteRequest.Len = AsciiStrSize (Body);
> + WriteRequest.Len = (UINT32)AsciiStrSize (Body);
>
> return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
> LenPtr, Result);
> @@ -912,9 +912,9 @@ XenStoreWatch (
> WRITE_REQUEST WriteRequest[2];
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Token;
> - WriteRequest[1].Len = AsciiStrSize (Token);
> + WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
>
> return XenStoreTalkv (XST_NIL, XS_WATCH, WriteRequest, 2, NULL, NULL);
> }
> @@ -938,9 +938,9 @@ XenStoreUnwatch (
> WRITE_REQUEST WriteRequest[2];
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Token;
> - WriteRequest[1].Len = AsciiStrSize (Token);
> + WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
>
> return XenStoreTalkv (XST_NIL, XS_UNWATCH, WriteRequest, 2, NULL, NULL);
> }
> @@ -1245,9 +1245,9 @@ XenStoreWrite (
> Path = XenStoreJoin (DirectoryPath, Node);
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Str;
> - WriteRequest[1].Len = AsciiStrLen (Str);
> + WriteRequest[1].Len = (UINT32)AsciiStrLen (Str);
>
> Status = XenStoreTalkv (Transaction, XS_WRITE, WriteRequest, 2, NULL, NULL);
> FreePool (Path);
> --
> Anthony PERARD
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2] [PATCH 1/4] OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32.
[not found] ` <1415899632-31802-2-git-send-email-anthony.perard@citrix.com>
2014-11-13 19:05 ` Konrad Rzeszutek Wilk
@ 2014-11-14 16:32 ` Laszlo Ersek
1 sibling, 0 replies; 3+ messages in thread
From: Laszlo Ersek @ 2014-11-14 16:32 UTC (permalink / raw)
To: edk2-devel; +Cc: Xen Devel
On 11/13/14 18:27, Anthony PERARD wrote:
> Since a message to XenStore have a lenght of type UINT32, have
> XenStore.c deal only with UINT32 instead of a mixmatch with UINTN.
>
> This patch replaces the type of Len in WRITE_REQUEST and the type of the
> argument Len of XenStoreWriteStore and XenStoreReadStore.
>
> This patch should avoid to have type cast were it does not make sense to
> have them.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> CC: Xen Devel <xen-devel@lists.xen.org>
> ---
> OvmfPkg/XenBusDxe/XenStore.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c
> index f176b95..7c272b3 100644
> --- a/OvmfPkg/XenBusDxe/XenStore.c
> +++ b/OvmfPkg/XenBusDxe/XenStore.c
> @@ -69,7 +69,7 @@
>
> typedef struct {
> CONST VOID *Data;
> - UINTN Len;
> + UINT32 Len;
> } WRITE_REQUEST;
>
> /* Register callback to watch subtree (node) in the XenStore. */
> @@ -456,7 +456,7 @@ STATIC
> XENSTORE_STATUS
> XenStoreWriteStore (
> IN CONST VOID *DataPtr,
> - IN UINTN Len
> + IN UINT32 Len
> )
> {
> XENSTORE_RING_IDX Cons, Prod;
> @@ -535,7 +535,7 @@ STATIC
> XENSTORE_STATUS
> XenStoreReadStore (
> OUT VOID *DataPtr,
> - IN UINTN Len
> + IN UINT32 Len
> )
> {
> XENSTORE_RING_IDX Cons, Prod;
> @@ -883,7 +883,7 @@ XenStoreSingle (
> WRITE_REQUEST WriteRequest;
>
> WriteRequest.Data = (VOID *) Body;
> - WriteRequest.Len = AsciiStrSize (Body);
> + WriteRequest.Len = (UINT32)AsciiStrSize (Body);
>
> return XenStoreTalkv (Transaction, RequestType, &WriteRequest, 1,
> LenPtr, Result);
> @@ -912,9 +912,9 @@ XenStoreWatch (
> WRITE_REQUEST WriteRequest[2];
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Token;
> - WriteRequest[1].Len = AsciiStrSize (Token);
> + WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
>
> return XenStoreTalkv (XST_NIL, XS_WATCH, WriteRequest, 2, NULL, NULL);
> }
> @@ -938,9 +938,9 @@ XenStoreUnwatch (
> WRITE_REQUEST WriteRequest[2];
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Token;
> - WriteRequest[1].Len = AsciiStrSize (Token);
> + WriteRequest[1].Len = (UINT32)AsciiStrSize (Token);
>
> return XenStoreTalkv (XST_NIL, XS_UNWATCH, WriteRequest, 2, NULL, NULL);
> }
> @@ -1245,9 +1245,9 @@ XenStoreWrite (
> Path = XenStoreJoin (DirectoryPath, Node);
>
> WriteRequest[0].Data = (VOID *) Path;
> - WriteRequest[0].Len = AsciiStrSize (Path);
> + WriteRequest[0].Len = (UINT32)AsciiStrSize (Path);
> WriteRequest[1].Data = (VOID *) Str;
> - WriteRequest[1].Len = AsciiStrLen (Str);
> + WriteRequest[1].Len = (UINT32)AsciiStrLen (Str);
>
> Status = XenStoreTalkv (Transaction, XS_WRITE, WriteRequest, 2, NULL, NULL);
> FreePool (Path);
>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-14 16:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1415899632-31802-1-git-send-email-anthony.perard@citrix.com>
2014-11-13 17:27 ` [PATCH 1/4] OvmfPkg/XenBusDxe: In XenStore, replace type of Len from UINTN to UINT32 Anthony PERARD
[not found] ` <1415899632-31802-2-git-send-email-anthony.perard@citrix.com>
2014-11-13 19:05 ` Konrad Rzeszutek Wilk
2014-11-14 16:32 ` [edk2] " Laszlo Ersek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.