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, 27 Sep 2022 17:10:53 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Hans de Goede <hdegoede@...hat.com>, linux-pwm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH v3 4/8] pwm: lpss: Include headers we are direct user of

Hello,

On Tue, Sep 27, 2022 at 05:47:19PM +0300, Andy Shevchenko wrote:
> For the sake of integrity, include headers we are direct user of.
> 
> While at it, add missed struct pwm_lpss_boardinfo one and replace
> device.h with a forward declaration. The latter improves compile
> time due to reducing overhead of device.h parsing with entire train
> of dependencies.

Hm, I copied the cmdline for the compiler from a V=1 build and only run
the compiler on drivers/pwm/pwm-lpss-pci.c.

With #include <device.h> I got:

	real	0m0.421s
	user	0m0.354s
	sys	0m0.066s

With struct device; I got:

	real	0m0.431s
	user	0m0.378s
	sys	0m0.052s

Are the numbers for you considerably different?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Reviewed-by: Hans de Goede <hdegoede@...hat.com>
> ---
>  drivers/pwm/pwm-lpss.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h
> index c344921b2cab..839622964b2a 100644
> --- a/drivers/pwm/pwm-lpss.h
> +++ b/drivers/pwm/pwm-lpss.h
> @@ -10,11 +10,15 @@
>  #ifndef __PWM_LPSS_H
>  #define __PWM_LPSS_H
>  
> -#include <linux/device.h>
>  #include <linux/pwm.h>
> +#include <linux/types.h>
>  
>  #define MAX_PWMS			4
>  
> +struct device;
> +
> +struct pwm_lpss_boardinfo;

Hmm, I wonder why there is no compiler warning without that declaration.
At least in my builds. Do you see a warning? IMHO it's better to fix
that be swapping the order of struct pwm_lpss_chip and struct
pwm_lpss_boardinfo.

>  struct pwm_lpss_chip {
>  	struct pwm_chip chip;
>  	void __iomem *regs;

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ