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]
Date:   Tue, 6 Mar 2018 11:05:58 -0800
From:   Benson Leung <bleung@...gle.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Benson Leung <bleung@...omium.org>,
        Olof Johansson <olof@...om.net>,
        Bhumika Goyal <bhumirks@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Revert "platform/chrome: chromeos_laptop: make
 chromeos_laptop const"

On Tue, Mar 06, 2018 at 10:59:15AM -0800, Dmitry Torokhov wrote:
> This reverts commit a376cd91606365609d8fbd57247618bd51da1fc6 because
> chromeos_laptop instances should not be marked as "const" (at this
> time), since i2c_peripheral is being modified (we change "state" and
> "tries") when we instantiate devices.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Thanks for the catch, Dmitry.

Applied.

> ---
>  drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
> index 6dec6ab13300..d8599736a41a 100644
> --- a/drivers/platform/chrome/chromeos_laptop.c
> +++ b/drivers/platform/chrome/chromeos_laptop.c
> @@ -423,7 +423,7 @@ static int chromeos_laptop_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static const struct chromeos_laptop samsung_series_5_550 = {
> +static struct chromeos_laptop samsung_series_5_550 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
> @@ -432,14 +432,14 @@ static const struct chromeos_laptop samsung_series_5_550 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop samsung_series_5 = {
> +static struct chromeos_laptop samsung_series_5 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2583_als, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop chromebook_pixel = {
> +static struct chromeos_laptop chromebook_pixel = {
>  	.i2c_peripherals = {
>  		/* Touch Screen. */
>  		{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_PANEL },
> @@ -450,14 +450,14 @@ static const struct chromeos_laptop chromebook_pixel = {
>  	},
>  };
>  
> -static const struct chromeos_laptop hp_chromebook_14 = {
> +static struct chromeos_laptop hp_chromebook_14 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
>  	},
>  };
>  
> -static const struct chromeos_laptop dell_chromebook_11 = {
> +static struct chromeos_laptop dell_chromebook_11 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
> @@ -466,28 +466,28 @@ static const struct chromeos_laptop dell_chromebook_11 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop toshiba_cb35 = {
> +static struct chromeos_laptop toshiba_cb35 = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_c7_chromebook = {
> +static struct chromeos_laptop acer_c7_chromebook = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_ac700 = {
> +static struct chromeos_laptop acer_ac700 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop acer_c720 = {
> +static struct chromeos_laptop acer_c720 = {
>  	.i2c_peripherals = {
>  		/* Touchscreen. */
>  		{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_DESIGNWARE_1 },
> @@ -500,14 +500,14 @@ static const struct chromeos_laptop acer_c720 = {
>  	},
>  };
>  
> -static const struct chromeos_laptop hp_pavilion_14_chromebook = {
> +static struct chromeos_laptop hp_pavilion_14_chromebook = {
>  	.i2c_peripherals = {
>  		/* Touchpad. */
>  		{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
>  	},
>  };
>  
> -static const struct chromeos_laptop cr48 = {
> +static struct chromeos_laptop cr48 = {
>  	.i2c_peripherals = {
>  		/* Light Sensor. */
>  		{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
> -- 
> 2.16.2.395.g2e18187dfd-goog
> 
> 
> -- 
> Dmitry

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@...gle.com
Chromium OS Project
bleung@...omium.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ