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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 5 Jan 2015 01:57:29 +0000
From:	Dudley Du <dudl@...ress.com>
To:	Jeremiah Mahler <jmmahler@...il.com>
CC:	"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
	"rydberg@...omail.se" <rydberg@...omail.se>,
	"bleung@...gle.com" <bleung@...gle.com>,
	David Solda <dso@...ress.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v17 00/12] input: cyapa: instruction of cyapa patches

Thanks, Jeremiah.

It seems the power manage code has been updated in kernel-next,
the same code didn't genereate any error before.
I updated with latest kernel-next, the compiling error also happened.
To fix this code, need to add stubs for cyapa_runtime_suspend() and
cyapa_runtime_resume() when CONFIG_PM_RUNTIME is not defined.

 #ifdef CONFIG_PM_RUNTIME
 static int cyapa_runtime_suspend(struct device *dev)
 {
 struct cyapa *cyapa = dev_get_drvdata(dev);
 int error;

 error = cyapa->ops->set_power_mode(cyapa,
 cyapa->runtime_suspend_power_mode,
 cyapa->runtime_suspend_sleep_time);
 if (error)
 dev_warn(dev, "runtime suspend failed: %d\n", error);

 return 0;
 }

 static int cyapa_runtime_resume(struct device *dev)
 {
 struct cyapa *cyapa = dev_get_drvdata(dev);
 int error;

 error = cyapa->ops->set_power_mode(cyapa, PWR_MODE_FULL_ACTIVE, 0);
 if (error)
 dev_warn(dev, "runtime resume failed: %d\n", error);

 return 0;
 }
+#else
+static inline int cyapa_runtime_suspend(struct device *dev) { return 0; }
+static inline int cyapa_runtime_resume(struct device *dev) { return 0; }
 #endif /* CONFIG_PM_RUNTIME */

 static const struct dev_pm_ops cyapa_pm_ops = {
 SET_SYSTEM_SLEEP_PM_OPS(cyapa_suspend, cyapa_resume)
 SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume, NULL)
 };

Thanks,
dudley

> -----Original Message-----
> From: Jeremiah Mahler [mailto:jmmahler@...il.com]
> Sent: 2015年1月1日 0:11
> To: Dudley Du
> Cc: dmitry.torokhov@...il.com; rydberg@...omail.se; bleung@...gle.com;
> David Solda; linux-input@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v17 00/12] input: cyapa: instruction of cyapa patches
>
> Dudley,
>
> On Wed, Dec 31, 2014 at 09:16:49AM +0800, Dudley Du wrote:
> > V17 patches have below updates, details of other updates see history list:
> > 1) Fix kernel oops when system booting up with finger on TP.
> > 2) Remove unnecessary error log that may to system.
> > 3) Slipt out pm sleep code into cyapa_prepare_wakeup_controls(),
> >    remove #indefs in function body of CONFIG_PM_SLEEP and
> CONFIG_PM_RUNTIME.
> > 4) Supply stubs to cyapa_gen3_ops and cyapa_gen5_ops data structure to avoid
> >    checking for presence of various methods in ops.
> > 6) Fix the meanings of some comments and return error code not clear issue.
> [...]
>
> It has build errors :(
>
>   CHK     include/config/kernel.release
>   CHK     include/generated/uapi/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   CHK     kernel/config_data.h
>   CC [M]  drivers/input/mouse/cyapa.o
> In file included from include/linux/device.h:25:0,
>                  from include/linux/i2c.h:30,
>                  from drivers/input/mouse/cyapa.c:18:
> drivers/input/mouse/cyapa.c:1339:21: error: ‘cyapa_runtime_suspend’
> undeclared here (not in a function)
>   SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume,
> NULL)
>                      ^
> include/linux/pm.h:347:21: note: in definition of macro ‘SET_RUNTIME_PM_OPS’
>   .runtime_suspend = suspend_fn, \
>                      ^
> drivers/input/mouse/cyapa.c:1339:44: error: ‘cyapa_runtime_resume’
> undeclared here (not in a function)
>   SET_RUNTIME_PM_OPS(cyapa_runtime_suspend, cyapa_runtime_resume,
> NULL)
>                                             ^
> include/linux/pm.h:348:20: note: in definition of macro ‘SET_RUNTIME_PM_OPS’
>   .runtime_resume = resume_fn, \
>                     ^
> scripts/Makefile.build:257: recipe for target 'drivers/input/mouse/cyapa.o' failed
> make[3]: *** [drivers/input/mouse/cyapa.o] Error 1
> scripts/Makefile.build:402: recipe for target 'drivers/input/mouse' failed
> make[2]: *** [drivers/input/mouse] Error 2
> scripts/Makefile.build:402: recipe for target 'drivers/input' failed
> make[1]: *** [drivers/input] Error 2
> make[1]: *** Waiting for unfinished jobs....
> Makefile:955: recipe for target 'drivers' failed
> make: *** [drivers] Error 2
> make: *** Waiting for unfinished jobs....
>
> --
> - Jeremiah Mahler

This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ