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:	Tue, 13 Dec 2011 22:55:16 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	linux-kernel@...r.kernel.org,
	Linux PM list <linux-pm@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Russell King <linux@....linux.org.uk>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH 1/4] PM / Sleep: Make pm_op() and pm_noirq_op() return
 callback pointers

2011-12-13 (화), 00:53 +0100, Rafael J. Wysocki:
> On Monday, December 12, 2011, Namhyung Kim wrote:
> > Rafael J. Wysocki <rjw <at> sisk.pl> writes:
> > 
> > > 
> > > From: Rafael J. Wysocki <rjw <at> sisk.pl>
> > > 
> > > Make the pm_op() and pm_noirq_op() functions return pointers to
> > > appropriate callbacks instead of executing those callbacks and
> > > returning their results.
> > > 
> > > This change is required for a subsequent modification that will
> > > execute the corresponding driver callback if the subsystem
> > > callback returned by either pm_op(), or pm_noirq_op() is NULL.
> > > 
> > 
> > Hello Rafael,
> > 
> > How about typedef'ing something like pm_callback_t for readability?
> > 
> >    typedef int (*pm_callback_t)(struct device *);
> > 
> > This way, the code will be easier to read.
> 
> Do you mean something like in the patch below?  It does look a bit simpler.
> 

Yes, indeed. The patch looks better to me. :)

Thanks,
Namhyung Kim



--
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