Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp433506ybt; Sat, 13 Jun 2020 09:02:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcz9XjFcCSQSiD+dFDdkEIIULAeAjXdIOiNqAoqZ4gmdHRDDOBv/dax7VFSvPFEIkgXKdO X-Received: by 2002:a05:6402:1746:: with SMTP id v6mr16861463edx.236.1592064124641; Sat, 13 Jun 2020 09:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592064124; cv=none; d=google.com; s=arc-20160816; b=QnrNhjVTrCyg2bVtyf4DffHG/09WVX2T9be0CASwB+6OeCAnhwuAxXvvKXqQvZ7K9H EDGekmDSXNlD7GOynmnhyUfoJMeFkIlMPTTfMaOj0BVLGA1vDWaqiwuV7IVqRFWGp3xN bkbmK3r9IOVbduG/vPEd6opdgJ58nDDeCBzMJuMjkjThGmbnmOGtUpRfJZb3ITCSGNav 7ApuKJtOBLNt1QjCsLvlFHGWWSZL8SsAaQ7n9PcuMlMrUoe9skxDEYMZvTnkAE1WYkHx QQD3X0XVjmV1SlY2t9s4ep40c5RG6n/zK33pFgZyoxQT68PP2Q/VNUq2Hm/dQCvtIO+8 Ye3Q== 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=2waM161DAKaaC/jJszWFJ4b/dfYZwxUtS6N+459tvyI=; b=hhzzKSHWaDHeghCdL96/P0e84yJ2eW41x6Wb8yO21yM/Sy6h9SqcSRbVc8/EKuw7Fa AFMUul5NwANJYyWJ0rauClub0NIGF73zQo2R+gfoP5MRlGcSMJRreUeiT7MS18/IVKng FInoDxpWBlaiIRacnh6wL9a71yAH0Hrs3Vzmop2BtJUT0f/Cc32wPwuUQTixAwE/EZV6 FrmX4v8JgXVytiIXCIhFCYAvpLJOzg6QHsyborsftoVHqxLEq7b2SQpl/2nwbYEZxVwP ANynWG0FW6ccm7bjOFM1wfpXI6vxuht6J9UNh+Ohkn9pkltg6gHGaH7G2SbEXd79JyqD VjWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H7hQMTvJ; 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 o9si5834164ejg.526.2020.06.13.09.01.42; Sat, 13 Jun 2020 09:02:04 -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=H7hQMTvJ; 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 S1726747AbgFMP7F (ORCPT + 99 others); Sat, 13 Jun 2020 11:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgFMP6X (ORCPT ); Sat, 13 Jun 2020 11:58:23 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3299EC03E96F for ; Sat, 13 Jun 2020 08:58:23 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id n70so9765449ota.5 for ; Sat, 13 Jun 2020 08:58:23 -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=2waM161DAKaaC/jJszWFJ4b/dfYZwxUtS6N+459tvyI=; b=H7hQMTvJ9EcP8KXtg8ZFZi8Q88kyHdEZ7ZeGZmGZoi7VnMJE8YXRG3chVPwzF+Ivks t2mTOHb9sg1bqMFQCjhHFTjpt+IDpuwYFDhak2jPU6xvzbiWXM6jlF99Omlzu399MdjO ase4dp3pvBgcTmtIEF0qOdTmJr9Yjf2NHdqLoa+xhupxVxYLaR2nEG6QLw92eZNWfr19 6R+owfvTWO3wBd3jip+qhT38a32FAXyPiiHntA+1sN93CHjwVKdWgkJk0EDkWcsztMXK ycvQFMniGigyxeoCXy+uMPtpKANZ2M9KvO1F79PrNMTRxGySV1HuAraHZ8kMrQ9vkJp3 ywsw== 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=2waM161DAKaaC/jJszWFJ4b/dfYZwxUtS6N+459tvyI=; b=Dph/kidGRVeR6fWBpdBuJmRHkuugEeJH1WSAfUgWYtZ9kfPOB9Afd1p3hwMusdozkF 4iEQRrPKu5FAN5CcEuPLDR2UJFJyJuibJ06+43ZhK68eqAAWadlELlfqxdMM0f1q+swg r7It16Xgoo8HbN439ulYT5SmKJ5FAJ7bZCmJoeXbK4l+aI+78r/H9utkEHyW7sEvPljP nqeKY3oSZhmPxsa5gptB+3lhGMmbC4R4rdwKZ+UvchoAhLZ5gY3RQLK7FSh+UFk3oA4M aRmvdpoib+lGBH2spBQHLZt8g5ECYcDDNrzaNZLKOEzDAWn2rPiNMgXIeCuSUAVNLdUQ ZfTw== X-Gm-Message-State: AOAM532YKb2SCkxC4VIUouDTR26876sdFASm0mCVSrFw9T6+Sy+85KfP P4uVwxMMCCF3KrvulKMgMa67xsb6Xwo= X-Received: by 2002:a9d:6ad9:: with SMTP id m25mr15786524otq.206.1592063902597; Sat, 13 Jun 2020 08:58:22 -0700 (PDT) Received: from frodo.hsd1.co.comcast.net ([2601:284:8204:6ba0::aaac]) by smtp.googlemail.com with ESMTPSA id 53sm2105565otv.22.2020.06.13.08.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 08:58:22 -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 v2 16/24] dyndbg: prefer declarative init in caller, to memset in callee Date: Sat, 13 Jun 2020 09:57:30 -0600 Message-Id: <20200613155738.2249399-17-jim.cromie@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200613155738.2249399-1-jim.cromie@gmail.com> References: <20200613155738.2249399-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. --- 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 40436270d38a..b3c262c009d2 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.26.2