Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp845444iog; Mon, 13 Jun 2022 14:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7SAjVp6yUpSGjK4gBXKRAnHchv8oPnr1K+bqnzvI7wpiF8ZuCfP7LU3cyCSb9qyVkKsHy X-Received: by 2002:aa7:c4ce:0:b0:42d:d5ef:2bd6 with SMTP id p14-20020aa7c4ce000000b0042dd5ef2bd6mr1981862edr.237.1655155198266; Mon, 13 Jun 2022 14:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655155198; cv=none; d=google.com; s=arc-20160816; b=j3i2lIkeyxBCUupzNgOau83MwWGxoG6dje/saYVPbB28ZwebctaA+60NdPSt9Etpz1 pYmJ5vapzCMWxFXAeMlx5NXZCM7DpIefsP/dMAXfrIM2AUG8Cpe6D9Lq1lI/90JQR+as GCuNaVTBMzo0laHCke9C3z7v4ESNuTz2YEnwesa/Hn6vgARyOy7RfVoYZQmf0jEmcahM /eEo3udOY9PQEyeuIYOt5EX4GG1jbJ/1eNCifM4cmN9n09CQzuWE7xCQs3n/Oy4/rafL IsJ+/u60NAC2EZhORJ/uPXlYzUBRegDUMmw13scRqE9wNM0sca/nEzr9L8tsI5ouMSVS 1CmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uV62cC5DfHg/D8q7E9RvYjkrSokJV1eiZxRUfsD9VoU=; b=G8ap53gPgV+KKJGncARsvZ6WsLJMgXIF2yCS72nbnTSeh9oqDTRomq891oKd4Bbg5H O42tIPf5O7t/6nzZY0hPKVPpdh4T4iCxSMJBjv+eTbYsj6rPxDPe09gfcj6sxlqESXt9 AhqUUZSyNF/R+xfDZhRXqT9Z9bd71/YaTtCRg3NitmiHmpy9DXIBJf3+PYRvCseES5kl GwszwOJ3+BSIhWkRjcJmnQOIg8d3LCyhAU9skQJ6ZF9C9kDJkNwSh1k6n1FdKsTl+Pis 7XIVJcJf++AlqSJWnSVVZZ0UiJnDpgzt/dqpjim4Omm8Zrirs/kVamLoE02sSt97KZ94 IxwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kvRi5OcE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk41-20020a1709077fa900b00718c2c40966si3974034ejc.480.2022.06.13.14.19.32; Mon, 13 Jun 2022 14:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kvRi5OcE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351287AbiFMU4c (ORCPT + 99 others); Mon, 13 Jun 2022 16:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351913AbiFMUyC (ORCPT ); Mon, 13 Jun 2022 16:54:02 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AAFF25E82 for ; Mon, 13 Jun 2022 13:18:42 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1655151521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uV62cC5DfHg/D8q7E9RvYjkrSokJV1eiZxRUfsD9VoU=; b=kvRi5OcEoiHBckUmql9zWUb9FKC6wNd2nIhN5sD38XfgUnd8dK14JY90UXlC8uENnECQaQ 3OOnI245K8ZI+Nxmz+gn+P6ox1GkZo2TIpM9SiR9iPnRCP6c/hSq7HcQsVTtoLryjSydIl Zft1R6rRme1veq8TWSAMk6UkoRJMi5M= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Peter Collingbourne , Evgenii Stepanov , Florian Mayer , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 22/32] kasan: cosmetic changes in report.c Date: Mon, 13 Jun 2022 22:14:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Konovalov Do a few non-functional style fixes for the code in report.c. Signed-off-by: Andrey Konovalov --- mm/kasan/report.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 7269b6249488..879f949dc395 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -194,25 +194,22 @@ static void print_error_description(struct kasan_report_info *info) static void print_track(struct kasan_track *track, const char *prefix) { pr_err("%s by task %u:\n", prefix, track->pid); - if (track->stack) { + if (track->stack) stack_depot_print(track->stack); - } else { + else pr_err("(stack is not available)\n"); - } } struct page *kasan_addr_to_page(const void *addr) { - if ((addr >= (void *)PAGE_OFFSET) && - (addr < high_memory)) + if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory)) return virt_to_head_page(addr); return NULL; } struct slab *kasan_addr_to_slab(const void *addr) { - if ((addr >= (void *)PAGE_OFFSET) && - (addr < high_memory)) + if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory)) return virt_to_slab(addr); return NULL; } -- 2.25.1