[{"id":1762972,"web_url":"http://patchwork.ozlabs.org/comment/1762972/","msgid":"<e497fbc3-628e-2a8a-b417-a140f7e97baa@canonical.com>","list_archive_url":null,"date":"2017-09-05T05:29:31","subject":"ACK: [PATCH] src/acpi/brightness: constify sys_path and return of\n\tbrightness_get_path","submitter":{"id":10593,"url":"http://patchwork.ozlabs.org/api/people/10593/","name":"Alex Hung","email":"alex.hung@canonical.com"},"content":"On 2017-09-04 05:14 AM, Colin King wrote:\n> From: Colin Ian King <colin.king@canonical.com>\n> \n> Add in a couple of constifications to some static data\n> \n> Signed-off-by: Colin Ian King <colin.king@canonical.com>\n> ---\n>   src/acpi/brightness/brightness-helper.c | 6 +++---\n>   src/acpi/brightness/brightness-helper.h | 2 +-\n>   2 files changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/acpi/brightness/brightness-helper.c b/src/acpi/brightness/brightness-helper.c\n> index bfadd22c..58a55538 100644\n> --- a/src/acpi/brightness/brightness-helper.c\n> +++ b/src/acpi/brightness/brightness-helper.c\n> @@ -32,7 +32,7 @@\n>    */\n>   \n>   static DIR *brightness_dir;\n> -static char *brightness_path;\n> +static const char *brightness_path;\n>   \n>   /*\n>    *  brightness_get_dir()\n> @@ -47,7 +47,7 @@ DIR *brightness_get_dir(void)\n>    *  brightness_get_path()\n>    *\n>    */\n> -char *brightness_get_path(void)\n> +const char *brightness_get_path(void)\n>   {\n>   \treturn brightness_path;\n>   }\n> @@ -60,7 +60,7 @@ char *brightness_get_path(void)\n>   int brightness_init(fwts_framework *fw)\n>   {\n>   \tint i;\n> -\tstatic char *sys_path[] = {\n> +\tstatic const char *sys_path[] = {\n>   \t\t\"/sys/class/backlight\",\n>   \t\t\"/sys/devices/virtual/backlight\",\n>   \t\tNULL\n> diff --git a/src/acpi/brightness/brightness-helper.h b/src/acpi/brightness/brightness-helper.h\n> index fb60204e..9d12ba8b 100644\n> --- a/src/acpi/brightness/brightness-helper.h\n> +++ b/src/acpi/brightness/brightness-helper.h\n> @@ -24,7 +24,7 @@\n>   #include <dirent.h>\n>   \n>   DIR *brightness_get_dir(void);\n> -char *brightness_get_path(void);\n> +const char *brightness_get_path(void);\n>   int brightness_init(fwts_framework *fw);\n>   int brightness_deinit(fwts_framework *fw);\n>   int brightness_get_setting(const char *entry_name, const char *setting, int *value);\n> \n\n\nAcked-by: Alex Hung <alex.hung@canonical.com>","headers":{"Return-Path":"<fwts-devel-bounces@lists.ubuntu.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com\n\t(client-ip=91.189.94.19; helo=huckleberry.canonical.com;\n\tenvelope-from=fwts-devel-bounces@lists.ubuntu.com;\n\treceiver=<UNKNOWN>)","Received":["from huckleberry.canonical.com (huckleberry.canonical.com\n\t[91.189.94.19])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmZz60fHWz9sNq;\n\tTue,  5 Sep 2017 15:29:38 +1000 (AEST)","from localhost ([127.0.0.1] helo=huckleberry.canonical.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <fwts-devel-bounces@lists.ubuntu.com>)\n\tid 1dp6Qa-00029J-U1; Tue, 05 Sep 2017 05:29:36 +0000","from youngberry.canonical.com ([91.189.89.112])\n\tby huckleberry.canonical.com with esmtps\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128)\n\t(Exim 4.86_2) (envelope-from <alex.hung@canonical.com>)\n\tid 1dp6QZ-00029D-Ek\n\tfor fwts-devel@lists.ubuntu.com; Tue, 05 Sep 2017 05:29:35 +0000","from mail-pf0-f200.google.com ([209.85.192.200])\n\tby youngberry.canonical.com with esmtps\n\t(TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <alex.hung@canonical.com>)\n\tid 1dp6QZ-0001ZP-36\n\tfor fwts-devel@lists.ubuntu.com; Tue, 05 Sep 2017 05:29:35 +0000","by mail-pf0-f200.google.com with SMTP id e199so4941335pfh.3\n\tfor <fwts-devel@lists.ubuntu.com>;\n\tMon, 04 Sep 2017 22:29:35 -0700 (PDT)","from [192.168.1.125] ([207.102.104.225])\n\tby smtp.gmail.com with ESMTPSA id\n\tb11sm12671993pfd.69.2017.09.04.22.29.32\n\tfor <fwts-devel@lists.ubuntu.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 22:29:32 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=PLtJ+VHhxgc+jkqvkYU1ZPM8Cmk+P+P7CqQvsZeuHCs=;\n\tb=UemI9U2cM9uOYmNpwxt2frYmwtVjMlwZfPA1A0/ozyYHqqfRSOKUcOmMdATgge58jO\n\tzbnzhalCAuLTajJKv7qKhNiaZnJ1Ke1LrtrETY5V8IDdt+zCA0Q3LyAZwCOdAJTYYnQp\n\tbisHANw+HdR0owe15wT8YJTlgtHZpGgRWzVXdDI0vqz8GOIzS8h5Z9TyFmgFcipcl3oR\n\tgfgEnGGfYFyD94vITCDgsob77NNrP1OMXZFb87SLTyC2TmVdbghyCg/lIbU1aYB21H70\n\tPeDJYwD5Y4AGj7I2fVITfkJPIyA3Ay1YaUR3p7UIZzogf25SAJQ8bKOwcflMJbsc183c\n\t4QoQ==","X-Gm-Message-State":"AHPjjUg5U8ZzESVhrCiXABvMPFX+VRja2PYs3cURP7pMVX3zLZORPNt2\n\tmVvBiUoxTN271WRfFKCUqtGq8WYuwjOfY6cEZr5kpv1adAtvMQ8YZK8nGcZcIBoTdUNQ3cRg69+\n\t5RSzlKo270tmXm0rhmcre1f37puJEPeQ=","X-Received":["by 10.99.126.84 with SMTP id o20mr2781738pgn.141.1504589373451; \n\tMon, 04 Sep 2017 22:29:33 -0700 (PDT)","by 10.99.126.84 with SMTP id o20mr2781730pgn.141.1504589373281; \n\tMon, 04 Sep 2017 22:29:33 -0700 (PDT)"],"X-Google-Smtp-Source":"ADKCNb5aLmoH1gMBm8qd7Ga2lDkTQzezMMsfhAAKqxDR1R/CSpPmsJZrKjlzqoViTpS3hTE+4KxlBw==","Subject":"ACK: [PATCH] src/acpi/brightness: constify sys_path and return of\n\tbrightness_get_path","To":"fwts-devel@lists.ubuntu.com","References":"<20170904121421.12537-1-colin.king@canonical.com>","From":"Alex Hung <alex.hung@canonical.com>","Message-ID":"<e497fbc3-628e-2a8a-b417-a140f7e97baa@canonical.com>","Date":"Mon, 4 Sep 2017 22:29:31 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170904121421.12537-1-colin.king@canonical.com>","Content-Language":"en-US","X-BeenThere":"fwts-devel@lists.ubuntu.com","X-Mailman-Version":"2.1.20","Precedence":"list","List-Id":"Firmware Test Suite Development <fwts-devel.lists.ubuntu.com>","List-Unsubscribe":"<https://lists.ubuntu.com/mailman/options/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=unsubscribe>","List-Archive":"<https://lists.ubuntu.com/archives/fwts-devel>","List-Post":"<mailto:fwts-devel@lists.ubuntu.com>","List-Help":"<mailto:fwts-devel-request@lists.ubuntu.com?subject=help>","List-Subscribe":"<https://lists.ubuntu.com/mailman/listinfo/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=subscribe>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"fwts-devel-bounces@lists.ubuntu.com","Sender":"\"fwts-devel\" <fwts-devel-bounces@lists.ubuntu.com>"}},{"id":1763891,"web_url":"http://patchwork.ozlabs.org/comment/1763891/","msgid":"<90a60231-b662-889e-a518-02e9b397386c@canonical.com>","list_archive_url":null,"date":"2017-09-06T08:18:20","subject":"ACK: [PATCH] src/acpi/brightness: constify sys_path and return of\n\tbrightness_get_path","submitter":{"id":14061,"url":"http://patchwork.ozlabs.org/api/people/14061/","name":"Ivan Hu","email":"ivan.hu@canonical.com"},"content":"On 09/04/2017 08:14 PM, Colin King wrote:\n> From: Colin Ian King <colin.king@canonical.com>\n> \n> Add in a couple of constifications to some static data\n> \n> Signed-off-by: Colin Ian King <colin.king@canonical.com>\n> ---\n>   src/acpi/brightness/brightness-helper.c | 6 +++---\n>   src/acpi/brightness/brightness-helper.h | 2 +-\n>   2 files changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/acpi/brightness/brightness-helper.c b/src/acpi/brightness/brightness-helper.c\n> index bfadd22c..58a55538 100644\n> --- a/src/acpi/brightness/brightness-helper.c\n> +++ b/src/acpi/brightness/brightness-helper.c\n> @@ -32,7 +32,7 @@\n>    */\n>   \n>   static DIR *brightness_dir;\n> -static char *brightness_path;\n> +static const char *brightness_path;\n>   \n>   /*\n>    *  brightness_get_dir()\n> @@ -47,7 +47,7 @@ DIR *brightness_get_dir(void)\n>    *  brightness_get_path()\n>    *\n>    */\n> -char *brightness_get_path(void)\n> +const char *brightness_get_path(void)\n>   {\n>   \treturn brightness_path;\n>   }\n> @@ -60,7 +60,7 @@ char *brightness_get_path(void)\n>   int brightness_init(fwts_framework *fw)\n>   {\n>   \tint i;\n> -\tstatic char *sys_path[] = {\n> +\tstatic const char *sys_path[] = {\n>   \t\t\"/sys/class/backlight\",\n>   \t\t\"/sys/devices/virtual/backlight\",\n>   \t\tNULL\n> diff --git a/src/acpi/brightness/brightness-helper.h b/src/acpi/brightness/brightness-helper.h\n> index fb60204e..9d12ba8b 100644\n> --- a/src/acpi/brightness/brightness-helper.h\n> +++ b/src/acpi/brightness/brightness-helper.h\n> @@ -24,7 +24,7 @@\n>   #include <dirent.h>\n>   \n>   DIR *brightness_get_dir(void);\n> -char *brightness_get_path(void);\n> +const char *brightness_get_path(void);\n>   int brightness_init(fwts_framework *fw);\n>   int brightness_deinit(fwts_framework *fw);\n>   int brightness_get_setting(const char *entry_name, const char *setting, int *value);\n> \n\nAcked-by: Ivan Hu <ivan.hu@canonical.com>","headers":{"Return-Path":"<fwts-devel-bounces@lists.ubuntu.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com\n\t(client-ip=91.189.94.19; helo=huckleberry.canonical.com;\n\tenvelope-from=fwts-devel-bounces@lists.ubuntu.com;\n\treceiver=<UNKNOWN>)","Received":["from huckleberry.canonical.com (huckleberry.canonical.com\n\t[91.189.94.19])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnGgQ3Z83z9s8J;\n\tWed,  6 Sep 2017 18:18:26 +1000 (AEST)","from localhost ([127.0.0.1] helo=huckleberry.canonical.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <fwts-devel-bounces@lists.ubuntu.com>)\n\tid 1dpVXV-0007ib-AX; Wed, 06 Sep 2017 08:18:25 +0000","from youngberry.canonical.com ([91.189.89.112])\n\tby huckleberry.canonical.com with esmtps\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128)\n\t(Exim 4.86_2) (envelope-from <ivan.hu@canonical.com>)\n\tid 1dpVXT-0007iO-RB\n\tfor fwts-devel@lists.ubuntu.com; Wed, 06 Sep 2017 08:18:23 +0000","from [175.181.155.140] (helo=[192.168.31.95])\n\tby youngberry.canonical.com with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <ivan.hu@canonical.com>)\n\tid 1dpVXT-0002TP-BY\n\tfor fwts-devel@lists.ubuntu.com; Wed, 06 Sep 2017 08:18:23 +0000"],"Subject":"ACK: [PATCH] src/acpi/brightness: constify sys_path and return of\n\tbrightness_get_path","To":"fwts-devel@lists.ubuntu.com","References":"<20170904121421.12537-1-colin.king@canonical.com>","From":"ivanhu <ivan.hu@canonical.com>","Message-ID":"<90a60231-b662-889e-a518-02e9b397386c@canonical.com>","Date":"Wed, 6 Sep 2017 16:18:20 +0800","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170904121421.12537-1-colin.king@canonical.com>","Content-Language":"en-GB","X-BeenThere":"fwts-devel@lists.ubuntu.com","X-Mailman-Version":"2.1.20","Precedence":"list","List-Id":"Firmware Test Suite Development <fwts-devel.lists.ubuntu.com>","List-Unsubscribe":"<https://lists.ubuntu.com/mailman/options/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=unsubscribe>","List-Archive":"<https://lists.ubuntu.com/archives/fwts-devel>","List-Post":"<mailto:fwts-devel@lists.ubuntu.com>","List-Help":"<mailto:fwts-devel-request@lists.ubuntu.com?subject=help>","List-Subscribe":"<https://lists.ubuntu.com/mailman/listinfo/fwts-devel>,\n\t<mailto:fwts-devel-request@lists.ubuntu.com?subject=subscribe>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"fwts-devel-bounces@lists.ubuntu.com","Sender":"\"fwts-devel\" <fwts-devel-bounces@lists.ubuntu.com>"}}]