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


Groups > linux.kernel > #1174732 > unrolled thread

RE: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

Started by"Fujinaka, Todd" <todd.fujinaka@intel.com>
First post2015-06-30 22:20 +0200
Last post2015-06-30 23:00 +0200
Articles 4 — 4 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: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo  sizeof(a)/sizeof(a[0]) "Fujinaka, Todd" <todd.fujinaka@intel.com> - 2015-06-30 22:20 +0200
    Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo  sizeof(a)/sizeof(a[0]) Richard Weinberger <richard@nod.at> - 2015-06-30 22:30 +0200
    Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0]) Alex Gartrell <alexgartrell@gmail.com> - 2015-06-30 22:40 +0200
    Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo  sizeof(a)/sizeof(a[0]) Joe Perches <joe@perches.com> - 2015-06-30 23:00 +0200

#1174732 — RE: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

From"Fujinaka, Todd" <todd.fujinaka@intel.com>
Date2015-06-30 22:20 +0200
SubjectRE: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])
Message-ID<pHaaB-3Zz-1@gated-at.bofh.it>
U29ycnkgZm9yIHRoZSB0b3AtcG9zdGluZywgYnV0IEknbSBwcm92aWRlZCB3aXRoIHRoZSB0b29s
cyB0aGV5IGdpdmUgbWUgYW5kIGJvdHRvbSBwb3N0aW5nIGZyb20gT3V0bG9vayBqdXN0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ZXIgdGhhbiBvcGVuIGNvZGVkIHN0dWZmLg0KTGludXgncyBBUlJBWV9TSVpFIGFs
c28gbWFrZXMgc3VyZSB0aGF0IHRoZSBwYXNzZWQgdmFyaWFibGUgaXMgYWN0dWFsbHkgYW4gYXJy
YXkuDQoNCi0tDQpUaGFua3MsDQovL3JpY2hhcmQNCg==
--
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]


#1174749

FromRichard Weinberger <richard@nod.at>
Date2015-06-30 22:30 +0200
Message-ID<pHakj-4aX-43@gated-at.bofh.it>
In reply to#1174732
Hi!

Am 30.06.2015 um 22:16 schrieb Fujinaka, Todd:
> Sorry for the top-posting, but I'm provided with the tools they give me and bottom posting from Outlook just confuses email threads. Plus, this was crossposted all over creation and cc-ed to anyone with an intel address.
> 
> I still would say no if I'm allowed, because to guarantee that this change - that I don't think fixes anything - works in all cases, we need to do an incredible amount of regression testing. Every variant of every Intel part that uses this driver (and there are many) should be tested and will end up being used by the community.
> 
> Plus, you have no idea the number of obscure bugs I have to deal with as the guy answering customer questions. If this triggers some odd embedded compiler bug, I'm going to have to dig it out. Unless there is an actual bug, I'd like to leave it as it is.

If you don't dare to touch your driver please update it's maintenance status.
"Supported" is definitely not the case, maybe "Odd fixes" would fit better.

Thanks,
//richard
--
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] | [next] | [standalone]


#1174751 — Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

FromAlex Gartrell <alexgartrell@gmail.com>
Date2015-06-30 22:40 +0200
SubjectRe: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])
Message-ID<pHatX-4mh-3@gated-at.bofh.it>
In reply to#1174732
On Tue, Jun 30, 2015 at 1:16 PM, Fujinaka, Todd <todd.fujinaka@intel.com> wrote:

> I still would say no if I'm allowed, because to guarantee that this change - that I don't think fixes anything - works in all cases, we need to do an incredible amount of regression testing. Every variant of every Intel part that uses this driver (and there are many) should be tested and will end up being used by the community.
>

Validation is really simple: diff old_module.ko new_module.ko

And this is a good defensive measure, as it'll save you when someone
screws up and changes your array to a pointer to an array (you'll get
a build failure instead of 0).

-- 
Alex Gartrell <agartrell@fb.com>
--
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] | [next] | [standalone]


#1174754

FromJoe Perches <joe@perches.com>
Date2015-06-30 23:00 +0200
Message-ID<pHaNj-4Jb-5@gated-at.bofh.it>
In reply to#1174732
On Tue, 2015-06-30 at 20:16 +0000, Fujinaka, Todd wrote:
> Sorry for the top-posting, but I'm provided with the tools they give me
> and bottom posting from Outlook just confuses email threads. Plus, this
> was crossposted all over creation and cc-ed to anyone with an intel
> address.

Not quite.  It was posted to the names listed under the
MAINTAINERS entry.

INTEL ETHERNET DRIVERS
M:	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
R:	Jesse Brandeburg <jesse.brandeburg@intel.com>
R:	Shannon Nelson <shannon.nelson@intel.com>
R:	Carolyn Wyborny <carolyn.wyborny@intel.com>
R:	Don Skidmore <donald.c.skidmore@intel.com>
R:	Matthew Vick <matthew.vick@intel.com>
R:	John Ronciak <john.ronciak@intel.com>
R:	Mitch Williams <mitch.a.williams@intel.com>
L:	intel-wired-lan@lists.osuosl.org

btw: You aren't listed there Todd.  Should you be?

> I still would say no if I'm allowed, because to guarantee that this
> change - that I don't think fixes anything

Simplicity for the reader is generally a good thing.
Removing the macros altogether is likely better.

>  - works in all cases, we
> need to do an incredible amount of regression testing.

Compilers should not produce different object code.
Verification of no object changes should be good enough.

> Every variant of
> every Intel part that uses this driver (and there are many) should be
> tested and will end up being used by the community.
> 
> Plus, you have no idea the number of obscure bugs I have to deal with
> as the guy answering customer questions. If this triggers some odd
> embedded compiler bug, I'm going to have to dig it out. Unless there is
> an actual bug, I'd like to leave it as it is.

If any compiler miscompiles the ARRAY_SIZE macro, there are bound to
be real issues with using that compiler in a production environment.


--
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