Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2265381ybg; Fri, 5 Jun 2020 09:31:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZCH9P9ka9rY71gug3bPAEtdBvg9cy+mHhKT5GJeMPk8j/VHgzRFoxtrbR3jjzUYjPW09L X-Received: by 2002:a17:906:1558:: with SMTP id c24mr9387526ejd.48.1591374674695; Fri, 05 Jun 2020 09:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591374674; cv=none; d=google.com; s=arc-20160816; b=HtKv8w4BA/2pBI1rrk18XnLKt7hhejgb0oTNv6Ed7PRvCN/c0JhOyDtvrgCwQAp5gq 3zS/ENsItuwJc5JC9tf4CZGs/kOCJ+PZulzNvDxHDzCjQdNSKTHsP4aGoSjF9htttrCk T76t6OyqHffiSMqKGtHn1+yZyvznQYzjtFQNNwvkUlmw92t5SuGVsUhmuYebOl6mpQ+W vGj96sH2/BtkBUqt5cLdR83i3FPzz4+nlGjYhI/CR3fZZUDCdivBIiE+CZsbLD5SfQme 6lZN1j4ZP8JzG91WrSIIjPddlxRFuzx8qJnjZSTp5dSBX354hre0j4j3xrEji+0HAbui PflQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7RE3ZTC1uKnp0KJXJWlYbd5oQY2S0Xfa/C4GEXt6hnI=; b=ty+sJWR7oh4CfdAOckvTilySO/juIDPEXyavHpabzPLw1tRrIniVDHh5OF1i/ym2MH P7Flg/R/C+i0UDXz/nFHB/s7C7bYwbFip26De6i7Lu6EWfHMf62ARWekn/ChhDdILI6O 85fsrp81QY2kvaAmHvE+JljySLQisrOIioFObgMPmXYYbNfrE/FVAyQOqDi9v0+4nn6K n/E6K1nXfAmgZmW3gxhatjKHWOj0eqwF0Fgmgc939Fd7M6ZYYYlz4gw9ukllFXRVJhXY JrT7mw520ab3hY8SHavDnGk5oH7R7AoeThpUGX5uNV7ottM27AWQO2SFrPtDcJYefVlP ac9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q2zMPlv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id hb8si3843188ejb.207.2020.06.05.09.30.51; Fri, 05 Jun 2020 09:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q2zMPlv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726910AbgFEQ2S (ORCPT + 99 others); Fri, 5 Jun 2020 12:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728599AbgFEQ2G (ORCPT ); Fri, 5 Jun 2020 12:28:06 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B9BC08C5C3 for ; Fri, 5 Jun 2020 09:28:06 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id j189so8682353oih.10 for ; Fri, 05 Jun 2020 09:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7RE3ZTC1uKnp0KJXJWlYbd5oQY2S0Xfa/C4GEXt6hnI=; b=Q2zMPlv8fnoS4MyyIENAh9gYDyQI3ieSnmoc6Is3chUok3DrIgKb4aHhAeu+AyzN+y K/pDhxMxXSbB7OojbU2qV1J/iHR+ELUyuwlZDdlGmKX2z8vHu5zAGAb2psK7p56NGTEW Zx7ods7yczkDj1QM7rT+vwuMuUOuJTMySBRmThnu9a0ILaN95hMm3WiYyww3WPYNnAyK hfm8hxXs21kATUxkm6FCn3MygTZ8rlKSASD7WCVhcIwfwzvSCbQEymJ1ef+CsQoyTnEW xhJ0pVwHcZmMo2zIwejJhDRYR6llI6v3DfvNuGg2Js7BfZt62SHM1uin50EzcIQVzIP0 Tw7w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=7RE3ZTC1uKnp0KJXJWlYbd5oQY2S0Xfa/C4GEXt6hnI=; b=RgYMfr9BuEYjEpvv+znh+01WGsaXGAreSUgTS9Wa/vXHypDPiY2heGuYTmlGQ2yXQ5 75s7yEI+3Tvn2BAXuNUXe6mw0kMhpbX/UxDk9EGu9WbwyEzQLDuMMRzPMs9EGM7OThy+ l3xW+Mxo3pGtTp8pPMoPtGJI7YR+Ua2/Ho6NnvcmkKsCZQp2v3in5/n7G3YIg20IYjmN ObM0W7c7eaVR8JobT8svUkN/lIR+PDCTHPXUg9csPF3R4eEtiE3BGl1GEmyE8vK4irOu PZgb86mUKBS5yN6/l9+nnbmDpKnPDHZAFU/mvT6VXdujhkyQXnjiucj9HDBdkAm91N0q iihA== X-Gm-Message-State: AOAM531osqQCOWhGtXedTuUme73QsQFB009VQtDwPcaG4Jn3X9x92J4j 6TCQvov1SA9h1M38lYgodlM= X-Received: by 2002:aca:3d09:: with SMTP id k9mr2293908oia.160.1591374485755; Fri, 05 Jun 2020 09:28:05 -0700 (PDT) Received: from frodo.hsd1.co.comcast.net ([2601:284:8204:6ba0::aaac]) by smtp.googlemail.com with ESMTPSA id z13sm813894ooa.28.2020.06.05.09.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 09:28:05 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, gregkh@linuxfoundation.org Cc: linux@rasmusvillemoes.dk, Jim Cromie Subject: [PATCH 14/16] dyndbg: prefer declarative init in caller, to memset in callee Date: Fri, 5 Jun 2020 10:26:43 -0600 Message-Id: <20200605162645.289174-15-jim.cromie@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605162645.289174-1-jim.cromie@gmail.com> References: <20200605162645.289174-1-jim.cromie@gmail.com> 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; let the compiler decide how to do it. 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 90061833ef3f..f0c0c31e91ea 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -372,7 +372,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= */ @@ -493,7 +492,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.26.2