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] [day] [month] [year] [list]
Message-ID: <4656BEB6164FC34F8171C6538F1A595B2E9828F8@SHSMSX101.ccr.corp.intel.com>
Date:	Fri, 5 Sep 2014 08:20:07 +0000
From:	"Chen, Alvin" <alvin.chen@...el.com>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	Alexandre Courbot <gnurou@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"Ong, Boon Leong" <boon.leong.ong@...el.com>,
	"Shevchenko, Andriy" <andriy.shevchenko@...el.com>,
	"Westerberg, Mika" <mika.westerberg@...el.com>,
	"Kweh, Hock Leong" <hock.leong.kweh@...el.com>,
	Darren Hart <dvhart@...ux.intel.com>
Subject: RE: [PATCH 3/3] GPIO: gpio-dwapb: Suspend & Resume PM enabling

> >>
> >> Insert this into the dynamically allocated per-port or chip struct instead.
> >>
> > How about the following?
> >
> > static struct dwapb_context {
> >         u32 data[DWAPB_MAX_PORTS];
> >         u32 dir[DWAPB_MAX_PORTS];
> >         u32 ext[DWAPB_MAX_PORTS];
> >         u32 int_en;
> >         u32 int_mask;
> >         u32 int_type;
> >         u32 int_pol;
> >         u32 int_deb;
> > } dwapb_context;
> 
> NO because this is still a singleton variable. Put it into the dynamically allocated
> structs.
> 
> > Comparing to allocate for each port
> > dynamically, it is more directly and easy to understand.
> 
> No, I disagree. The overall design pattern in the kernel is to allocate all state
> containers dynamically.
> 
OK. Please also help review the v2 I just sent out, and after getting more feedbacks, I will improve this part in the next version together.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ