From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
qemu-arm@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 07/14] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf
Date: Mon, 25 Jun 2018 17:32:18 +0200 [thread overview]
Message-ID: <d3a4745c-9bf9-db13-33b2-5542ef7f74b4@redhat.com> (raw)
In-Reply-To: <9ad2df7b-afa2-8470-6353-facdde6b0587@amsat.org>
On 25.06.2018 17:07, Philippe Mathieu-Daudé wrote:
> On 06/25/2018 11:30 AM, Thomas Huth wrote:
>> On 25.06.2018 14:52, Philippe Mathieu-Daudé wrote:
>>> On 06/25/2018 03:08 AM, Thomas Huth wrote:
>>>> On 22.06.2018 22:10, Philippe Mathieu-Daudé wrote:
>>>>> On 06/22/2018 04:38 PM, Thomas Huth wrote:
>>>>>> On 22.06.2018 15:40, Philippe Mathieu-Daudé wrote:
>>>>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>>>>> ---
>>>>>>> hw/i2c/omap_i2c.c | 20 ++++++++++++--------
>>>>>>> 1 file changed, 12 insertions(+), 8 deletions(-)
>>>>>>>
>>>>>>> diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
>>>>>>> index 26e3e5ebf6..690876e43e 100644
>>>>>>> --- a/hw/i2c/omap_i2c.c
>>>>>>> +++ b/hw/i2c/omap_i2c.c
>>>>>>> @@ -17,6 +17,7 @@
>>>>>>> * with this program; if not, see <http://www.gnu.org/licenses/>.
>>>>>>> */
>>>>>>> #include "qemu/osdep.h"
>>>>>>> +#include "qemu/log.h"
>>>>>>> #include "hw/hw.h"
>>>>>>> #include "hw/i2c/i2c.h"
>>>>>>> #include "hw/arm/omap.h"
>>>>>>> @@ -339,14 +340,15 @@ static void omap_i2c_write(void *opaque, hwaddr addr,
>>>>>>> }
>>>>>>> break;
>>>>>>> }
>>>>>>> - if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */
>>>>>>> - fprintf(stderr, "%s: I^2C slave mode not supported\n",
>>>>>>> - __func__);
>>>>>>> + if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */
>>>>>>
>>>>>> Please keep the white spaces before the comment if you don't change
>>>>>> anything else.
>>>>>
>>>>> This is a <tab> and checkpatch complains...
>>>>>
>>>>> I can use 4 spaces for this tab. I tried to align with other tab-aligned
>>>>> comments I didn't modify, but the result is messier. Thus a simple space.
>>>>
>>>> Oh, sorry, I didn't notice that you've replaced a TAB here. I guess it's
>>>> ok then. But why does checkpatch complain if it is just in the context
>>>> of your modification? That's weird.
>>>
>>> The first 2 contexts (MST and XA) are fine, however checkpatch complains
>>> with the last one (ST_EN):
>>>
>>> ERROR: code indent should never use tabs
>>> #38: FILE: hw/i2c/omap_i2c.c:397:
>>> + if (value & (1 << 15)) {^I^I^I^I^I/* ST_EN */$
>>>
>>> Since I replaced this one, I also did with the 2 previous.
>>>
>>> Now I realize I can _not_ add the brackets so I don't have to update the
>>> <tabs>:
>>>
>>> if (value & (1 << 15))^I^I^I^I^I/* ST_EN */
>>> - fprintf(stderr, "%s: System Test not supported\n", __func__);
>>> + qemu_log_mask(LOG_UNIMP,
>>> + "%s: System Test not supported\n", __func__);
>>> break;
>>>
>>> I think if it better to unify the code style when possible, but it is up
>>> to you, if you prefer I can resend with tabs and no brackets.
>>
>> I think it's OK to fix up the coding style here, too. Maybe just mention
>> it in the patch description ("While we're at it, change TABs to spaces
>> and add missing curly braces to the surounding if-statements" or so).
>
> OK. If that's fine with you I won't respin the whole series for this
> comment, but if I have to respin for another reason I'll improve the
> comment.
Fine for me!
Thomas
next prev parent reply other threads:[~2018-06-25 15:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 13:40 [Qemu-devel] [PATCH v2 00/14] hw/arm: use qemu_log_mask instead of fprintf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 01/14] hw/input/pckbd: Use qemu_log_mask(GUEST_ERROR) " Philippe Mathieu-Daudé
2018-06-22 19:24 ` Thomas Huth
2018-06-24 3:48 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 03/14] hw/dma/omap_dma: Use qemu_log_mask(UNIMP) instead of printf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 04/14] hw/dma/omap_dma: Use qemu_log_mask(GUEST_ERROR) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:34 ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 05/14] hw/ssi/omap_spi: " Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 06/14] hw/sd/omap_mmc: Use qemu_log_mask(UNIMP) instead of printf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 07/14] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:38 ` Thomas Huth
2018-06-22 20:10 ` Philippe Mathieu-Daudé
2018-06-25 6:08 ` Thomas Huth
2018-06-25 12:52 ` Philippe Mathieu-Daudé
2018-06-25 14:30 ` Thomas Huth
2018-06-25 15:07 ` Philippe Mathieu-Daudé
2018-06-25 15:32 ` Thomas Huth [this message]
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 08/14] hw/arm/omap1: Use qemu_log_mask(GUEST_ERROR) " Philippe Mathieu-Daudé
2018-06-22 13:48 ` Philippe Mathieu-Daudé
2018-06-22 19:41 ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 09/14] hw/arm/omap: " Philippe Mathieu-Daudé
2018-06-22 19:44 ` Thomas Huth
2018-06-22 20:13 ` Philippe Mathieu-Daudé
2018-06-25 6:10 ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 10/14] hw/arm/stellaris: Use qemu_log_mask(UNIMP) " Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 11/14] hw/net/stellaris_enet: Use qemu_log_mask(GUEST_ERROR) instead of hw_error Philippe Mathieu-Daudé
2018-06-22 19:50 ` Thomas Huth
2018-06-22 20:15 ` Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 12/14] hw/net/smc91c111: " Philippe Mathieu-Daudé
2018-06-22 19:52 ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 13/14] hw/net/smc91c111: Use qemu_log_mask(UNIMP) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:53 ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 14/14] hw/arm/stellaris: Fix gptm_write() error message Philippe Mathieu-Daudé
2018-06-22 19:55 ` Thomas Huth
2018-06-22 20:16 ` Philippe Mathieu-Daudé
[not found] ` <20180622134036.23182-3-f4bug@amsat.org>
2018-06-22 19:30 ` [Qemu-devel] [PATCH v2 02/14] hw/input/tsc2005: Use qemu_log_mask(GUEST_ERROR) instead of fprintf Thomas Huth
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=d3a4745c-9bf9-db13-33b2-5542ef7f74b4@redhat.com \
--to=thuth@redhat.com \
--cc=f4bug@amsat.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).