From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44941819 for ; Wed, 11 Oct 2023 02:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O+SAnBzA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84727C433C8; Wed, 11 Oct 2023 02:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696989672; bh=kbWICzSB4IKAHMv/+9GW4UxQ64X13NVNXGJ6Mchx14I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=O+SAnBzAZxt2yAxcJcTnlGbrGefRa0Z8GYgs6FBiVcPoA2wZsrpaGtub8Bxzg6U1N Wzk+kiA8MCKEimqgMGgRQssGOhrretwKPtfneBFvfNp9kfrf2Y7Trx+0pCkx6POhMH icegletrzbTJiD4YY+a3l3uUQatPHVIOQBi74h7AxkEPKlJ1CnNGC+iRZTq4yo0L4N 0QvuEdM6RVw4RsgZRW/PzLP+WN3DqWa2bcakIcXmNY2/Jsckj7roGcvc/lusopzZtk jaNk56SrSKNEEzHKS2uB6uDZGB7Ica11cpr25DgFuRuhZ+RsaHTSJbwPFWNsCQrcKH wnv2oJ3WdxTXQ== Date: Tue, 10 Oct 2023 19:01:10 -0700 From: Jakub Kicinski To: Paul M Stillwell Jr Cc: Tony Nguyen , , , , , , , , , Pucha Himasekhar Reddy Subject: Re: [PATCH net-next v4 2/5] ice: configure FW logging Message-ID: <20231010190110.4181ce87@kernel.org> In-Reply-To: <835b8308-c2b1-097b-8b1c-e020647b5a33@intel.com> References: <20231005170110.3221306-1-anthony.l.nguyen@intel.com> <20231005170110.3221306-3-anthony.l.nguyen@intel.com> <20231006170206.297687e2@kernel.org> <835b8308-c2b1-097b-8b1c-e020647b5a33@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 10 Oct 2023 16:26:15 -0700 Paul M Stillwell Jr wrote: > I'm probably missing something here, but I don't know if this will do > what I need or not. What I have is a user passing a module name and a > log level and I'm trying to match those strings and create integer > values from them so I can configure the FW log for that module. I'm not > seeing how the above gets me there... > > I was trying to not use strncmp and instead use the built in kernel > string matching functions so that's how I ended up with the code I have You're supposed to do very simple and targeted matching here. The cmdline parsing makes the code harder to follow.