From nobody Thu Sep 11 16:07:36 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90906C64ED8 for ; Sat, 18 Feb 2023 01:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjBRBNK (ORCPT ); Fri, 17 Feb 2023 20:13:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229695AbjBRBNI (ORCPT ); Fri, 17 Feb 2023 20:13:08 -0500 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE02F75F for ; Fri, 17 Feb 2023 17:13:07 -0800 (PST) Received: by mail-qt1-x834.google.com with SMTP id u22so2289468qtq.13 for ; Fri, 17 Feb 2023 17:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pxWY83X/UsingK6RL95Hy3CzpqO3q6ngg34P0jTRocg=; b=WIN99IGsdtMz+H4Hv/qbj5Re2qRTd9H0KYj0LkUK3EChVco0HZL+ADh0IFoaIRIpup 1p7nrMauLq1lLWTK3pYnVq13gLRoNeqGnpMa6Ii1aNIpNQi2/ipm/sBqKnyIpjcMrQLE v1W8NcZUC7WWzWce76eT8bnOm6xzNabSau6112FYd+bpe+JkJjgF8WPfWdv6BJ83Zc43 tpJPdGmVf0F6gDkkuAYm8yy1xe2Wph6ZJKhY4jHj56SF5kxev2SgZVv91tjLRsEnZMVw rKojYiHirtaWrcAv9O+qoSszAOteOVx8j+JhwlANHLmDtLhnuUH7jcswL8d279c6mEOi 3kng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxWY83X/UsingK6RL95Hy3CzpqO3q6ngg34P0jTRocg=; b=dlXszmOdpKDMYvUGAr7ZxRa4fqDQk76+HKbBHicS5YMc56PD0189gntZUoiRBoSDkO v1exv1Rf8Fw6p20fhN1gBvt2sNtxg5LS9jWu6XjGf55DtcIpqlFW9wBPcQvj9xPl433O lvXqnOrqyKLleX6CdA1tczFrT+/VBkN4BYHyjHcUYi/71aGcd0dj6u1onwPXrlZjbApl ZEe55z9sKWdZMRjlBNTY3x5R/kJf3BCil+rIiPzHHg2AKwfFJtIFeTh4RzMbeLRzq1vg ssxI1kjZ82uMHWN7Lt6IA8oA4GQrOXZJTu7jqtpuV2bZEAjFwojDy9TG6p6/Rpz54+2R Gy2w== X-Gm-Message-State: AO0yUKV39iMvi/PlmjbDDUG811rkgWbvxGNefRIXNN1Y5h8boRcOHcvV qmVVCuxwrsGg2zOnkDG2cBdXuw== X-Google-Smtp-Source: AK7set8hC9JiVA8qJhjEM5Kh6B0VruCtsUFsRT/MMcFZeeDzKDCiXVqSFhl1hOmJ0S7IfX7njGlbzw== X-Received: by 2002:ac8:7f44:0:b0:3bd:14c:c39b with SMTP id g4-20020ac87f44000000b003bd014cc39bmr6205860qtk.25.1676682786337; Fri, 17 Feb 2023 17:13:06 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id q13-20020a05620a024d00b006f9ddaaf01esm4268119qkn.102.2023.02.17.17.13.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 17:13:05 -0800 (PST) From: Glenn Washburn To: Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, Andrew Morton , Glenn Washburn , linux-um , Richard Weinberger , Johannes Berg , Anton Ivanov Subject: [PATCH v2 1/2] scripts/gdb: Correct indentation in get_current_task Date: Fri, 17 Feb 2023 19:11:53 -0600 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There is an extra space in a couple blocks in get_current_task. Though python does not care, let's make the spacing consistent. Also, format better an if expression, removing unneeded parenthesis. Signed-off-by: Glenn Washburn Reviewed-by: Jan Kiszka --- scripts/gdb/linux/cpus.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/gdb/linux/cpus.py b/scripts/gdb/linux/cpus.py index 15fc4626d236..3e02a1866751 100644 --- a/scripts/gdb/linux/cpus.py +++ b/scripts/gdb/linux/cpus.py @@ -163,16 +163,16 @@ def get_current_task(cpu): task_ptr_type =3D task_type.get_type().pointer() =20 if utils.is_target_arch("x86"): - var_ptr =3D gdb.parse_and_eval("¤t_task") - return per_cpu(var_ptr, cpu).dereference() + var_ptr =3D gdb.parse_and_eval("¤t_task") + return per_cpu(var_ptr, cpu).dereference() elif utils.is_target_arch("aarch64"): - current_task_addr =3D gdb.parse_and_eval("$SP_EL0") - if((current_task_addr >> 63) !=3D 0): - current_task =3D current_task_addr.cast(task_ptr_type) - return current_task.dereference() - else: - raise gdb.GdbError("Sorry, obtaining the current task is not = allowed " - "while running in userspace(EL0)") + current_task_addr =3D gdb.parse_and_eval("$SP_EL0") + if (current_task_addr >> 63) !=3D 0: + current_task =3D current_task_addr.cast(task_ptr_type) + return current_task.dereference() + else: + raise gdb.GdbError("Sorry, obtaining the current task is not a= llowed " + "while running in userspace(EL0)") else: raise gdb.GdbError("Sorry, obtaining the current task is not yet " "supported with this arch") --=20 2.30.2