Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5819857ybc; Wed, 27 Nov 2019 09:56:08 -0800 (PST) X-Google-Smtp-Source: APXvYqy7SjY59x6CadBl9gIcMyBgSIq1In75PpcSFJ2mKFvtFA0924VR2G/i4OqbIDH1xp2E54T0 X-Received: by 2002:a17:906:680b:: with SMTP id k11mr443523ejr.0.1574877368014; Wed, 27 Nov 2019 09:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574877368; cv=none; d=google.com; s=arc-20160816; b=pGS7nQEb7Se5PxwfBdeoZLRwEuOopjuPCDHkIqiPuu8Ed49b6p+gSDZZnvLM0XR+mZ 5hjPJOeZTBDEr9Ed/eirGa2hTtsUZVuo8abUaxSxd2PC0IAhLY0fIDirqlSrD6wuqx9b HpVSkOzdABK5iemdSt4QU7rb/Ln1CSDWTgp7GFHbD0o+IrimXYGqvzYsoJVf2PZGavzg UFpZBhDVHwaU8R36onseWJxD2UT/FnqdWgJ8KEeOTUgwQdOsCIvxgT7m4n1NoVBr5Xf1 ysGZItGFdIO0jldi5nukukx07feO8TKMCMQzGSIh2m0qyBNE3qAcBitA9o6FaLEord69 Dwvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zSU9SXAkmvms1vPhMJGPQ7upzP8v1mEBZy+G6+yOB3Q=; b=dduMjGNhFJgDMBGpIYyV+jRoNs6z5hqYMXih0LJ+VSkT9Mrw1B6vre+uqb1g9VZ0r1 n+FhYDMX7jLAa6kux90uyVhRJfK/4o+XnFpt4Et6ETN26AgqudDVBRh4Bp3iZyeQeI1e 71drcdYYTyYjakrlHJqllVQWdv7c+E2Qn5kRDifO52Js45GLUtztBzRtwoAOxzCYnB4M iZ/zsuHPpoU8QE8Um2GesGRFZkT8xyEXjxYwtOYtLFacAsi6sCD2q7jCy80MHxp49Dvk oLKC8vUGepm5hDjAaBYCQh6YTY7gJPTS57ed328M9cIXzu9UIkuaQwQYYG1rHX8TgMzk BleQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GOGHqc8i; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca22si9802888ejb.22.2019.11.27.09.55.44; Wed, 27 Nov 2019 09:56:07 -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=@gmail.com header.s=20161025 header.b=GOGHqc8i; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbfK0Rvn (ORCPT + 99 others); Wed, 27 Nov 2019 12:51:43 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:46050 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726603AbfK0Rvn (ORCPT ); Wed, 27 Nov 2019 12:51:43 -0500 Received: by mail-io1-f65.google.com with SMTP id i11so14934548ioi.12 for ; Wed, 27 Nov 2019 09:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zSU9SXAkmvms1vPhMJGPQ7upzP8v1mEBZy+G6+yOB3Q=; b=GOGHqc8iZW546KbftXHryNv9IybfCWLZYpDApJ7tQLXClbWbuLZhEMfi8tuszA0A9p 54DakqQ750S95txELEM9Mk1eQ93KRz7fkwEVH7FF0ynTHwxyDmzu1daYmpP01zNgdrDt 9gb7qkg/ty/qHeE9Rtfk9s1dxBKiyFSf6w83Z9Mn5ebbp6W3GQe5aVHCox7/1xR+G31Z 3+OOwRirgNNdr+Y4e4nItETIUgb8voYpK8WHhKWwVStsY6sqM2mrgj12GyL76WhBebQO g0vBelNEm1VwkJQF0ZXHn9bv4N3QYtuAc+Vqy1D/5izo0edBJ68hE2B5cifV57l4mh6B EtzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zSU9SXAkmvms1vPhMJGPQ7upzP8v1mEBZy+G6+yOB3Q=; b=azSkPGQy0L1iz3QzuUdY7bJ1ZxZIIVkuuRA0UcEF/zSjUnYbM6EqzIrUzff3R8lUYL WobwZip3aeLjR0SlPJy0MjBvsU9Lek6tIg7HkWLb5LMrHE1Zyy+T0QI9RLUwDReTQFbS E4HFcIA0pCM2ndifkNhtRifY12a8zo2RDoUOWf9+odeESh2Z2wvHu5a3LzsgRqO//+kA U8l2ZaggXh4/X91neugqc2z62YUa+4I5xzlWtZ9oEieUkz08tNZHT1TCszv/lOhkE6Uz bEE+S5BrE3fsEnAa5nKBgSQ/gfYPIbIEY2bY+zDQvMAlOmyCQ5MlnGqXPdEMFqW7d2tN r21Q== X-Gm-Message-State: APjAAAUAf1gYNC6Jb56zpkLKhnznOACRIRjLC9OGXdKlFmtg5YaZL/8w lPpYxoiyKxd7LF8aFf/OjWI3oWJSVPw= X-Received: by 2002:a5d:8744:: with SMTP id k4mr8424858iol.227.1574877102744; Wed, 27 Nov 2019 09:51:42 -0800 (PST) Received: from localhost.localdomain (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id e72sm3785762iof.63.2019.11.27.09.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 09:51:41 -0800 (PST) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org Cc: linux@rasmusvillemoes.dk, greg@kroah.com, Jim Cromie Subject: [PATCH 13/16] dyndbg: prefer declarative init in caller, to memset in callee Date: Wed, 27 Nov 2019 10:51:29 -0700 Message-Id: <20191127175129.1351870-1-jim.cromie@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drop memset in ddebug_parse_query, instead initialize the stack variable in the caller. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index be8299e119ab..26432f88b329 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -373,7 +373,6 @@ static int ddebug_parse_query(char *words[], int nwords, pr_err("expecting pairs of match-spec \n"); return -EINVAL; } - memset(query, 0, sizeof(*query)); if (modname) /* support $modname.dyndbg= */ @@ -494,7 +493,7 @@ static int ddebug_exec_query(char *query_string, const char *modname) { struct flagsettings mods = {}; struct flagsettings filter = {}; - struct ddebug_query query; + struct ddebug_query query = {}; #define MAXWORDS 9 int nwords, nfound; char *words[MAXWORDS]; -- 2.23.0