All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Rob Herring <robherring2@gmail.com>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH v2 0/3] EDAC support for Calxeda Highbank
Date: Wed, 13 Jun 2012 12:36:22 -0300	[thread overview]
Message-ID: <4FD8B376.5030006@redhat.com> (raw)
In-Reply-To: <4FD8AA3C.6090100@gmail.com>

Hi Rob,


Em 13-06-2012 11:57, Rob Herring escreveu:
> Mauro,
> 
> On 06/12/2012 08:24 AM, Mauro Carvalho Chehab wrote:
>> Hi Rob,
>>
>> Em 11-06-2012 23:32, Rob Herring escreveu:
>>> From: Rob Herring <rob.herring@calxeda.com>
>>>
>>> This series adds EDAC support for Calxeda Highbank platform L2 and
>>> memory ECC hardware.
>>>
>>> This version is rebased current edac next tree for 3.6. Changes in
>>> this version are the addition of a common edac debugfs directory and
>>> coverting the highbank error injection to use debugfs.
>>
>> Thanks for the patches.
>>
>> It looks OK on my eyes, with regards to the EDAC API usage. While this patch
>> touches at the arm/devicetree stuff, most of the changes belong to EDAC, so
>> I'll apply them with my SOB on my tree.
>>
> 
> I found a build error when EDAC_DEBUG is turned off.
> 
> drivers/edac/highbank_mc_edac.c: In function 'highbank_mc_probe':
> drivers/edac/highbank_mc_edac.c:215:9: error: 'struct mem_ctl_info' has no member named 'debugfs'
> drivers/edac/highbank_mc_edac.c:216:50: error: 'struct mem_ctl_info' has no member named 'debugfs'
> drivers/edac/highbank_mc_edac.c:218:10: error: 'highbank_mc_debug_inject_fops' undeclared (first use in this function)
> 
> 
> Do you prefer I respin the patch or do you want a follow on patch?

Both approaches work for me. As such patch fixes a compilation bug, fixing the existing
patch is preferred.

> This is what the fix looks like:
> 
> diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c
> index d00dc0b..3185961 100644
> --- a/drivers/edac/highbank_mc_edac.c
> +++ b/drivers/edac/highbank_mc_edac.c
> @@ -124,6 +124,22 @@ static const struct file_operations highbank_mc_debug_inject_fops = {
>          .write = highbank_mc_err_inject_write,
>          .llseek = generic_file_llseek,
>   };
> +
> +static int __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
> +{
> +       if (!mci->debugfs)
> +               return -ENODEV;
> +
> +       debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci,
> +                           &highbank_mc_debug_inject_fops);
> +
> +       return 0;
> +}
> +#else
> +static int __devinit highbank_mc_create_debugfs_nodes(struct mem_ctl_info *mci)
> +{
> +       return -ENODEV;
> +}
>   #endif
>   
>   static int __devinit highbank_mc_probe(struct platform_device *pdev)
> @@ -212,10 +228,7 @@ static int __devinit highbank_mc_probe(struct platform_device *pdev)
>          if (res < 0)
>                  goto err;
>   
> -       if (mci->debugfs)
> -               debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs,
> -                                   mci,
> -                                   &highbank_mc_debug_inject_fops);
> +       highbank_mc_create_debugfs_nodes(mci);

I would just declare the function as void, as you're not using the returned argument.

>   
>          devres_close_group(&pdev->dev, NULL);
>          return 0;
> 
> 
> Rob
> 
>> Regards,
>> Mauro.
>>>
>>> Rob
>>>
>>> Rob Herring (3):
>>>     edac: create top-level debugfs directory
>>>     edac: add support for Calxeda highbank memory controller
>>>     edac: add support for Calxeda highbank L2 cache ecc
>>>
>>>    .../devicetree/bindings/arm/calxeda/l2ecc.txt      |   17 ++
>>>    .../devicetree/bindings/arm/calxeda/mem-ctrlr.txt  |   17 ++
>>>    arch/arm/boot/dts/highbank.dts                     |   12 +
>>>    drivers/edac/Kconfig                               |   16 +-
>>>    drivers/edac/Makefile                              |    4 +
>>>    drivers/edac/edac_mc_sysfs.c                       |   23 +-
>>>    drivers/edac/edac_module.c                         |    3 +
>>>    drivers/edac/edac_module.h                         |   14 ++
>>>    drivers/edac/highbank_l2_edac.c                    |  149 ++++++++++++
>>>    drivers/edac/highbank_mc_edac.c                    |  256 ++++++++++++++++++++
>>>    10 files changed, 509 insertions(+), 2 deletions(-)
>>>    create mode 100644 Documentation/devicetree/bindings/arm/calxeda/l2ecc.txt
>>>    create mode 100644 Documentation/devicetree/bindings/arm/calxeda/mem-ctrlr.txt
>>>    create mode 100644 drivers/edac/highbank_l2_edac.c
>>>    create mode 100644 drivers/edac/highbank_mc_edac.c
>>>
>>
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-edac" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2012-06-13 15:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12  2:32 [PATCH v2 0/3] EDAC support for Calxeda Highbank Rob Herring
2012-06-12  2:32 ` Rob Herring
     [not found] ` <1339468334-9927-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-12  2:32   ` [PATCH 1/3] edac: create top-level debugfs directory Rob Herring
2012-06-12  2:32     ` Rob Herring
2012-06-12  2:32   ` [PATCH v2 2/3] edac: add support for Calxeda highbank memory controller Rob Herring
2012-06-12  2:32     ` Rob Herring
2012-06-13 17:01     ` [PATCH v3] " Rob Herring
2012-06-26 13:45       ` Rob Herring
2012-06-27 12:13         ` Mauro Carvalho Chehab
2012-06-12  2:32   ` [PATCH v2 3/3] edac: add support for Calxeda highbank L2 cache ecc Rob Herring
2012-06-12  2:32     ` Rob Herring
2012-06-12 13:24 ` [PATCH v2 0/3] EDAC support for Calxeda Highbank Mauro Carvalho Chehab
     [not found]   ` <4FD7430B.6010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-06-13 14:57     ` Rob Herring
2012-06-13 14:57       ` Rob Herring
2012-06-13 15:36       ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD8B376.5030006@redhat.com \
    --to=mchehab@redhat.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.