Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4838469ybg; Tue, 29 Oct 2019 13:11:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqySasUcdJi2/HTavpMDhF+evrpnGampeIRP7F83MXvQCGFTNZCeaIsS/VddBMFtuznBGA6m X-Received: by 2002:a17:907:1118:: with SMTP id qu24mr5206087ejb.235.1572379874619; Tue, 29 Oct 2019 13:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572379874; cv=none; d=google.com; s=arc-20160816; b=obBtSGDl/5ZW5P25HdwMmP6G4SilYfkFW5jR0T+acxI0pItL36WALO/zQwioDhl3z7 xJMRojBe/FqZZ82RQSqWTBie4eawNS6MXxIVtYVGumhw62vbTGQIXqyWLHiGLSA3N1o/ YT9wXLFyXFMB0T3+hjFyGRlQPc0ihZ3EOFNgicyMrma2JVPSU6nOmBB4ZHFUkHVDJmAw ov6qWeDo79KJBcZ+2Djli7TbOj6EQOc00bBGpp3+sQIWdANMToLqFBRvOKJiD9JgJCFe g8ZsvrZ3oiOUuMo0gNSF8sTCrkIEvklJtWoZi7Hu91RwdbOfreMdJhlHkjLsxQpAyVLQ PLzw== 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=aH3AU05nf0xdpjOXyvnnp6BI31EQy+5h/T1U88JVRB0=; b=bXHh9loq+DQwfx4U9+zuVVl+hReTHBPetLg+PgBERoVjpZGr2V/P5Oc68IGi+pZWcx uzdz4nU29w9FDVKVO5tFU8HvH4pE96mrbXTePF9zZB8gU9gg7sx+E1Pn6mTBYigQDwQ0 jUSCsHbQwK3h365auXr2ZmZxHSsdjpJuNz6vU7cLOcP6YIK3tQ2xpm7Nc1w9tqAFWy45 TBqM1fPWHLnK/G8ETr5YcpTWL8E/l3sfezhMvZZkR5CHVza5rRhQY39IRQLMNHXRKC6K mCDcNAShlvXTSDgY0B7WWyGbjvv/myg02eh5S7ysnwl/e/8rHKSzAiKuBoXMQK8CnPiq SFGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tmcwFGeF; 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 u59si11356470edc.193.2019.10.29.13.10.51; Tue, 29 Oct 2019 13:11:14 -0700 (PDT) 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=tmcwFGeF; 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 S1728086AbfJ2UAh (ORCPT + 99 others); Tue, 29 Oct 2019 16:00:37 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:41518 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbfJ2UAg (ORCPT ); Tue, 29 Oct 2019 16:00:36 -0400 Received: by mail-io1-f66.google.com with SMTP id r144so16187733iod.8 for ; Tue, 29 Oct 2019 13:00:35 -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:mime-version :content-transfer-encoding; bh=aH3AU05nf0xdpjOXyvnnp6BI31EQy+5h/T1U88JVRB0=; b=tmcwFGeFNAgNEjKRDvXyOToWMhFX+4Uab8QVnW2hsqDat0FF/5HBRjJZCJfjaaVZ71 IccfSODqItTULEMSco1i91wvM15hL41Z2/MIlK/CiFDjNHiUgzCxD3Ngf60Bbgj+ejAL r2mvhUruOGuXkLff0i2Tt9lIxVabSwlVYC04MVGjbw5dUBi9bKDZ/nl+r3A/Po38b6Nt MzaMlFWwduYfvPIE41CTPQ1c0gKaJ/bhmM4LHS4H9U3Fkcfbqzia6fKpEbP3ESlz5Po+ c+hs+2FCNiw+KHZcx6rjZAEIowwaEKyMRWMZ5J3rYBVouaJE4amMm/BGJPrrsnyZGk7f Tlvg== 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=aH3AU05nf0xdpjOXyvnnp6BI31EQy+5h/T1U88JVRB0=; b=arwVEORod9bzArLOL+f6WHyx8dVwYtqKcfngeWGHWh7O7LPhDW95MCTqaOE924+85y IKgqgsMrf+MjTF4ckgVA0BwdXBXIi5VT563PF0O7lJ4um+K2uxpqDPEzHEm05IzTi40v 7PUDimrZDhJeJ5k4a/FSTbbTr/yeUqYf2CzSUcDylNdmWRnLHy/aYcYPVCQDGekZymsF CGduxYyOnVnQFFhrwR3yJGwBSPetLzw8SoKvxgOgmlr3KeUHGjd9UI+s98XEEaQ7+GEK 4nkQFR+dULQcyiOspNAw8R+NNYaX/fa/TjiXYr9bDIec67uU6+OjN8msTSxuc2aYRZeT 19Tg== X-Gm-Message-State: APjAAAU7+9tqrTRXYkr1kBq7EQb9P1t7uUSyAqDktxTPC25sP+WzB2ip FOUjVWhAWSf1MA3Zdc2ZdhgZlc2lCXE= X-Received: by 2002:a02:840a:: with SMTP id k10mr459894jah.26.1572379234735; Tue, 29 Oct 2019 13:00:34 -0700 (PDT) Received: from localhost.localdomain (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id j21sm1571404ioj.86.2019.10.29.13.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 13:00:33 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org Cc: linux@rasmusvillemoes.dk, greg@kroah.com, Jim Cromie Subject: [PATCH 05/16] dyndbg: parse flags last, restore original behavior Date: Tue, 29 Oct 2019 14:00:30 -0600 Message-Id: <20191029200030.9839-1-jim.cromie@gmail.com> X-Mailer: git-send-email 2.21.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 In commit 85f7f6c0edb84, I moved flags parsing before the query parsing. For error reporting, its more natural to parse in normal reading order. So restore previous behavior. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 6eec5bd559fe..540ca0861cf0 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -445,15 +445,14 @@ static int ddebug_exec_query(char *query_string, const char *modname) pr_err("tokenize failed\n"); return -EINVAL; } - /* check flags 1st (last arg) so query is pairs of spec,val */ - if (ddebug_parse_flags(words[nwords-1], &flags, &mask)) { - pr_err("flags parse failed\n"); - return -EINVAL; - } if (ddebug_parse_query(words, nwords-1, &query, modname)) { pr_err("query parse failed\n"); return -EINVAL; } + if (ddebug_parse_flags(words[nwords-1], &flags, &mask)) { + pr_err("flags parse failed\n"); + return -EINVAL; + } /* actually go and implement the change */ nfound = ddebug_change(&query, flags, mask); vpr_info_dq(&query, nfound ? "applied" : "no-match"); -- 2.21.0