From patchwork Mon Sep 5 21:05:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12966560 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40BDBECAAD3 for ; Mon, 5 Sep 2022 21:09:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8ECE58021C; Mon, 5 Sep 2022 17:09:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89E2F80214; Mon, 5 Sep 2022 17:09:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73CC48021C; Mon, 5 Sep 2022 17:09:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 494BB80214 for ; Mon, 5 Sep 2022 17:09:12 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1CF59AB8C8 for ; Mon, 5 Sep 2022 21:09:12 +0000 (UTC) X-FDA: 79879272144.26.648B64B Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by imf13.hostedemail.com (Postfix) with ESMTP id B551F20068 for ; Mon, 5 Sep 2022 21:09:11 +0000 (UTC) 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=1662412150; 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=Xrez/vnZo/oxjqNbdHGgKzELApXd1vkR10PWPCg0Dhs=; b=t2jE6p9pbIiCRjPA2WBL+FZYraE6CBckmhhN4Cf/51LN/hl6voMskq7f/VkL5sRQMtYRy9 vKvG6NU3QM+X1gzNvv4IUjJfzu/gkOptUVyM3BsBm/BhPUsHIUZ666j4Aaxgm3J08E+nGQ NlFYZ4xU1iPLPZ3E+rTMpoPhF2tdcHk= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Peter Collingbourne , Evgenii Stepanov , Florian Mayer , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm v3 21/34] kasan: cosmetic changes in report.c Date: Mon, 5 Sep 2022 23:05:36 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662412151; a=rsa-sha256; cv=none; b=IfPOyST2HbUwnDNzQ5dO5or4QXtddZ/dw6c4+QsTne762VOGaluUvQsELPbi3e73FEasLu JRB+AB5SpefW9HEhm78uuRPTXXovTneRfJSAIJ76F5yB+6YZ8eQPT65bhgU6iEfg7nmtQb R7e+GqSE01kPOvsglUXcbEcz96YquSY= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=t2jE6p9p; spf=pass (imf13.hostedemail.com: domain of andrey.konovalov@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662412151; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Xrez/vnZo/oxjqNbdHGgKzELApXd1vkR10PWPCg0Dhs=; b=uaAap5Mh5z/9EnxiHEP5y3wqV5kz3/8MqHLpX9TvYt1yQ6v1EDkgkjQ6Lg7QozsjIcRtNe rnHQbBFhaoQm0bYR0u3jJhuE+Gt7fXD9PQ13zDudbXloT/skGU7DwOvCVcI1kifHfRDBTU 0rnjxEcxiNmPvplj+I+S10FhR8A5sJ8= Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=t2jE6p9p; spf=pass (imf13.hostedemail.com: domain of andrey.konovalov@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam12 X-Stat-Signature: b9171pdez9uwefhpqa8cgrjy8qf6oftm X-Rspamd-Queue-Id: B551F20068 X-Rspam-User: X-HE-Tag: 1662412151-948204 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Do a few non-functional style fixes for the code in report.c. Reviewed-by: Marco Elver 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 5d225d7d9c4c..83f420a28c0b 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -200,25 +200,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; }