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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a3f5fd82a391ade9a659338983e5efa7924210d.camel@phytec.de>
Date:   Thu, 17 Jun 2021 07:46:33 +0000
From:   Yunus Bas <Y.Bas@...tec.de>
To:     "lee.jones@...aro.org" <lee.jones@...aro.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mfd: mfd-core: Change "Failed to locate of_node" warning
 to debug

Hi Lee,

Am Mittwoch, dem 16.06.2021 um 10:03 +0100 schrieb Lee Jones:
> On Wed, 16 Jun 2021, Yunus Bas wrote:
> 
> > The MFD-core iterates through all subdevices of the corresponding
> > MFD-device and checks, if the devicetree subnode has a fitting
> > compatible.
> > When nothing is found, a warning is thrown. This can be the case,
> > when it
> > is the intention to not use the MFD-device to it's full content.
> > Therefore, change the warning to a debug print instead, to also avoid
> > irritations.
> > 
> > Signed-off-by: Yunus Bas <y.bas@...tec.de>
> > ---
> >  drivers/mfd/mfd-core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> > index 6f02b8022c6d..e34c97088943 100644
> > --- a/drivers/mfd/mfd-core.c
> > +++ b/drivers/mfd/mfd-core.c
> > @@ -213,7 +213,7 @@ static int mfd_add_device(struct device *parent,
> > int id,
> >                 }
> >  
> >                 if (!pdev->dev.of_node)
> > -                       pr_warn("%s: Failed to locate of_node [id:
> > %d]\n",
> > +                       pr_debug("%s: Failed to locate of_node [id:
> > %d]\n",
> >                                 cell->name, platform_id);
> >         }
> 
> Can you provide an example of a device tree where this is a problem?

Of course, sorry for the poor description.

Here is an example of the imx6qdl-phytec-phycore-som.dtsi which uses
the DA9062 multi-functional device. The DA9062 has five mfd-cell
devices with compatibles defined as subfunctions. The devicetree needs
and uses just three of them:

...
pmic: pmic@58 {                                                       
compatible = "dlg,da9062";                                            
pinctrl-names = "default";                                            
pinctrl-0 = <&pinctrl_pmic>;                                          
reg = <0x58>;                                                         
interrupt-parent = <&gpio1>;                                          
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;                                  
interrupt-controller;                                                 
gpio-controller;                                                      
#gpio-cells = <2>;                                                    
                                                                      
da9062_rtc: rtc {                                                     
    compatible = "dlg,da9062-rtc";                                    
};                                                                    
                                           
da9062_onkey: onkey {                                                 
    compatible = "dlg,da9062-onkey";                                  
};                                                                    
                                                                      
watchdog {                                                            
    compatible = "dlg,da9062-watchdog";                               
    dlg,use-sw-pm;                                                    
}
...


Since the driver iterates through the mfd_cells-struct tries matching
compatibles in the devicetree MFD node, it throws a warning when there
is no counterpart in the devicetree.

In fact, I could also evalutate oder devicetree's using MFD-devices not
to it's full content.
 
> 
> Probably worth popping that in the commit message too.
> 

Yes, I will send a v2 ASAP. Thank you for the advice.

Regards,
Yunus

-- 
Mit freundlichen Grüßen
Yunus Bas

-Software Engineer-
PHYTEC Messtechnik GmbH
Robert-Koch-Str. 39
55129 Mainz
Germany
Tel.: +49 (0)6131 9221- 466
Web: www.phytec.de

Sie finden uns auch auf: Facebook, LinkedIn, Xing, YouTube

PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany
Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber |
Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE
149059855
This E-Mail may contain confidential or privileged information. If you
are not the intended recipient (or have received this E-Mail in error)
please notify the sender immediately and destroy this E-Mail. Any
unauthorized copying, disclosure or distribution of the material in
this E-Mail is strictly forbidden.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ