Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928Ab1EHNMu (ORCPT ); Sun, 8 May 2011 09:12:50 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:52100 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746Ab1EHNMr convert rfc822-to-8bit (ORCPT ); Sun, 8 May 2011 09:12:47 -0400 MIME-Version: 1.0 In-Reply-To: References: <1304795706-27308-1-git-send-email-per.forlin@linaro.org> <1304795706-27308-3-git-send-email-per.forlin@linaro.org> Date: Sun, 8 May 2011 15:12:46 +0200 Message-ID: Subject: Re: [PATCH v3 02/12] mmc: mmc_test: add debugfs file to list all tests From: Per Forlin To: Andy Shevchenko Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, Chris Ball Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1612 Lines: 43 On 8 May 2011 00:18, Andy Shevchenko wrote: > On Sat, May 7, 2011 at 10:14 PM, Per Forlin wrote: >> Add a debugfs file "testlist" to print all available tests >> >> Signed-off-by: Per Forlin >> --- >> ?drivers/mmc/card/mmc_test.c | ? 30 ++++++++++++++++++++++++++++++ >> ?1 files changed, 30 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c >> index abc1a63..c1c3c5a 100644 >> --- a/drivers/mmc/card/mmc_test.c >> +++ b/drivers/mmc/card/mmc_test.c > > >> @@ -2476,6 +2502,10 @@ static int mmc_test_register_file_test(struct mmc_card *card) >> ? ? ? ? ? ? ? ?file = debugfs_create_file("test", S_IWUSR | S_IRUGO, >> ? ? ? ? ? ? ? ? ? ? ? ?card->debugfs_root, card, &mmc_test_fops_test); >> >> + ? ? ? if (card->debugfs_root) >> + ? ? ? ? ? ? ? file = debugfs_create_file("testlist", S_IRUGO, >> + ? ? ? ? ? ? ? ? ? ? ? card->debugfs_root, card, &mmc_test_fops_testlist); >> + >> ? ? ? ?if (IS_ERR_OR_NULL(file)) { >> ? ? ? ? ? ? ? ?dev_err(&card->dev, >> ? ? ? ? ? ? ? ? ? ? ? ?"Can't create file. Perhaps debugfs is disabled.\n"); > I think you also need to use similar error path for both files: test > and testlist. Thanks, I'll fix that and add this check for both. > > > -- > With Best Regards, > Andy Shevchenko > Regards, Per -- 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/