All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: fix wmi service bitmap debug
Date: Fri, 8 Aug 2014 14:13:10 +0300	[thread overview]
Message-ID: <87mwbfxmih.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQkF3+-1ded_dj63BGH7-bdD_uxLSkTZjGMb654yPzbtnA@mail.gmail.com> (Michal Kazior's message of "Fri, 8 Aug 2014 12:24:48 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

>> Based on Joe's suggestion, I'm planning to change the macro like below.
>> Are you ok with that?
>>
>> It actually adds a new checkpatch warning but I'm going to ignore that
>> for now:
>>
>> drivers/net/wireless/ath/ath10k/wmi.h:177: ERROR: Macros with complex values should be enclosed in parenthesis
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
>> index 109ea684f88f..e70836586756 100644
>> --- a/drivers/net/wireless/ath/ath10k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
>> @@ -174,46 +174,48 @@ enum wmi_main_service {
>>
>>  static inline char *wmi_service_name(int service_id)
>>  {
>> -#define SVCSTR(x) { case x: return #x; }
>> +#define SVCSTR(x) case x: return #x
>> +
> [...]
>
> This was the checkpatch warning I originally fixed by using { .. } :-)

Hehe, I was actually thinking maybe that's why you added the braces :)

> Anyway, I don't see a problem with the macro change you suggest.
> Apparently we're doomed to have a checkpatch warning either way unless
> we don't use a macro at all.

Yeah. And it's not like that we need to have 0 checkpatch warnings. For
example, I already have a long list of errors I ignore:

MSLEEP,USLEEP_RANGE,PRINTK_WITHOUT_KERN_LEVEL,NETWORKING_BLOCK_COMMENT_STYLE,LINUX_VERSION_CODE,COMPLEX_MACRO

checkpatch just a good tool to catch some of the style issues and makes
my work easier, especially when newbies send patches.

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: fix wmi service bitmap debug
Date: Fri, 8 Aug 2014 14:13:10 +0300	[thread overview]
Message-ID: <87mwbfxmih.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQkF3+-1ded_dj63BGH7-bdD_uxLSkTZjGMb654yPzbtnA@mail.gmail.com> (Michal Kazior's message of "Fri, 8 Aug 2014 12:24:48 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

>> Based on Joe's suggestion, I'm planning to change the macro like below.
>> Are you ok with that?
>>
>> It actually adds a new checkpatch warning but I'm going to ignore that
>> for now:
>>
>> drivers/net/wireless/ath/ath10k/wmi.h:177: ERROR: Macros with complex values should be enclosed in parenthesis
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
>> index 109ea684f88f..e70836586756 100644
>> --- a/drivers/net/wireless/ath/ath10k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
>> @@ -174,46 +174,48 @@ enum wmi_main_service {
>>
>>  static inline char *wmi_service_name(int service_id)
>>  {
>> -#define SVCSTR(x) { case x: return #x; }
>> +#define SVCSTR(x) case x: return #x
>> +
> [...]
>
> This was the checkpatch warning I originally fixed by using { .. } :-)

Hehe, I was actually thinking maybe that's why you added the braces :)

> Anyway, I don't see a problem with the macro change you suggest.
> Apparently we're doomed to have a checkpatch warning either way unless
> we don't use a macro at all.

Yeah. And it's not like that we need to have 0 checkpatch warnings. For
example, I already have a long list of errors I ignore:

MSLEEP,USLEEP_RANGE,PRINTK_WITHOUT_KERN_LEVEL,NETWORKING_BLOCK_COMMENT_STYLE,LINUX_VERSION_CODE,COMPLEX_MACRO

checkpatch just a good tool to catch some of the style issues and makes
my work easier, especially when newbies send patches.

-- 
Kalle Valo

  reply	other threads:[~2014-08-08 11:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 10:03 [PATCH] ath10k: fix wmi service bitmap debug Michal Kazior
2014-07-29 10:03 ` Michal Kazior
2014-08-02  6:39 ` Kalle Valo
2014-08-02  6:39   ` Kalle Valo
2014-08-02  6:59   ` Joe Perches
2014-08-02  6:59     ` Joe Perches
2014-08-02  8:02     ` Kalle Valo
2014-08-02  8:02       ` Kalle Valo
2014-08-08 10:11 ` Kalle Valo
2014-08-08 10:11   ` Kalle Valo
2014-08-08 10:24   ` Michal Kazior
2014-08-08 10:24     ` Michal Kazior
2014-08-08 11:13     ` Kalle Valo [this message]
2014-08-08 11:13       ` Kalle Valo
2014-08-12  7:44 ` Kalle Valo
2014-08-12  7:44   ` Kalle Valo
2014-08-19  7:46   ` Michal Kazior
2014-08-19  7:46     ` Michal Kazior
2014-08-19  9:49     ` Kalle Valo
2014-08-19  9:49       ` Kalle Valo

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=87mwbfxmih.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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: link
Be 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.