Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-11-09 Thread Nathan Chancellor
On Fri, Nov 09, 2018 at 10:29:02AM +0100, Linus Walleij wrote: > On Thu, Nov 1, 2018 at 1:03 AM Nathan Chancellor > wrote: > > [Me] > > > A slightly lesser evil variant is to add a few PIN_CONFIG_CUSTOM_1 > > > PIN_CONFIG_CUSTOM_2 etc at the end of the enum and just > > > #define MY_CONFIG PIN_CON

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-11-09 Thread Linus Walleij
On Thu, Nov 1, 2018 at 1:03 AM Nathan Chancellor wrote: > [Me] > > A slightly lesser evil variant is to add a few PIN_CONFIG_CUSTOM_1 > > PIN_CONFIG_CUSTOM_2 etc at the end of the enum and just > > #define MY_CONFIG PIN_CONFIG_CUSTOM_1 > > in all drivers that use these. > > > > Some drivers actual

RE: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-11-01 Thread David Laight
From: Nathan Chancellor > Sent: 01 November 2018 00:04 ... > > A slightly lesser evil variant is to add a few PIN_CONFIG_CUSTOM_1 > > PIN_CONFIG_CUSTOM_2 etc at the end of the enum and just > > #define MY_CONFIG PIN_CONFIG_CUSTOM_1 > > in all drivers that use these. > > > > Some drivers actually j

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-10-31 Thread Nathan Chancellor
On Wed, Oct 31, 2018 at 02:33:24PM +0100, Linus Walleij wrote: > On Thu, Oct 25, 2018 at 11:04 PM Nathan Chancellor > wrote: > > > In my opinion, there are enough of these warnings to warrant changing > > the type of param globally (arm64 allyesconfig): > > Yeah as it is from the compiler, sure

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-10-31 Thread Linus Walleij
On Thu, Oct 25, 2018 at 11:04 PM Nathan Chancellor wrote: > In my opinion, there are enough of these warnings to warrant changing > the type of param globally (arm64 allyesconfig): Yeah as it is from the compiler, sure we need to get rid of it. > Linus, did you have any other objections to this

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-10-25 Thread Nathan Chancellor
On Tue, Sep 25, 2018 at 09:23:09AM -0700, Nick Desaulniers wrote: > On Tue, Sep 25, 2018 at 9:15 AM Nathan Chancellor > wrote: > > > > On Tue, Sep 25, 2018 at 12:58:16PM +0200, Linus Walleij wrote: > > > On Tue, Sep 25, 2018 at 8:19 AM Nathan Chancellor > > > wrote: > > > > > > > Clang warns when

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-09-25 Thread Nick Desaulniers
On Tue, Sep 25, 2018 at 9:15 AM Nathan Chancellor wrote: > > On Tue, Sep 25, 2018 at 12:58:16PM +0200, Linus Walleij wrote: > > On Tue, Sep 25, 2018 at 8:19 AM Nathan Chancellor > > wrote: > > > > > Clang warns when one enumerated type is implicitly converted to another, > > > which happens sever

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-09-25 Thread Nathan Chancellor
On Tue, Sep 25, 2018 at 12:58:16PM +0200, Linus Walleij wrote: > On Tue, Sep 25, 2018 at 8:19 AM Nathan Chancellor > wrote: > > > Clang warns when one enumerated type is implicitly converted to another, > > which happens several times in the pinctrl drivers for a few reasons: > > > > * The PCONFD

Re: [PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-09-25 Thread Linus Walleij
On Tue, Sep 25, 2018 at 8:19 AM Nathan Chancellor wrote: > Clang warns when one enumerated type is implicitly converted to another, > which happens several times in the pinctrl drivers for a few reasons: > > * The PCONFDUMP macro, which sets the param member in pin_config_item. > * The pinconf_ge

[PATCH] pinctrl: generic: Avoid several implicit enum conversions

2018-09-24 Thread Nathan Chancellor
Clang warns when one enumerated type is implicitly converted to another, which happens several times in the pinctrl drivers for a few reasons: * The PCONFDUMP macro, which sets the param member in pin_config_item. * The pinconf_generic_params structure, which is used by drivers to configure thei