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: <20140222184604.GB21504@spo001.leaseweb.com>
Date:	Sat, 22 Feb 2014 19:46:04 +0100
From:	Wim Van Sebroeck <wim@...ana.be>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Michal Simek <michal.simek@...inx.com>,
	linux-kernel@...r.kernel.org, monstr@...str.eu,
	linux-watchdog@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 07/11] watchdog: xilinx: Use of_property_read_u32

Hi All,

> Hi Michal,
> 
> On Wed, Feb 12, 2014 at 02:41:21PM +0100, Michal Simek wrote:
> > Use of_property_read_u32 functions to clean probe function.
> > 
> > Signed-off-by: Michal Simek <michal.simek@...inx.com>
> > Reviewed-by: Guenter Roeck <linux@...ck-us.net>
> > ---
> > 
> > Changes in v3:
> > - Remove one if checking and use variable directly
> > 
> 
> Looks good.
> 
> Another comment/remark.
> 
> > 
> > -	pfreq = (u32 *)of_get_property(pdev->dev.of_node,
> > -					"clock-frequency", NULL);
> > -
> > -	if (pfreq == NULL) {
> > +	rc = of_property_read_u32(pdev->dev.of_node, "clock-frequency", &pfreq);
> > +	if (rc) {
> >  		dev_warn(&pdev->dev,
> >  			 "The watchdog clock frequency cannot be obtained\n");
> >  		no_timeout = true;
> >  	}
> > 
> > -	tmptr = (u32 *)of_get_property(pdev->dev.of_node,
> > -					"xlnx,wdt-interval", NULL);
> > -	if (tmptr == NULL) {
> > +	rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-interval",
> > +				  &xdev->wdt_interval);
> > +	if (rc) {
> >  		dev_warn(&pdev->dev,
> >  			 "Parameter \"xlnx,wdt-interval\" not found\n");
> >  		no_timeout = true;
> > -	} else {
> > -		xdev->wdt_interval = *tmptr;
> >  	}
> > 
> > -	tmptr = (u32 *)of_get_property(pdev->dev.of_node,
> > -					"xlnx,wdt-enable-once", NULL);
> > -	if (tmptr == NULL) {
> > +	rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-enable-once",
> > +				  &enable_once);
> > +	if (rc)
> >  		dev_warn(&pdev->dev,
> >  			 "Parameter \"xlnx,wdt-enable-once\" not found\n");
> > -		watchdog_set_nowayout(xilinx_wdt_wdd, true);
> > -	}
> 
> All the above properties are optional. Is a warning really
> warranted in this case ? I usually associate a warning with
> something that is wrong, which is not the case here.
> 
> I would encourage you to drop those warnings, but that should be
> a separate patch.

I agree with Guenter: these are not really warnings. Seperate patch is thus welcome.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ