Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp751163rwe; Thu, 1 Sep 2022 07:10:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5JsX7gsgVvIWM0LkhVfqzTwHOK6r8VKxR+JJ9h4GjrBkckMFd1VGgM8eySkQYJiM7xkiOc X-Received: by 2002:a62:1596:0:b0:537:c7e4:f106 with SMTP id 144-20020a621596000000b00537c7e4f106mr30141095pfv.42.1662041435663; Thu, 01 Sep 2022 07:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662041435; cv=none; d=google.com; s=arc-20160816; b=So0XIX8hBQuZjS2a4NoJSGwHMjvlKSht0eESXLXk923SZbo+MjqLCIyolVthxRGtyn fhHqzIxdDLc1M9dgLNRd3Cc8Os3gdYzPCgDYiw3GF0EZyL9LAB+V820WjgT7ZtN/fyhy 2b/d5cNAajtG8kra+Pi+kLKkR+Pk+cLmHs5ijeP6EPkv7xqDfHAA7Ot++0fH1bnIBlOT PGRge1ES1MBBTvyJuMiGdObMf5kuyYva67OAWpIZN8VF5PkYhbcCt8jdZSf9DUDoN8RP VO6PSFNiXP5rLlHPgl+IvsA3/Hr8y5n5zQ/+2ttE7ubsAa6TCO5BG8OuzTe3UuDnIYcT kFFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CPEA+6caVd0DcSzAnDWaGM7QkEeJpgnuvi3n1kHUm4E=; b=m/WaadhjbHdIYuRM9dr7hwocjPDW3+2AzqPxlM8zno/mScMoNydWpg2g0KS/2/vfbG KkaNYsE7Ok341e6gryfXYIGdFrFtiDMG44vpmp/RWz4GkyAafsCz7+xLFGvciv3dUPMa DYQOcnODDafGDeQQYLQwz5Rd/jA4UqKTAuIDy3/nQw/cYica1jPCP68I827AwUzIuON2 sNMcKRvwyIkPEqFOzR/Jm2T6rHTBxqi/Pr0AVHccWkDAnJg3gxTGby8XNNwPyb6J+PHB tyg4qKJF6kikMzlEa9WFQ98gniGsgdj1LsngXTma4C679cxJGj1YdHrfcFsqaDo0xlAo sicQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902d2d100b00172db9d9a01si12525726plc.616.2022.09.01.07.10.23; Thu, 01 Sep 2022 07:10:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234285AbiIANUa (ORCPT + 99 others); Thu, 1 Sep 2022 09:20:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232537AbiIANTw (ORCPT ); Thu, 1 Sep 2022 09:19:52 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38A0EAC for ; Thu, 1 Sep 2022 06:18:49 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="295718673" X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="295718673" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 06:18:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="563460497" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 06:18:47 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oTk3e-006tEK-2N; Thu, 01 Sep 2022 16:16:34 +0300 Date: Thu, 1 Sep 2022 16:16:34 +0300 From: Andy Shevchenko To: Dmitry Rokosov Cc: "broonie@kernel.org" , "gregkh@linuxfoundation.org" , "rafael@kernel.org" , "jic23@kernel.org" , kernel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v1] regmap: introduce value tracing for regmap bulk operations Message-ID: References: <20220816181451.5628-1-ddrokosov@sberdevices.ru> <20220831004530.zhvd7ehndqwmqgve@Rockosov-MBP> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831004530.zhvd7ehndqwmqgve@Rockosov-MBP> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 31, 2022 at 03:45:30AM +0300, Dmitry Rokosov wrote: ... > > > + if (val) > > > + memcpy(__get_dynamic_array(buf), val, val_len); > > > > I'm probably missing something, but what this condition prevents from? > > In general, this condition prevents memcpy from being executed when > tracepoint is called with a null pointed buffer. If we got a NULL pointer here, we already in a lot of troubles. I believe the check is not needed. Otherwise the function prints garbage. I will send a series to remove that and clean up the file. -- With Best Regards, Andy Shevchenko