Re: [PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-15 Thread Hans de Goede
Hi, On 07/15/2014 01:19 AM, Keith Packard wrote: Hans de Goede hdego...@redhat.com writes: Note the robustness patch needs to be applied after the fix, otherwise the switch-case in the fix will fail to compile due to a duplicate label. This is better than my version as it effectively

Re: [PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-15 Thread Keith Packard
Hans de Goede hdego...@redhat.com writes: 1) I was not around when the OdevAttributes stuff got added, but I think the idea behind it was to be able to add new atrributes without breaking ABI (as was done this cycle when adding the driver string, although that needed a bit of a fixup). The

Re: [PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-15 Thread Hans de Goede
Hi, On 07/15/2014 11:33 AM, Keith Packard wrote: Hans de Goede hdego...@redhat.com writes: 1) I was not around when the OdevAttributes stuff got added, but I think the idea behind it was to be able to add new atrributes without breaking ABI (as was done this cycle when adding the driver

Re: [PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-15 Thread Keith Packard
Hans de Goede hdego...@redhat.com writes: I think defining 2 inlines for the 2 getter functions is a good idea. I'll see if I can't make sure they provide some level of type safety too. Can you resend the patch as a proper top-level mail with the inlines added? Then I'll review it. Thanks.

[PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-14 Thread Hans de Goede
Hi Keith, Here is a v2 of my odev-attrribute fix patch. The actual patch itself is unchanged. New is the second patch which makes the api robust against storing an int in a string attribute or vice versa. Note the robustness patch needs to be applied after the fix, otherwise the switch-case in

Re: [PATCH v2 0/2] Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

2014-07-14 Thread Keith Packard
Hans de Goede hdego...@redhat.com writes: Note the robustness patch needs to be applied after the fix, otherwise the switch-case in the fix will fail to compile due to a duplicate label. This is better than my version as it effectively types the values explicitly. Thanks! Reviewed-by: Keith