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: <20120918060806.GA1459@avionic-0098.mockup.avionic-design.de>
Date:	Tue, 18 Sep 2012 08:08:06 +0200
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Tushar Behera <tushar.behera@...aro.org>
Cc:	linux-kernel@...r.kernel.org, sachin.kamat@...aro.org,
	patches@...aro.org
Subject: Re: [PATCH v4] pwm: Fix compilation error when CONFIG_PWM is not
 defined

On Wed, Sep 12, 2012 at 03:31:46PM +0530, Tushar Behera wrote:
> Add dummy implemention of public symbols for compilation-safe inclusion
> of include/linux/pwm.h file when CONFIG_PWM is not defined.
> 
> Reported-by: Sachin Kamat <sachin.kamat@...aro.org>
> Signed-off-by: Tushar Behera <tushar.behera@...aro.org>
> ---
> Changes since v3:
> * Nitpicks
> 
> Changes since v2:
> * #if condition for legacy functions modified
> * Reverted layout changes, can be taken up when HAVE_PWM is no longer
> required.
> 
> Changes since v1:
> * Incorporated Thierry's suggestions regarding adding dummy function
> implemention for all global functions
> * Reorganized header file to have structure definitions first and then the
> function definitions.
> 
>  include/linux/pwm.h |   71 +++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 69 insertions(+), 2 deletions(-)

Okay, I've applied this to my for-next branch, with some minor changes.
For one I had to merge it with Alex's managed functions patch. Second I
changed all dummy functions that return a struct pwm_device * to return
ERR_PTR(-ENODEV) instead of NULL because PWM users typically check for
IS_ERR(pwm) and not for NULL.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ