lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200408071022.ft6aamptrxlaz23f@rric.localdomain>
Date:   Wed, 8 Apr 2020 09:10:23 +0200
From:   Robert Richter <rrichter@...vell.com>
To:     "tangbin@...s.chinamobile.com" <tangbin@...s.chinamobile.com>
CC:     "thor.thayer@...ux.intel.com" <thor.thayer@...ux.intel.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "james.morse@....com" <james.morse@....com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] EDAC/altera:Use platform_get_irq_optional()

On 02.04.20 21:06:32, tangbin@...s.chinamobile.com wrote:
>         Thank you for you replay,what I want to say is:We don't need dev_err()
> message because when something goes wrong, platform_get_irq() has print an
> error message itself, so we could remove duplicate dev_err() here , or use 
> platform_get_irq_optional() instead. Thank you very much!

Please, do not top-post. See Boris' link in his footer:

 https://people.kernel.org/tglx/notes-about-netiquette

See, now your answer is out of context.

What is wrong having 2 error messages? You want to know of the error
as early as possible and see the causal chain of the error. Hiding it
makes an analysis harder. Errors should happen rarely, so why save a
line in dmesg here? In your case, the irq is not optional, it is
required. So something is wrong if it fails.

Thanks,

-Robert

> 
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> tangbin@...s.chinamobile.com
> 
>      
>     From: Robert Richter
>     Date: 2020-04-02 20:30
>     To: Tang Bin
>     CC: thor.thayer@...ux.intel.com; bp@...en8.de; mchehab@...nel.org;
>     tony.luck@...el.com; james.morse@....com; linux-edac@...r.kernel.org;
>     linux-kernel@...r.kernel.org
>     Subject: Re: [PATCH] EDAC/altera:Use platform_get_irq_optional()
>     On 02.04.20 19:27:40, Tang Bin wrote:
>     > In order to simply code,because platform_get_irq() already has
>     > dev_err() message.
>      
>     I don't see a difference other than hiding a -EPROBE_DEFER error
>     message. If that is your intention, please update subject and
>     description accordingly.
>      
>     Thanks,
>      
>     -Robert
>      
>     >
>     > Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
>     > ---
>     >  drivers/edac/altera_edac.c | 4 ++--
>     >  1 file changed, 2 insertions(+), 2 deletions(-)
>     >
>     > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
>     > index e91cf1147..e12bad148 100644
>     > --- a/drivers/edac/altera_edac.c
>     > +++ b/drivers/edac/altera_edac.c
>     > @@ -2099,7 +2099,7 @@ static int altr_edac_a10_probe(struct
>     platform_device *pdev)
>     >  return -ENOMEM;
>     >  }
>     > 
>     > - edac->sb_irq = platform_get_irq(pdev, 0);
>     > + edac->sb_irq = platform_get_irq_optional(pdev, 0);
>     >  if (edac->sb_irq < 0) {
>     >  dev_err(&pdev->dev, "No SBERR IRQ resource\n");
>     >  return edac->sb_irq;
>     > @@ -2134,7 +2134,7 @@ static int altr_edac_a10_probe(struct
>     platform_device *pdev)
>     >  }
>     >  }
>     >  #else
>     > - edac->db_irq = platform_get_irq(pdev, 1);
>     > + edac->db_irq = platform_get_irq_optional(pdev, 1);
>     >  if (edac->db_irq < 0) {
>     >  dev_err(&pdev->dev, "No DBERR IRQ resource\n");
>     >  return edac->db_irq;
>     > --
>     > 2.20.1.windows.1
>     >
>     >
>     >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ