[{"id":1762981,"web_url":"http://patchwork.ozlabs.org/comment/1762981/","msgid":"<d9457eab-aec8-534d-8966-bd11cafffcdb@canonical.com>","list_archive_url":null,"date":"2017-09-05T05:31:25","subject":"ACK: [PATCH] uefi: uefirtmisc: make arrays flag static const","submitter":{"id":10593,"url":"http://patchwork.ozlabs.org/api/people/10593/","name":"Alex Hung","email":"alex.hung@canonical.com"},"content":"On 2017-09-04 06:13 AM, Colin King wrote:\n> From: Colin Ian King <colin.king@canonical.com>\n> \n> The arrays are read-only and hence can be make static const\n> \n> Signed-off-by: Colin Ian King <colin.king@canonical.com>\n> ---\n>   src/uefi/uefirtmisc/uefirtmisc.c | 24 ++++++++++++++----------\n>   1 file changed, 14 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c\n> index 70068c9d..b107a915 100644\n> --- a/src/uefi/uefirtmisc/uefirtmisc.c\n> +++ b/src/uefi/uefirtmisc/uefirtmisc.c\n> @@ -153,11 +153,13 @@ static int uefirtmisc_test1(fwts_framework *fw)\n>   \tuint32_t multitesttime = 1;\n>   \tuint32_t i;\n>   \n> -\tuint32_t flag[] = { 0,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET};\n> +\tstatic const uint32_t flag[] = {\n> +\t\t0,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET\n> +\t};\n>   \n>   \tfwts_log_info(fw, \"Testing UEFI runtime service GetNextHighMonotonicCount interface.\");\n>   \tret = getnexthighmonotoniccount_test(fw, multitesttime);\n> @@ -186,11 +188,13 @@ static int uefirtmisc_test2(fwts_framework *fw)\n>   \tuint32_t multitesttime = 512;\n>   \tuint32_t i;\n>   \n> -\tuint32_t flag[] = { 0,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET};\n> +\tstatic const uint32_t flag[] = {\n> +\t\t0,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET\n> +\t};\n>   \n>   \tfwts_log_info(fw, \"Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.\");\n>   \tret = getnexthighmonotoniccount_test(fw, multitesttime);\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 3xmb1H11Ndz9sNq;\n\tTue,  5 Sep 2017 15:31:31 +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 1dp6SP-0002Wg-Vb; Tue, 05 Sep 2017 05:31:29 +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 1dp6SO-0002WS-H0\n\tfor fwts-devel@lists.ubuntu.com; Tue, 05 Sep 2017 05:31:28 +0000","from mail-pg0-f69.google.com ([74.125.83.69])\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 1dp6SO-0001cw-5V\n\tfor fwts-devel@lists.ubuntu.com; Tue, 05 Sep 2017 05:31:28 +0000","by mail-pg0-f69.google.com with SMTP id j6so5205429pgc.4\n\tfor <fwts-devel@lists.ubuntu.com>;\n\tMon, 04 Sep 2017 22:31:28 -0700 (PDT)","from [192.168.1.125] ([207.102.104.225])\n\tby smtp.gmail.com with ESMTPSA id\n\tx4sm9388707pgt.80.2017.09.04.22.31.25\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:31:26 -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=nAeE7d75WqAVQyJRyG486YthqIg0jM3bWUyZvB+bcMM=;\n\tb=frd0BNy1nOglld4ybLrzzmokJUAGsLazfO21XE3fvJS3LMCFqhuFhI/nOFGub/DoAV\n\t0FzFwxuQKNZjZYZBLCuyEjYzpEtniQ+0scAsRBS77qm6Zj/bLwEvvuu4AJAyPCadnJ7W\n\tFVC3Pku6tTXD12G2eMfpfyBhn3A6jp+PIuWFLhFB3vNeMDNoUxT0jYRqm+/dyJ5he/fy\n\tDEiAHwGWDogj8cy7ILjnatNZeHMPptrW7zcEbvAA8sgXYtvz7ub9N6V88OQGyAHvLzwG\n\tsIE578Pt3Hcm2sbiR6uD8iuBNEILibOHdvMqj4/iDnecpOaMRblFrheTrh0DVmbbHRaU\n\tjGUg==","X-Gm-Message-State":"AHPjjUhnzWiJmCVDLZXLFZHBZccgnYjo0EgSyvhROHd0yxjk9+RH/S19\n\thwG9Fa+NJwQPO5YbAXfh6V2x97X0/v30sJ4SjL7eVoHgtV7BccbdzhNYov/tg3+ACeSwumVp/w0\n\tp5YXWn4fZw/8OkHRII7NfWD/v0rMVs/0=","X-Received":["by 10.101.83.196 with SMTP id z4mr2675589pgr.301.1504589486723; \n\tMon, 04 Sep 2017 22:31:26 -0700 (PDT)","by 10.101.83.196 with SMTP id z4mr2675580pgr.301.1504589486556; \n\tMon, 04 Sep 2017 22:31:26 -0700 (PDT)"],"X-Google-Smtp-Source":"ADKCNb5B6mkWJpSvrQVvRJ/oCTGBaLeF3atJj2FeLjf8a92Rxduci/ZIo1PbbYhwPNQ8j9iSFZIfZg==","Subject":"ACK: [PATCH] uefi: uefirtmisc: make arrays flag static const","To":"fwts-devel@lists.ubuntu.com","References":"<20170904131313.19236-1-colin.king@canonical.com>","From":"Alex Hung <alex.hung@canonical.com>","Message-ID":"<d9457eab-aec8-534d-8966-bd11cafffcdb@canonical.com>","Date":"Mon, 4 Sep 2017 22:31:25 -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":"<20170904131313.19236-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":1763905,"web_url":"http://patchwork.ozlabs.org/comment/1763905/","msgid":"<f21bdc63-b7c0-93f7-4003-589f216f36ce@canonical.com>","list_archive_url":null,"date":"2017-09-06T08:21:45","subject":"ACK: [PATCH] uefi: uefirtmisc: make arrays flag static const","submitter":{"id":14061,"url":"http://patchwork.ozlabs.org/api/people/14061/","name":"Ivan Hu","email":"ivan.hu@canonical.com"},"content":"On 09/04/2017 09:13 PM, Colin King wrote:\n> From: Colin Ian King <colin.king@canonical.com>\n> \n> The arrays are read-only and hence can be make static const\n> \n> Signed-off-by: Colin Ian King <colin.king@canonical.com>\n> ---\n>   src/uefi/uefirtmisc/uefirtmisc.c | 24 ++++++++++++++----------\n>   1 file changed, 14 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c\n> index 70068c9d..b107a915 100644\n> --- a/src/uefi/uefirtmisc/uefirtmisc.c\n> +++ b/src/uefi/uefirtmisc/uefirtmisc.c\n> @@ -153,11 +153,13 @@ static int uefirtmisc_test1(fwts_framework *fw)\n>   \tuint32_t multitesttime = 1;\n>   \tuint32_t i;\n>   \n> -\tuint32_t flag[] = { 0,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET};\n> +\tstatic const uint32_t flag[] = {\n> +\t\t0,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET\n> +\t};\n>   \n>   \tfwts_log_info(fw, \"Testing UEFI runtime service GetNextHighMonotonicCount interface.\");\n>   \tret = getnexthighmonotoniccount_test(fw, multitesttime);\n> @@ -186,11 +188,13 @@ static int uefirtmisc_test2(fwts_framework *fw)\n>   \tuint32_t multitesttime = 512;\n>   \tuint32_t i;\n>   \n> -\tuint32_t flag[] = { 0,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> -\t\t\t    CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET};\n> +\tstatic const uint32_t flag[] = {\n> +\t\t0,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_INITIATE_RESET,\n> +\t\tCAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE | CAPSULE_FLAGS_INITIATE_RESET\n> +\t};\n>   \n>   \tfwts_log_info(fw, \"Stress testing for UEFI runtime service GetNextHighMonotonicCount interface.\");\n>   \tret = getnexthighmonotoniccount_test(fw, multitesttime);\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 3xnGlR6ns6z9s9Y;\n\tWed,  6 Sep 2017 18:21:55 +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 1dpVas-0008Da-N9; Wed, 06 Sep 2017 08:21:54 +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 1dpVam-0008Be-M8\n\tfor fwts-devel@lists.ubuntu.com; Wed, 06 Sep 2017 08:21:48 +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 1dpVam-0002bd-4L\n\tfor fwts-devel@lists.ubuntu.com; Wed, 06 Sep 2017 08:21:48 +0000"],"Subject":"ACK: [PATCH] uefi: uefirtmisc: make arrays flag static const","To":"fwts-devel@lists.ubuntu.com","References":"<20170904131313.19236-1-colin.king@canonical.com>","From":"ivanhu <ivan.hu@canonical.com>","Message-ID":"<f21bdc63-b7c0-93f7-4003-589f216f36ce@canonical.com>","Date":"Wed, 6 Sep 2017 16:21:45 +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":"<20170904131313.19236-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>"}}]