Re: [PATCH 1/2] drivers: platform: Mark functions as static inhp_accel.c

From: Josh Triplett
Date: Fri Dec 13 2013 - 03:58:52 EST


On Fri, Dec 13, 2013 at 12:56:34PM +0530, Rashika Kheria wrote:
> This patch marks the functions lis3lv02d_acpi_init(),
> lis3lv02d_acpi_read() and lis3lv02d_acpi_write() as static in
> x86/hp_accel.c because they are not used outside this file.
>
> Thus, it also eliminates the following warnings in x86/hp_accel.c:
> drivers/platform/x86/hp_accel.c:91:5: warning: no previous prototype for âlis3lv02d_acpi_initâ [-Wmissing-prototypes]
> drivers/platform/x86/hp_accel.c:109:5: warning: no previous prototype for âlis3lv02d_acpi_readâ [-Wmissing-prototypes]
> drivers/platform/x86/hp_accel.c:132:5: warning: no previous prototype for âlis3lv02d_acpi_writeâ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>

Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>

> drivers/platform/x86/hp_accel.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
> index a8e43cf..01b619e 100644
> --- a/drivers/platform/x86/hp_accel.c
> +++ b/drivers/platform/x86/hp_accel.c
> @@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
> *
> * Returns 0 on success.
> */
> -int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
> +static int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
> {
> struct acpi_device *dev = lis3->bus_priv;
> if (acpi_evaluate_object(dev->handle, METHOD_NAME__INI,
> @@ -106,7 +106,7 @@ int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
> *
> * Returns 0 on success.
> */
> -int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
> +static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
> {
> struct acpi_device *dev = lis3->bus_priv;
> union acpi_object arg0 = { ACPI_TYPE_INTEGER };
> @@ -129,7 +129,7 @@ int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
> *
> * Returns 0 on success.
> */
> -int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
> +static int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
> {
> struct acpi_device *dev = lis3->bus_priv;
> unsigned long long ret; /* Not used when writting */
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/