From: Alistair Francis <alistair23@gmail.com> To: Peter Maydell <peter.maydell@linaro.org> Cc: Eric Blake <eblake@redhat.com>, Alistair Francis <alistair.francis@xilinx.com>, QEMU Developers <qemu-devel@nongnu.org>, Stefano Stabellini <sstabellini@kernel.org>, Fam Zheng <famz@redhat.com>, Qemu-block <qemu-block@nongnu.org>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Markus Armbruster <armbru@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, qemu-arm <qemu-arm@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Yongbok Kim <yongbok.kim@imgtec.com>, "open list:X86" <xen-devel@lists.xenproject.org>, John Snow <jsnow@redhat.com>, Aurelien Jarno <aurelien@aurel32.net> Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH v1 1/8] Replace all occurances of __FUNCTION__ with __func__ Date: Thu, 28 Sep 2017 15:37:55 -0700 [thread overview] Message-ID: <CAKmqyKM9e2R2f3BorZJ9R1XMaAwNRxvCEPGrSm3Jh=O=PnJ-_A@mail.gmail.com> (raw) In-Reply-To: <CAFEAcA_G8Md3k6EAqoN1=GCcXoCq_8vAUZ_qjOZp5GbnnfmcrA@mail.gmail.com> On Wed, Sep 27, 2017 at 4:47 PM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 26 September 2017 at 06:32, Eric Blake <eblake@redhat.com> wrote: >> On 09/25/2017 07:08 PM, Alistair Francis wrote: >>> diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c >>> index 58005b6619..32687afced 100644 >>> --- a/hw/arm/nseries.c >>> +++ b/hw/arm/nseries.c >>> @@ -463,7 +463,7 @@ static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len) >>> uint8_t ret; >>> >>> if (len > 9) { >>> - hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len); >>> + hw_error("%s: FIXME: bad SPI word width %i\n", __func__, len); >> >> Not this patch's problem, but it would probably be simpler if hw_error() >> were a macro that automatically prefixed __func__, rather than making >> every caller have to supply it themselves. > > I'm not sure there's a great deal of benefit to that change, because > use of hw_error() in new code is rarely correct (it does an abort() > so it should never be used for guest-triggered conditions, which is > about the only time that you might be interested in a guest register > dump rather than just asserting). Most of its existing uses are in > crufty old device models. Ok, another excuse to leave it out :) Thanks, Alistair > > thanks > -- PMM
WARNING: multiple messages have this Message-ID (diff)
From: Alistair Francis <alistair23@gmail.com> To: Peter Maydell <peter.maydell@linaro.org> Cc: Stefano Stabellini <sstabellini@kernel.org>, Fam Zheng <famz@redhat.com>, Qemu-block <qemu-block@nongnu.org>, Juan Quintela <quintela@redhat.com>, Markus Armbruster <armbru@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, QEMU Developers <qemu-devel@nongnu.org>, Alistair Francis <alistair.francis@xilinx.com>, John Snow <jsnow@redhat.com>, Yongbok Kim <yongbok.kim@imgtec.com>, qemu-arm <qemu-arm@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, "open list:X86" <xen-devel@lists.xenproject.org>, Eric Blake <eblake@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com> Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v1 1/8] Replace all occurances of __FUNCTION__ with __func__ Date: Thu, 28 Sep 2017 15:37:55 -0700 [thread overview] Message-ID: <CAKmqyKM9e2R2f3BorZJ9R1XMaAwNRxvCEPGrSm3Jh=O=PnJ-_A@mail.gmail.com> (raw) In-Reply-To: <CAFEAcA_G8Md3k6EAqoN1=GCcXoCq_8vAUZ_qjOZp5GbnnfmcrA@mail.gmail.com> On Wed, Sep 27, 2017 at 4:47 PM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 26 September 2017 at 06:32, Eric Blake <eblake@redhat.com> wrote: >> On 09/25/2017 07:08 PM, Alistair Francis wrote: >>> diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c >>> index 58005b6619..32687afced 100644 >>> --- a/hw/arm/nseries.c >>> +++ b/hw/arm/nseries.c >>> @@ -463,7 +463,7 @@ static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len) >>> uint8_t ret; >>> >>> if (len > 9) { >>> - hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len); >>> + hw_error("%s: FIXME: bad SPI word width %i\n", __func__, len); >> >> Not this patch's problem, but it would probably be simpler if hw_error() >> were a macro that automatically prefixed __func__, rather than making >> every caller have to supply it themselves. > > I'm not sure there's a great deal of benefit to that change, because > use of hw_error() in new code is rarely correct (it does an abort() > so it should never be used for guest-triggered conditions, which is > about the only time that you might be interested in a guest register > dump rather than just asserting). Most of its existing uses are in > crufty old device models. Ok, another excuse to leave it out :) Thanks, Alistair > > thanks > -- PMM _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-28 22:38 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-09-26 0:08 [Qemu-devel] [PATCH v1 0/8] Remove some of the fprintf(stderr, "* Alistair Francis 2017-09-26 0:08 ` [Qemu-devel] [PATCH v1 1/8] Replace all occurances of __FUNCTION__ with __func__ Alistair Francis 2017-09-26 0:08 ` Alistair Francis 2017-09-26 13:32 ` [Qemu-devel] " Eric Blake 2017-09-26 13:32 ` Eric Blake 2017-09-27 22:59 ` Alistair Francis 2017-09-27 22:59 ` Alistair Francis 2017-09-27 23:47 ` [Qemu-devel] [Qemu-arm] " Peter Maydell 2017-09-28 22:37 ` Alistair Francis [this message] 2017-09-28 22:37 ` [Qemu-arm] [Qemu-devel] " Alistair Francis 2017-09-27 23:47 ` Peter Maydell 2017-09-26 0:08 ` [Qemu-devel] [PATCH v1 2/8] tests: Replace fprintf(stderr, "*\n" with error_report() Alistair Francis 2017-09-26 0:55 ` Emilio G. Cota 2017-09-26 14:03 ` Eric Blake 2017-09-27 23:08 ` Alistair Francis 2017-09-28 17:53 ` Emilio G. Cota 2017-09-26 0:08 ` [Qemu-devel] [PATCH v1 3/8] hw: " Alistair Francis 2017-09-26 0:08 ` Alistair Francis 2017-09-26 3:51 ` [Qemu-devel] " Thomas Huth 2017-09-27 22:41 ` Alistair Francis 2017-09-27 22:41 ` Alistair Francis 2017-09-26 3:51 ` Thomas Huth 2017-09-26 0:08 ` [Qemu-devel] [PATCH v1 4/8] block: " Alistair Francis 2017-09-26 0:09 ` [Qemu-devel] [PATCH v1 5/8] util: " Alistair Francis 2017-09-26 0:09 ` [Qemu-devel] [PATCH v1 6/8] ui: " Alistair Francis 2017-09-26 0:09 ` [Qemu-devel] [PATCH v1 7/8] tcg: " Alistair Francis 2017-09-26 15:05 ` Richard Henderson 2017-09-26 0:09 ` [Qemu-devel] [PATCH v1 8/8] target: " Alistair Francis 2017-09-26 4:08 ` Thomas Huth 2017-09-29 18:12 ` Alistair Francis 2017-09-26 15:21 ` Richard Henderson 2017-09-26 0:27 ` [Qemu-devel] [PATCH v1 0/8] Remove some of the fprintf(stderr, "* no-reply 2017-09-26 0:42 ` no-reply 2017-09-26 9:05 ` Stefan Hajnoczi 2017-09-26 16:47 ` Alistair Francis
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAKmqyKM9e2R2f3BorZJ9R1XMaAwNRxvCEPGrSm3Jh=O=PnJ-_A@mail.gmail.com' \ --to=alistair23@gmail.com \ --cc=alistair.francis@xilinx.com \ --cc=anthony.perard@citrix.com \ --cc=armbru@redhat.com \ --cc=aurelien@aurel32.net \ --cc=dgilbert@redhat.com \ --cc=eblake@redhat.com \ --cc=famz@redhat.com \ --cc=jsnow@redhat.com \ --cc=kraxel@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-arm@nongnu.org \ --cc=qemu-block@nongnu.org \ --cc=qemu-devel@nongnu.org \ --cc=quintela@redhat.com \ --cc=sstabellini@kernel.org \ --cc=stefanha@redhat.com \ --cc=xen-devel@lists.xenproject.org \ --cc=yongbok.kim@imgtec.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.