Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3868996pxb; Mon, 8 Feb 2021 02:06:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0NbIt0CsHhW/e/9PFIWGEZoum4RysGMrtOGPNjudyeDQdvj6wFulJPxtWA5ZmlQmTu7bW X-Received: by 2002:a05:6402:202a:: with SMTP id ay10mr16429546edb.93.1612778786870; Mon, 08 Feb 2021 02:06:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612778786; cv=none; d=google.com; s=arc-20160816; b=ovLyt/+7rkqXv0Yrlst1SYSvgSCFFCAegCWjurHG51VzFKoQGmp+WauADmKiVGLV1r p5xbOpqLyub6gEEnft2ZcmSA2ar4vlf0MA9q4aNAmUdUpvZD5CE13X/uflEvgu6mQo6/ ShSTo1R4RAifOqRn+XrjaQG7t9oSPjEUHrFvfKD/r5bPkdqBdkjRLIVHumcSKYVFN+Lf zGLoLSikHrpfE9Ctxw+oN3QE5urTfurogWNKnvp0WSljB4jDV9PHR1ql2UXpD0ZuqBxC fmFJ6Uvpjt0K2RQODKuxhtlmHvNPOlPlVQ4pIqMKEugngIEmU7wJWWdXOF6Y5+/ysCsF iEdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bvINO3Dqf9GYw5Bbhf3syQ8zjJwNC62ESu6hTyzUQHk=; b=sELdGVZCgHYbh+fcSSqEFBPfuW52zniFXNmf8TmmkIUDYgKEMQcEDRzS9Xqp/kTP8a 3ct2KWPM0gxWLG9XGVVdJzLr3mFecsweZce2+14Wtb1V9uI5xT4Beo5USr2rWXx8QpnJ jY3/KmPG6h1EZXr5aCUCaUR4JVmKk9lUierrS31MMta+/atz5erlNxgc48i/GcK4iK7b UrS7r0MyOpWWEDqwq2hR9rk7tjr/zlrgm8dJ46ep+d4Yl9AOF+1V32ouFVX39IEAR37h mz4Vk3KgjGtFyFuE6IQ6hLUokNLHuyfqp1RiDOsVJij0xxhf33hb++JqFV0HF5lVwhMR +OyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jWB6vPNG; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si13293764ejc.669.2021.02.08.02.06.03; Mon, 08 Feb 2021 02:06:26 -0800 (PST) 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=@linaro.org header.s=google header.b=jWB6vPNG; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbhBHKE4 (ORCPT + 99 others); Mon, 8 Feb 2021 05:04:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbhBHJ52 (ORCPT ); Mon, 8 Feb 2021 04:57:28 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 750C4C0617A7 for ; Mon, 8 Feb 2021 01:48:32 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id c18so16145693ljd.9 for ; Mon, 08 Feb 2021 01:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bvINO3Dqf9GYw5Bbhf3syQ8zjJwNC62ESu6hTyzUQHk=; b=jWB6vPNGP1rv5/2u3F4WgblpbSq4CbDXLGDm0GDa4cQl3UzBC6FOJQ1JzwnthSspjc F2t5lohHh5nAaFYSX3P6JSg8D2X4hfDjvRVWoh3DMWg4sSA0/i3G468NP8xqeC1il0EY aNOf1UpLMO1OshNFP5CyCyoxkWdbNd8AGjstg+W6bNiO6ZjyND8jKx+T44p+hWuklbMX vfxIPTHgLi+OS+9Jlze+fERZlSx/eMUTaNTr7apsMWnZa9xhi6llW1cDw3wKhIXdAFhA JUudHBZzTlwC1cFJof12m6P9Dd3J2I/lh28hp41TUyaAxpc5pvduWgeqFKKCbEvZaXxr PTqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bvINO3Dqf9GYw5Bbhf3syQ8zjJwNC62ESu6hTyzUQHk=; b=Rx92kS3AGwRkXBtDKeGlTouUwagx5ziGtrpRTEgaD/hG5GS7RTrbh/gN9oRN4Yw4Ik 7LDa1ST2nprDzB5ivq1kgQf2NmbS0YVPWdsBJ8nDvHEpusyo3Vek25DQYKy3kzf6Rn0u vzKG1sF3VaGR3BiTRp66U2qMdeZFmZwXw9Z07tFinxwBhnoMPgCEymmL7HAwx5LWy+As PwvhCy9K9nuoCI4xTKGtoYyLjlzk+QUCDMBuP8zthHIGXUYyxJupZ7EotOG5So2q0ES7 H54z/ZOriAfsvQX/TcgVXIalRAQd9n502wLHc/o4/BUZl2FeFN46+NwTcey+tbqyvcxf p2cA== X-Gm-Message-State: AOAM531QRb8NWF1uDt7cxzjm1biCCnaK/99iM2t2cUi5QOi+vJNYvB+1 S3lbGYVSQip+XkN01p84sKGD7CrBYq/quXbiEAwVSA== X-Received: by 2002:a2e:818e:: with SMTP id e14mr2682466ljg.226.1612777710918; Mon, 08 Feb 2021 01:48:30 -0800 (PST) MIME-Version: 1.0 References: <1611915427-3196-1-git-send-email-sumit.garg@linaro.org> <20210208094303.csu2kkyi25d7a25y@maple.lan> In-Reply-To: <20210208094303.csu2kkyi25d7a25y@maple.lan> From: Sumit Garg Date: Mon, 8 Feb 2021 15:18:19 +0530 Message-ID: Subject: Re: [PATCH v3] kdb: Simplify kdb commands registration To: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Douglas Anderson , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Feb 2021 at 15:13, Daniel Thompson wrote: > > On Fri, Jan 29, 2021 at 03:47:07PM +0530, Sumit Garg wrote: > > @@ -1011,25 +1005,17 @@ int kdb_parse(const char *cmdstr) > > ++argv[0]; > > } > > > > - for_each_kdbcmd(tp, i) { > > - if (tp->cmd_name) { > > - /* > > - * If this command is allowed to be abbreviated, > > - * check to see if this is it. > > - */ > > - > > - if (tp->cmd_minlen > > - && (strlen(argv[0]) <= tp->cmd_minlen)) { > > - if (strncmp(argv[0], > > - tp->cmd_name, > > - tp->cmd_minlen) == 0) { > > - break; > > - } > > - } > > - > > - if (strcmp(argv[0], tp->cmd_name) == 0) > > + list_for_each_entry(tp, &kdb_cmds_head, list_node) { > > + /* > > + * If this command is allowed to be abbreviated, > > + * check to see if this is it. > > + */ > > + if (tp->cmd_minlen && (strlen(argv[0]) <= tp->cmd_minlen) && > > + (strncmp(argv[0], tp->cmd_name, tp->cmd_minlen) == 0)) > > break; > > Looks like you forgot to unindent this line. > > I will fix it up but... checkpatch would have found this. > Ah, I missed to run checkpatch on v3. Thanks for fixing this up. -Sumit > > Daniel.