[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] Header cleanups qemu_is* macros were moved
From: |
Aruna Jayasena |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] Header cleanups qemu_is* macros were moved from qemu-common.h to qemu/cutils.h |
Date: |
Mon, 1 Apr 2019 22:25:19 +0530 |
Sure, no problem.
On Mon, Apr 1, 2019 at 10:18 PM, Thomas Huth <address@hidden> wrote:
> On 01/04/2019 18.13, Aruna Jayasena wrote:
> > qemu_is* macros were moved from qemu-common.h to qemu/cutils.h
> > This task was under https://wiki.qemu.org/Contribute/BiteSizedTasks
> > * Description was combined with the subject of the email
> >
> > On Mon, 1 Apr 2019 at 21:39, Aruna Jayasena <address@hidden>
> wrote:
> >
> >> Signed-off-by: Aruna Jayasena <address@hidden>
> >> ---
> >> hw/core/qdev-properties.c | 1 +
> >> include/qemu-common.h | 11 -----------
> >> include/qemu/cutils.h | 12 ++++++++++++
> >> qapi/qapi-util.c | 2 +-
> >> util/id.c | 2 +-
> >> 5 files changed, 15 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> >> index 5da1439a8b..821a4ab311 100644
> >> --- a/hw/core/qdev-properties.c
> >> +++ b/hw/core/qdev-properties.c
> >> @@ -10,6 +10,7 @@
> >> #include "qapi/visitor.h"
> >> #include "chardev/char.h"
> >> #include "qemu/uuid.h"
> >> +#include "qemu/cutils.h"
> >>
> >> void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
> >> Error **errp)
> >> diff --git a/include/qemu-common.h b/include/qemu-common.h
> >> index a102245519..0066e45a6b 100644
> >> --- a/include/qemu-common.h
> >> +++ b/include/qemu-common.h
> >> @@ -33,17 +33,6 @@ int qemu_main(int argc, char **argv, char **envp);
> >> void qemu_get_timedate(struct tm *tm, int offset);
> >> int qemu_timedate_diff(struct tm *tm);
> >>
> >> -#define qemu_isalnum(c) isalnum((unsigned char)(c))
> >> -#define qemu_isalpha(c) isalpha((unsigned char)(c))
> >> -#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
> >> -#define qemu_isdigit(c) isdigit((unsigned char)(c))
> >> -#define qemu_isgraph(c) isgraph((unsigned char)(c))
> >> -#define qemu_islower(c) islower((unsigned char)(c))
> >> -#define qemu_isprint(c) isprint((unsigned char)(c))
> >> -#define qemu_ispunct(c) ispunct((unsigned char)(c))
> >> -#define qemu_isspace(c) isspace((unsigned char)(c))
> >> -#define qemu_isupper(c) isupper((unsigned char)(c))
> >> -#define qemu_isxdigit(c) isxdigit((unsigned char)(c))
> >> #define qemu_tolower(c) tolower((unsigned char)(c))
> >> #define qemu_toupper(c) toupper((unsigned char)(c))
> >> #define qemu_isascii(c) isascii((unsigned char)(c))
> >> diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h
> >> index d2dad3057c..797c5bc560 100644
> >> --- a/include/qemu/cutils.h
> >> +++ b/include/qemu/cutils.h
> >> @@ -3,6 +3,18 @@
> >>
> >> #include "qemu/fprintf-fn.h"
> >>
> >> +#define qemu_isalnum(c) isalnum((unsigned char)(c))
> >> +#define qemu_isalpha(c) isalpha((unsigned char)(c))
> >> +#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
> >> +#define qemu_isdigit(c) isdigit((unsigned char)(c))
> >> +#define qemu_isgraph(c) isgraph((unsigned char)(c))
> >> +#define qemu_islower(c) islower((unsigned char)(c))
> >> +#define qemu_isprint(c) isprint((unsigned char)(c))
> >> +#define qemu_ispunct(c) ispunct((unsigned char)(c))
> >> +#define qemu_isspace(c) isspace((unsigned char)(c))
> >> +#define qemu_isupper(c) isupper((unsigned char)(c))
> >> +#define qemu_isxdigit(c) isxdigit((unsigned char)(c))
>
> Hi,
>
> moving the qemu_is* macros around does not make too much sense to
> me... I've now tried to have a closer look at that BiteSizeTask,
> and it sounds to me like something different was meant here instead.
> And indeed, after looking through the QEMU history for a while, I
> spotted this commit here:
>
>
> https://git.qemu.org/?p=qemu.git;a=commitdiff;h=f348b6d1a53e5271cf1c9#patch81
>
> So looks like this task has been handled in the past already and
> apparently we've forgotten to remove it from the BiteSizeTask page
> afterwards. Sorry for this, I'll remove it now...
>
> May I suggest to you to have a look at the "avoid including files from
> include/exec/cpu-common.h" task instead? I think you could remove the
> #include "qemu/bswap.h" and #include "qemu/queue.h" lines in there without
> too much hassle...
>
> Thomas
>
--
*Aruna* Jayasena
Embedded Systems and Computer Science Engineering Undergraduate
University of Moratuwa
*✆ **+94719872152 *
✉ <address@hidden> ⌨ <http://archfx.github.io> in
<https://www.linkedin.com/in/arunajayasena/>