Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1256942rdg; Fri, 13 Oct 2023 15:49:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBx/lvhyaKDd+ELDw7oAs9ijutoIlWaEuo9ZdvhiucdAd2amIuorkzQ4TKrH1bwjUiNfKA X-Received: by 2002:a05:6a00:1346:b0:68f:e0f0:85f4 with SMTP id k6-20020a056a00134600b0068fe0f085f4mr29233827pfu.25.1697237369885; Fri, 13 Oct 2023 15:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697237369; cv=none; d=google.com; s=arc-20160816; b=ajgBmUvjwn512/cCPgAQxPu+Vo0taQGOZQ18PC0cEbgp/wP3IF8s0rU/dY00ZmhB0W MB/IVGhbJv8kFRBP3YdSUYwDLdMlLhCjLgYb+oItMBcZxjgUTSJkc9XpuOYJElrws1nw vuXWDdpsL714WEbyjLGK+OqzVElOHNviYAh6wXA8VGce9+a9G2P7mWWEfxeXMmjWfn4F Kxxm4qR2s/gZeGSBIZYGj8/U5t1DmIU5A7uP3o066n80y6d/Sxz5yoibgOEddYM9xKAp +jVaFHbO+o6pt7WsFPphpVNfjHSmJIr2XjmVylTxSPwvy4QeQtM+Y7J3V63/tm05g9On RouA== 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=O4Nv87Lg2zXFTsrsMPJe4o1KQfKM5CR/Su7zfjGsbi8=; fh=z8A2UgI9Ozi/zM+meU3S7fSTeKB52ixSkA1q1cGr6xs=; b=wwdTPHxVYjJZZhUlU9pNPU6bOCuj5K0Xlhy0ThimYzT/uFCjVhgzJ84XvDj8Ni02F2 a+64oVMzPyib9VfOVrS8psek6Mfdc1IPpFf6hXT6vONq5ZgZUneDAFyXZviQogfjyG7w 7PPnrycpGqe0Oo4S4CWWWNlX1asuZ/KeH988zlIpx7CUiAcvj+T3p15elxbP/VTPxrt8 4mux6XqgyJAaezJXRFJVvFQIEjtlsAA+nJzPXpYDAwiBeja/fhytYaAWBSyQo15KF8k5 dXqQ5HglPqCFS9MJg7Ndmgt2swQAY5zyMfai22vAatN+zvvtpzE1Zei56s2+iLQnz2/u Gtmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JwwwGNLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u84-20020a627957000000b00690d935fa5asi1973569pfc.59.2023.10.13.15.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:49:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JwwwGNLP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 81F53830D120; Fri, 13 Oct 2023 15:49:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232624AbjJMWtB (ORCPT + 99 others); Fri, 13 Oct 2023 18:49:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232529AbjJMWsv (ORCPT ); Fri, 13 Oct 2023 18:48:51 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43EF7E8; Fri, 13 Oct 2023 15:48:42 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-3512c43adebso9684965ab.3; Fri, 13 Oct 2023 15:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697237321; x=1697842121; darn=vger.kernel.org; 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=O4Nv87Lg2zXFTsrsMPJe4o1KQfKM5CR/Su7zfjGsbi8=; b=JwwwGNLPXCQTXpfYi5Ez9wlswWI7xn/H/ippxu7U98xUZjedA3k9DFygRnB0vmA4Qm nhr2oLEEvqui2rkjnSrcG8t9aeKXihabYD2cM8adduvG2uNc+GgW8EG9sGE+ziuJ5DoX WYxTgukbmmh52rJScqZI/v2lOWJ6dBreGURrIDJLy0N4bZ+47E4b9OHxE2W2XnGWj/oe HqqjTFKp9KbZe7QuZdsrb+7wF0jFplWV3Z/ExOgerKt4ixFgMJ2aZihnIGkArr3qBceX ZXyHkwemXm54Pvk4SI9Ay6NTYCmgw/l7CIcHTDBJqocpW0iAbWuFFY0DMuySKo0XPFOL 79uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697237321; x=1697842121; 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=O4Nv87Lg2zXFTsrsMPJe4o1KQfKM5CR/Su7zfjGsbi8=; b=N/5wO1jHhNzy8ARj2B8/twLdopGmNMlVB2x5Oq40KtCCKlHEdgaHkTa5Mo4xgOOyCi C+e2LuF+4NaTi0aBlLLwKL53Qsg8e8pM2ZdYRsmB23z3EdrlCKIsF0ryjHvVDhIjvHUW 7s6cO4DK/MF+j0FFAvPhurfYYpCSWIrQho20PI+NcGF/7F67gFEnaOfTpASXr/SkmyE1 YbHazk5NQGXM6uZ6bUp7hvuTx3hLZYc3eC6x4ErWzjOPzSmlA6vtSmQRMj3C/J5G86fr oR4/eMjWR5r3tUpS/uogLIiW6KdVAzf9bAqZm0YCK3LRdpZq7dM+RY+gEuBX613Bb9Tj npAw== X-Gm-Message-State: AOJu0YzXYr1AiHv3gClKXjdSewJ50Cn0FDersvE2xejsFnhocVG+r5GZ G3qs+HLaBF8xK/bfL76GDhnFF7T5v2NKRA== X-Received: by 2002:a05:6e02:1e02:b0:350:f0bb:6a42 with SMTP id g2-20020a056e021e0200b00350f0bb6a42mr39141991ila.29.1697237321292; Fri, 13 Oct 2023 15:48:41 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id t10-20020a92dc0a000000b003512c3e8809sm1683071iln.71.2023.10.13.15.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:48:40 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: lb@semihalf.com, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, linux-doc@vger.kernel.org, Jim Cromie Subject: [PATCH v7b 10/25] dyndbg: tighten ddebug_class_name() 1st arg type Date: Fri, 13 Oct 2023 16:48:02 -0600 Message-ID: <20231013224818.3456409-11-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231013224818.3456409-1-jim.cromie@gmail.com> References: <20231013224818.3456409-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 13 Oct 2023 15:49:22 -0700 (PDT) Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index b07aab422604..8158943b350d 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1117,12 +1117,12 @@ static void *ddebug_proc_next(struct seq_file *m, void *p, loff_t *pos) #define class_in_range(class_id, map) \ (class_id >= map->base && class_id < map->base + map->length) -static const char *ddebug_class_name(struct ddebug_iter *iter, struct _ddebug *dp) +static const char *ddebug_class_name(struct ddebug_table *dt, struct _ddebug *dp) { - struct ddebug_class_map *map = iter->table->classes; - int i, nc = iter->table->num_classes; + struct ddebug_class_map *map = dt->classes; + int i; - for (i = 0; i < nc; i++, map++) + for (i = 0; i < dt->num_classes; i++, map++) if (class_in_range(dp->class_id, map)) return map->class_names[dp->class_id - map->base]; @@ -1156,7 +1156,7 @@ static int ddebug_proc_show(struct seq_file *m, void *p) seq_puts(m, "\""); if (dp->class_id != _DPRINTK_CLASS_DFLT) { - class = ddebug_class_name(iter, dp); + class = ddebug_class_name(iter->table, dp); if (class) seq_printf(m, " class:%s", class); else -- 2.41.0