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]
Message-ID: <9hhoaespm8p.fsf@e105922-lin.cambridge.arm.com>
Date:	Tue, 17 Nov 2015 17:30:14 +0000
From:	Punit Agrawal <punit.agrawal@....com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Sudeep Holla <sudeep.holla@....com>,
	Jon Medhurst <tixy@...aro.org>,
	Jassi Brar <jassisinghbrar@...il.com>,
	Liviu Dudau <Liviu.Dudau@....com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-clk@...r.kernel.org
Subject: Re: [PATCH] scpi: hide get_scpi_ops in module from built-in code

Arnd Bergmann <arnd@...db.de> writes:

> The scpi_clock driver can be built-in when CONFIG_COMPILE_TEST
> is set even when ARM_SCPI_PROTOCOL is a loadable module, and
> that results in a link error:
>
> drivers/built-in.o: In function `scpi_clocks_probe':
> (.text+0x14453c): undefined reference to `get_scpi_ops'
>
> Using #if IS_REACHABLE() around the get_scpi_ops() declaration
> makes it build successfully in this case for compile-testing,
> but the effect is the same as when ARM_SCPI_PROTOCOL is
> disabled, as the code will not be used.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Makes sense. Thanks, Arnd!

       Acked-by: Punit Agrawal <punit.agrawal@....com>

>
> diff --git a/include/linux/scpi_protocol.h b/include/linux/scpi_protocol.h
> index 80af3cd35ae4..72ce932c69b2 100644
> --- a/include/linux/scpi_protocol.h
> +++ b/include/linux/scpi_protocol.h
> @@ -71,7 +71,7 @@ struct scpi_ops {
>  	int (*sensor_get_value)(u16, u32 *);
>  };
>  
> -#if IS_ENABLED(CONFIG_ARM_SCPI_PROTOCOL)
> +#if IS_REACHABLE(CONFIG_ARM_SCPI_PROTOCOL)
>  struct scpi_ops *get_scpi_ops(void);
>  #else
>  static inline struct scpi_ops *get_scpi_ops(void) { return NULL; }
>
> --
> 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/
--
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