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]
Date:	Wed, 25 Jun 2014 13:07:48 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	"bhupesh.sharma@...escale.com" <bhupesh.sharma@...escale.com>,
	"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:	"wg@...ndegger.com" <wg@...ndegger.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: can: Remodel FlexCAN register read/write APIs for
 BE instances

On 06/25/2014 01:01 PM, bhupesh.sharma@...escale.com wrote:
>> What about function pointers in the priv? So that flexcan_read() becomes
>> priv->read().

> That's what I propose (similar to what I did for C_CAN driver for 16-bit and 32-bit
> reg interfaces using platform data):

Yes...but...

> bool module_is_be = false;

...module_is_be is not that simple, on PPC true must be the default to
be compatible with existing dts.

> module_is_be = get-endianess-from-DT-node;
> 
> priv->read() = module_is_be ? flexcan_read_be : flexcan_read_le;

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


Download attachment "signature.asc" of type "application/pgp-signature" (243 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ