From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B82C43334 for ; Fri, 8 Jul 2022 00:21:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236795AbiGHAVM (ORCPT ); Thu, 7 Jul 2022 20:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiGHAVL (ORCPT ); Thu, 7 Jul 2022 20:21:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25DD16EEB5; Thu, 7 Jul 2022 17:21:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BF5AC625F6; Fri, 8 Jul 2022 00:21:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3220C3411E; Fri, 8 Jul 2022 00:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657239670; bh=iD66a2yH3e2FOfE8f244TwVOk+3Qw5uIbPlG/hJAAD0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hJ+c+4OJnlVAlrCvcbqfXqF4aInqz7rLVLnBaGVy7r0MAFbx8ffXwLmG4llFbcqRo CJf470wtA/VVB+M0xhl2WB9OgPlXPQ13Yzon4kV/sQDpuL+DANt40OhSpLufb8Gljb baojrDmYDaHnejNX22gKnjKkY39hz3IEnVx3mz7tkTXVF1XC4pB1R7BenUpkOwMIkK kcQbH8g38IoMCW2SeF3r1JjJSMKIQc7noP2Vh6H4iwALcqLh1N5Bm7Q4aE3kQGxcEh yjn5PVc3KqmyE2hTmleMLKOufBiiewE+DhkM5Ba+p7zIzCb9PBX6LUZPC1IpVvfAqy sOwpvSBIQkiIA== Date: Thu, 7 Jul 2022 17:21:01 -0700 From: Jakub Kicinski To: Steven Rostedt Cc: LKML , David Ahern , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH] neighbor: tracing: Have neigh_create event use __string() Message-ID: <20220707172101.25ae51c8@kernel.org> In-Reply-To: <20220705183741.35387e3f@rorschach.local.home> References: <20220705183741.35387e3f@rorschach.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 5 Jul 2022 18:37:41 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The dev field of the neigh_create event uses __dynamic_array() with a > fixed size, which defeats the purpose of __dynamic_array(). Looking at the > logic, as it already uses __assign_str(), just use the same logic in > __string to create the size needed. It appears that because "dev" can be > NULL, it needs the check. But __string() can have the same checks as > __assign_str() so use them there too. > > Cc: David Ahern > Cc: David S. Miller > Cc: netdev@vger.kernel.org > Signed-off-by: Steven Rostedt (Google) > --- > > [ This is simpler logic than the fib* events, so I figured just > convert to __string() instead of a static __array() ] This one is also going via your tree?