* [PATCH] fsdev: open brace '{' following struct go on the same line
@ 2020-12-09 6:07 zhouyang
2020-12-09 7:52 ` Philippe Mathieu-Daudé
2020-12-13 16:47 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: zhouyang @ 2020-12-09 6:07 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-trivial, alex.chen, qemu-devel, hunongda
I found some style problems while check the code using checkpatch.pl.
This commit fixs the issue below:
ERROR: open brace '{' following struct go on the same line
Signed-off-by: zhouyang <zhouyang789@huawei.com>
---
fsdev/9p-marshal.h | 12 ++++--------
fsdev/file-op-9p.h | 3 +--
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h
index 8f3babb60a..ceaf2f521e 100644
--- a/fsdev/9p-marshal.h
+++ b/fsdev/9p-marshal.h
@@ -1,21 +1,18 @@
#ifndef QEMU_9P_MARSHAL_H
#define QEMU_9P_MARSHAL_H
-typedef struct V9fsString
-{
+typedef struct V9fsString {
uint16_t size;
char *data;
} V9fsString;
-typedef struct V9fsQID
-{
+typedef struct V9fsQID {
uint8_t type;
uint32_t version;
uint64_t path;
} V9fsQID;
-typedef struct V9fsStat
-{
+typedef struct V9fsStat {
int16_t size;
int16_t type;
int32_t dev;
@@ -35,8 +32,7 @@ typedef struct V9fsStat
int32_t n_muid;
} V9fsStat;
-typedef struct V9fsIattr
-{
+typedef struct V9fsIattr {
int32_t valid;
int32_t mode;
int32_t uid;
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index d51cec2f3b..42f677cf38 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -110,8 +110,7 @@ typedef union V9fsFidOpenState V9fsFidOpenState;
void cred_init(FsCred *);
-struct FileOperations
-{
+struct FileOperations {
int (*parse_opts)(QemuOpts *, FsDriverEntry *, Error **errp);
int (*init)(FsContext *, Error **errp);
void (*cleanup)(FsContext *);
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fsdev: open brace '{' following struct go on the same line
2020-12-09 6:07 [PATCH] fsdev: open brace '{' following struct go on the same line zhouyang
@ 2020-12-09 7:52 ` Philippe Mathieu-Daudé
2020-12-13 16:47 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-09 7:52 UTC (permalink / raw)
To: zhouyang, peter.maydell; +Cc: qemu-trivial, alex.chen, qemu-devel, hunongda
On 12/9/20 7:07 AM, zhouyang wrote:
> I found some style problems while check the code using checkpatch.pl.
> This commit fixs the issue below:
> ERROR: open brace '{' following struct go on the same line
>
> Signed-off-by: zhouyang <zhouyang789@huawei.com>
> ---
> fsdev/9p-marshal.h | 12 ++++--------
> fsdev/file-op-9p.h | 3 +--
> 2 files changed, 5 insertions(+), 10 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fsdev: open brace '{' following struct go on the same line
2020-12-09 6:07 [PATCH] fsdev: open brace '{' following struct go on the same line zhouyang
2020-12-09 7:52 ` Philippe Mathieu-Daudé
@ 2020-12-13 16:47 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-12-13 16:47 UTC (permalink / raw)
To: zhouyang, peter.maydell; +Cc: qemu-trivial, alex.chen, qemu-devel, hunongda
Le 09/12/2020 à 07:07, zhouyang a écrit :
> I found some style problems while check the code using checkpatch.pl.
> This commit fixs the issue below:
> ERROR: open brace '{' following struct go on the same line
>
> Signed-off-by: zhouyang <zhouyang789@huawei.com>
> ---
> fsdev/9p-marshal.h | 12 ++++--------
> fsdev/file-op-9p.h | 3 +--
> 2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h
> index 8f3babb60a..ceaf2f521e 100644
> --- a/fsdev/9p-marshal.h
> +++ b/fsdev/9p-marshal.h
> @@ -1,21 +1,18 @@
> #ifndef QEMU_9P_MARSHAL_H
> #define QEMU_9P_MARSHAL_H
>
> -typedef struct V9fsString
> -{
> +typedef struct V9fsString {
> uint16_t size;
> char *data;
> } V9fsString;
>
> -typedef struct V9fsQID
> -{
> +typedef struct V9fsQID {
> uint8_t type;
> uint32_t version;
> uint64_t path;
> } V9fsQID;
>
> -typedef struct V9fsStat
> -{
> +typedef struct V9fsStat {
> int16_t size;
> int16_t type;
> int32_t dev;
> @@ -35,8 +32,7 @@ typedef struct V9fsStat
> int32_t n_muid;
> } V9fsStat;
>
> -typedef struct V9fsIattr
> -{
> +typedef struct V9fsIattr {
> int32_t valid;
> int32_t mode;
> int32_t uid;
> diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
> index d51cec2f3b..42f677cf38 100644
> --- a/fsdev/file-op-9p.h
> +++ b/fsdev/file-op-9p.h
> @@ -110,8 +110,7 @@ typedef union V9fsFidOpenState V9fsFidOpenState;
>
> void cred_init(FsCred *);
>
> -struct FileOperations
> -{
> +struct FileOperations {
> int (*parse_opts)(QemuOpts *, FsDriverEntry *, Error **errp);
> int (*init)(FsContext *, Error **errp);
> void (*cleanup)(FsContext *);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-13 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 6:07 [PATCH] fsdev: open brace '{' following struct go on the same line zhouyang
2020-12-09 7:52 ` Philippe Mathieu-Daudé
2020-12-13 16:47 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).