Received: by 10.223.176.5 with SMTP id f5csp1077348wra; Tue, 6 Feb 2018 12:11:53 -0800 (PST) X-Google-Smtp-Source: AH8x226v48Fx1UNnxABUPDxV/pjhO6I5tYZpCzTJjlBDp/oZFnRpEicl5SnaEwGIeKyPAMWIJ/Q3 X-Received: by 10.99.159.10 with SMTP id g10mr2866742pge.27.1517947913072; Tue, 06 Feb 2018 12:11:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517947913; cv=none; d=google.com; s=arc-20160816; b=G7YYEAneXvHfeBUiH4JAei17f0GnJby4bdPqkVYwsocYDtiRZMk9N2WicbQdluJ7j0 vcoQ1y30tQagj3ms69iB20iQ3qeKDjZSo0iyB+d8yjKrxqMvLAWHZkSp39Xr23CgMiHP ssxXRmul2KRCHO3fyipd5yxNhpcSSZkUUWb9VpSDaTG0kUFHfcfKlBdaPt631UNtZdWj 5aWp3LiYlr57agsqYHNYom9N0Vdz/blL2TG35p9xmGnbG6lFWb486Th1iszTD/08UASx ZZZzViJNsU/PpFpXAM4mB56PUPayfCI9jfzcWRhuzpHSgEmbzDRDObvidxYmHEWnA35H na+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=DonGtQJCaGxoDaDQcvm7B3V4z2dEBGhcnMi+reVdtGo=; b=C8i4VLwUdfoSgj2IJbHF7EtFRlOvyb1FSLOfdFPvjfp/CItlSg0MzBkCQNc9JE08GH SJX3dX0muGvhfGTAPSxgk64Xos5wDYf6ZtvU16aFd+6FfSFS4nU9nBGzJAaUW2EWDFaP 4GrW1BwqpNMCtqhzp7K2OkmMk2kr5ynIuJGG0dWrsFZFAXGXa1M7SJLNiT4p2LsHsu02 niwaMqN7ZqdM0IwFdMnNSBdu++hLS5YNpLv/eNLZQ1wffaS/Ab8h1hYN+I7fLOjZeMuT vP0ET7PPLYx3xMtXpSYk2sVo0xqDlAf50RUmERhZ1Dp+IKjvF8JbOySJn5yXgYomhcXC V8Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=WGGoSMUW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si1619445pgn.732.2018.02.06.12.11.38; Tue, 06 Feb 2018 12:11:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=WGGoSMUW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752982AbeBFUKv (ORCPT + 99 others); Tue, 6 Feb 2018 15:10:51 -0500 Received: from mail-db5eur01on0133.outbound.protection.outlook.com ([104.47.2.133]:6904 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752481AbeBFUKs (ORCPT ); Tue, 6 Feb 2018 15:10:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DonGtQJCaGxoDaDQcvm7B3V4z2dEBGhcnMi+reVdtGo=; b=WGGoSMUWrAgicHXsIoSk5S7BJyJk7ssUGR9LZJh88qkzCPekh+AbT6PoC+o6Ysj1VpchxBl9bttqUFV+lnUY+EwgAa5Tjg4nOTibC4x0yk2TleEYxlEmBykhYhRAPejAL6JgJEPw1uEaZ0CBajvtjQ+xewIQB98vejuHD7ei07w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [10.52.82.104] (84.47.128.244) by HE1PR08MB2825.eurprd08.prod.outlook.com (2603:10a6:7:2e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Tue, 6 Feb 2018 20:10:43 +0000 Subject: Re: [PATCH] kasan: remove redundant initialization of variable 'real_size' To: Colin King , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton References: <20180206144950.32457-1-colin.king@canonical.com> From: Andrey Ryabinin Message-ID: Date: Tue, 6 Feb 2018 23:10:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180206144950.32457-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [84.47.128.244] X-ClientProxiedBy: VI1PR0202CA0029.eurprd02.prod.outlook.com (2603:10a6:803:14::42) To HE1PR08MB2825.eurprd08.prod.outlook.com (2603:10a6:7:2e::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24993ecc-f821-4124-1391-08d56d9db498 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020);SRVR:HE1PR08MB2825; X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2825;3:rtiy1AErYwxwMJ03JqJ8SfVuCGO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zF7tqnGttQQRLNAzE43MP7LRTL8slOstbUgesMHAaW5IRf2YFKbnHD+Nc0LnHeGVT7hjunZOwEbTLXk1bl1F+KDgH5fyHf1kxZiDkE+hvGlye3MRHy+eBKPpdzuQbxPRN8kVBpjmEA8x+JtKqcA08x656OC6DEbgG6++R2d/yWXe1n3pqWm9TvQSrtODWsZKn833Ctp475rwvfWm9BoS3qNoFP1rzTxGxtpUvDdd/lEVlr8GUJQhGGN/iwk=;4:jfEmdEAwgS2gCucF6xJfoclKvmiDBvmo1L+IEV2jUSuTBrdyVZh8tQKDY61QcnNg5mb6fm4CS/MLONsconoqy+BAeQ/cejo3kGZZA+CmEiQqwAjqsBg6xwFkj8y3TY/zr+IpAb3Z/M/XROyDQvOfXK1k27Kk0ruv967o3HHU8Q9WyI8CTFNO9Aeasev0u64Rd0ZmXPg9Kn4pD1xgJIJhmd3uK4/t/8WcdsdyUmL/RRCM+Y88kEI7a+sE5JN8jlNMfHOQhTpTY557o0vZfn7pVjlPlUlmgf+eQJxczxFHjB/gxzGiK8+rzrioYCtNQ9zx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(198206253151910); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231101)(2400082)(944501161)(10201501046)(6041288)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011);SRVR:HE1PR08MB2825;BCL:0;PCL:0;RULEID:;SRVR:HE1PR08MB2825; X-Forefront-PRVS: 0575F81B58 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(39380400002)(346002)(366004)(396003)(39850400004)(376002)(199004)(189003)(58126008)(59450400001)(5660300001)(66066001)(68736007)(7736002)(305945005)(3846002)(65956001)(65806001)(53936002)(478600001)(64126003)(31696002)(6116002)(76176011)(6666003)(50466002)(47776003)(65826007)(6486002)(230700001)(2906002)(31686004)(106356001)(105586002)(4326008)(8676002)(81166006)(81156014)(26005)(575784001)(86362001)(8936002)(36756003)(2950100002)(97736004)(386003)(2486003)(23676004)(110136005)(16576012)(53546011)(316002)(16526019)(83506002)(229853002)(52146003)(77096007)(52116002)(186003)(25786009)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR08MB2825;H:[10.52.82.104];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4TUIyODI1OzIzOkhsRHRTelErcXAyZG5aL0xQSGpRSW1rclRI?= =?utf-8?B?SWFZc1dQZjNzRW5vOSt0dkkxcjhkZHdZUDgwZngvd2EyOW1pNkFTQXhVazBU?= =?utf-8?B?RjZReUp0elFvWlFoQlRFemVpbE9peXY5NWF0ZXRrYWprWmdrVDhnVGg5cU1R?= =?utf-8?B?eXhuMzFxdWZjRSs0ZzlKVUhvZ1BkNkZpTUZidlo5U09DRHp6WW43SHVFYUIw?= =?utf-8?B?cDlLdlZsUXRsT2lXektOdmRjNHNwRkZNNTNUU2pSTGtOSDVPMkx0TU8wMHdl?= =?utf-8?B?TGlla0NMdWUyL1NSU0hLNkVzYlcrcUU0SHAyZ00xK3BPdzVIM1FXNUZjbWRx?= =?utf-8?B?MWYyVFRzVWk1NnE4Q0VoQms2MlAvTjVlN0Q4bzd4YmhIMU9kQ0JqQS9GK0px?= =?utf-8?B?Tjc1M2JnTmZkMFc0S0FMSExZS01EWHZKNjJTN0tIYTh1QmJ5OWZ4cU1vNzFw?= =?utf-8?B?dnVUcFloSVhNL2JjTWVKQ3RHbEpKN24zVEZMNkZXWlpvb2pWejltWGVEdWY1?= =?utf-8?B?bGpteDN1ajh2WFNSTW5DVjNBRFRVaEkxYUZaUCsvTERjTStjMElUMjFOLzcw?= =?utf-8?B?SldmczdrWVRRSXNvbWJv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q+3wOZBumjknwYNsoD78Ggaq2Jqle7vy9+LH/60OjUjyUA4NcnnrlWJdL8qOuQ+QfCxJvaVDHo=;7:dH6oqHGr5prOV1DjFAL3za/rnz0Ds6ae2AZRoPNd5PCh6OtNsgS9SM0kCf1Go/zEpHxNrZAL0auz9Hn3ENnVTlCt4CK9mfEqe1lJGZkDpS45o9z6efu/1nU9moE2IewwRPMWW10HYxMSU5g0v3SaOlOhVMelX5gtOWaL/nuLXzH5YdoIpsYRr5JINVGyDH5D4TPd8W9HpJxKNPHjtWtAFos8PnNOkatakwC7CcRDlJ89R6lEEGEW8ehJ6ZO7Qy7/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR08MB2825;20:TT9FzQh/AZ/ukbmyMbvYd851Gh9dtjBzeZ/DjaJ86blofr/4vUklgaE3aNssXh+0VQ4zhsYz1IM6i5wXVEppR03GxFKwZ6/TXVAHWTQ9rs3tQPQMOJRdvoIDzz3nDEZCUBfTKh+pbduOChn59GUBnnyfIegEXttr20maV2xXbqo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2018 20:10:43.9639 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24993ecc-f821-4124-1391-08d56d9db498 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2825 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/2018 05:49 PM, Colin King wrote: > From: Colin Ian King > > Variable real_size is initialized with a value that is never read, > it is re-assigned a new value later on, hence the initialization is > redundant and can be removed. > > Cleans up clang warning: > lib/test_kasan.c:422:21: warning: Value stored to 'real_size' during > its initialization is never read > > Signed-off-by: Colin Ian King Acked-by: Andrey Ryabinin > --- > lib/test_kasan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/test_kasan.c b/lib/test_kasan.c > index a808d81b409d..dba0ffd45fd7 100644 > --- a/lib/test_kasan.c > +++ b/lib/test_kasan.c > @@ -419,7 +419,7 @@ static noinline void __init kasan_stack_oob(void) > static noinline void __init ksize_unpoisons_memory(void) > { > char *ptr; > - size_t size = 123, real_size = size; > + size_t size = 123, real_size; > > pr_info("ksize() unpoisons the whole allocated chunk\n"); > ptr = kmalloc(size, GFP_KERNEL); >