Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Arnd Bergmann
On Tue, May 23, 2017 at 1:22 PM, Ulf Hansson wrote: > [...] > > +#if IS_ENABLED(CONFIG_MMC_BLOCK) What wrong with a regular ifdefs stubs? Why do you need IS_ENABLED()? >>> >>> This is because the entire block layer can be compiled as a >>> module. >> >> The block layer cannot be a mo

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Ulf Hansson
[...] +#if IS_ENABLED(CONFIG_MMC_BLOCK) >>> >>> What wrong with a regular ifdefs stubs? Why do you need IS_ENABLED()? >> >> This is because the entire block layer can be compiled as a >> module. > > The block layer cannot be a module, but the MMC layer can. > >> I'm all for making CONFIG_MMC_

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Ulf Hansson
[...] >> Seems like a bit of re-factoring/cleanup could help here as >> preparation step. I just posted a patch [1] cleaning up how the mmc >> block layer fetches the card's status. >> >> Perhaps that could at least simplify a bit for $subject patch, >> especially since it also makes mmc_send_stat

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Arnd Bergmann
On Tue, May 23, 2017 at 11:49 AM, Linus Walleij wrote: > On Mon, May 22, 2017 at 9:42 AM, Ulf Hansson wrote: >> On 19 May 2017 at 15:37, Linus Walleij wrote: > >>> The debugfs file "status" (in e.g. /debug/mmc3/mmc3:0001) is >>> only available if and only if the card used is an (e)MMC or >>> SD

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Christoph Hellwig
On Tue, May 23, 2017 at 11:49:48AM +0200, Linus Walleij wrote: > In that case CONFIG_MMC_BLOCK contains 'm' instead of 'y' > which confusingly does not evaluate to true in the preprocessor > (it assumes it is a misspelled 'n' I guess). > > And then the autobuilders wreak havoc. > > And that is wh

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-23 Thread Linus Walleij
On Mon, May 22, 2017 at 9:42 AM, Ulf Hansson wrote: > On 19 May 2017 at 15:37, Linus Walleij wrote: >> The debugfs file "status" (in e.g. /debug/mmc3/mmc3:0001) is >> only available if and only if the card used is an (e)MMC or >> SD card, not for SDIO, as can be seen from this guard in >> mmc_ad

Re: [PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-22 Thread Ulf Hansson
On 19 May 2017 at 15:37, Linus Walleij wrote: > The debugfs file "status" (in e.g. /debug/mmc3/mmc3:0001) is > only available if and only if the card used is an (e)MMC or > SD card, not for SDIO, as can be seen from this guard in > mmc_add_card_debugfs(); > > if (mmc_card_mmc(card) || mmc_card_sd(