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: <49116000.7000005@teltonika.lt>
Date:	Wed, 05 Nov 2008 10:57:36 +0200
From:	Paulius Zaleckas <paulius.zaleckas@...tonika.lt>
To:	Mike Frysinger <vapier.adi@...il.com>
CC:	David Brownell <david-b@...bell.net>,
	Grant Likely <grant.likely@...retlab.ca>,
	netdev@...r.kernel.org, linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-embedded@...r.kernel.org,
	Laurent Pinchart <laurentp@...-semaphore.com>
Subject: Re: [PATCH] phylib: make mdio-gpio work without OF (v2)

Mike Frysinger wrote:
> On Wed, Nov 5, 2008 at 03:11, David Brownell wrote:
>> On Tuesday 04 November 2008, Mike Frysinger wrote:
>>>> If indeed OF functions don't have declarations which are
>>>> available on all platforms, that might be worth fixing
>>>> to enable this approach to #ifdef elimination.
>>> OF is open firmware right ?  no way there's going to be OF for every
>>> port that supports GPIO, so filling out the stubs in linux/of_gpio.h
>>> will need to be done.
>> In which case the boolean "we don't have OF" would be "false" and
>> any code referencing the declared functions would be compiled out
>> (being dead code/data).  So there would be no link-time references
>> to any OF routines... standard technique.
> 
> i understand the compiler side just fine.  my point is that the
> current linux/of_gpio.h only defines the OF structure and related
> prototypes when CONFIG_OF_GPIO is defined.  so it needs updating
> first.

This is small problem compared to what you will find in linux/of_device.h
It includes <asm/of_device.h> which contains main of_device structure
and this won't work with any non OF platform. Maybe the best solution is
to write separate driver for OF which will be just wrapper for platform
driver... Just like you suggested.

> -mike
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ