Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1280234 > unrolled thread

Re: [PATCH V5 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem

Started byDavid Miller <davem@davemloft.net>
First post2015-11-30 21:00 +0100
Last post2015-12-02 18:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V5 net-next 1/5] net:hns: Add support of Hip06 SoC to  the Hislicon Network Subsystem David Miller <davem@davemloft.net> - 2015-11-30 21:00 +0100
    Re: [PATCH V5 net-next 1/5] net:hns: Add support of Hip06 SoC to  the Hislicon Network Subsystem Salil Mehta <salil.mehta@huawei.com> - 2015-12-02 18:10 +0100

#1280234 — Re: [PATCH V5 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem

FromDavid Miller <davem@davemloft.net>
Date2015-11-30 21:00 +0100
SubjectRe: [PATCH V5 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem
Message-ID<qACM9-7Uc-1@gated-at.bofh.it>
From: Salil Mehta <salil.mehta@huawei.com>
Date: Thu, 26 Nov 2015 07:14:06 +0000

> -#define ENABLE		(0x1)
> -#define DISABLE		(0x0)
> +#define ENABLE		0x1
> +#define DISABLE		0x0

Defining such common macros names for such incredibly simple boolean values
is asking for trouble, in particular it can possibly collide with other
defines in the global namespace.

Use "true", "false", and the "bool" type, because that is exactly how you
are using these values.

Thanks.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1282058

FromSalil Mehta <salil.mehta@huawei.com>
Date2015-12-02 18:10 +0100
Message-ID<qBj4N-1FO-89@gated-at.bofh.it>
In reply to#1280234
On 11/30/2015 7:50 PM, David Miller wrote:
> From: Salil Mehta <salil.mehta@huawei.com>
> Date: Thu, 26 Nov 2015 07:14:06 +0000
>
>> -#define ENABLE		(0x1)
>> -#define DISABLE		(0x0)
>> +#define ENABLE		0x1
>> +#define DISABLE		0x0
> Defining such common macros names for such incredibly simple boolean values
> is asking for trouble, in particular it can possibly collide with other
> defines in the global namespace.
>
> Use "true", "false", and the "bool" type, because that is exactly how you
> are using these values.
>
> Thanks.
Hi David,
Thanks for your suggestions. I have worked upon the comments and removed 
these macros
and introduced the 'bool' type here as well. I think I missed this in my 
earlier rework. Thanks
again for pointing it out. I have floated new V6 patch for your 
consideration.

Best Regards
Salil
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web