Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-10 Thread Dan Carpenter
On Fri, May 10, 2019 at 09:13:26AM +, Ardelean, Alexandru wrote: > On Wed, 2019-05-08 at 16:26 +0300, Alexandru Ardelean wrote: > > On Wed, 2019-05-08 at 15:20 +0300, Dan Carpenter wrote: > > > > > > > > > On Wed, May 08, 2019 at 02:28:35PM +0300, Alexandru Ardelean wrote: > > > > -static con

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-09 Thread Ardelean, Alexandru
On Wed, 2019-05-08 at 15:20 +0300, Dan Carpenter wrote: > > > On Wed, May 08, 2019 at 02:28:35PM +0300, Alexandru Ardelean wrote: > > -static const char * const phy_types[] = { > > - "emmc 5.0 phy", > > - "emmc 5.1 phy" > > -}; > > - > > enum xenon_phy_type_enum { > > EMMC_5_0_PHY,

[PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-09 Thread Alexandru Ardelean
The change is also cosmetic, but it also does a tighter coupling between the enums & the string values. This way, the ARRAY_SIZE(phy_types) that is implicitly done in the match_string() macro is also a bit safer. Signed-off-by: Alexandru Ardelean --- drivers/mmc/host/sdhci-xenon-phy.c | 12 +

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-08 Thread Dan Carpenter
On Wed, May 08, 2019 at 02:28:35PM +0300, Alexandru Ardelean wrote: > -static const char * const phy_types[] = { > - "emmc 5.0 phy", > - "emmc 5.1 phy" > -}; > - > enum xenon_phy_type_enum { > EMMC_5_0_PHY, > EMMC_5_1_PHY, > NR_PHY_TYPES There is no need for NR_PHY_TYPES