Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4831290rwe; Tue, 30 Aug 2022 18:39:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR4DNn166NwcZ0eqqtZ7oZUl3bm0Hr14Q/tRh/VHoVLqQ6a/OUXiMi3STCq6wANLw30XN3Kj X-Received: by 2002:a17:902:7296:b0:173:a75b:6539 with SMTP id d22-20020a170902729600b00173a75b6539mr24010420pll.127.1661909977625; Tue, 30 Aug 2022 18:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661909977; cv=none; d=google.com; s=arc-20160816; b=kTOSbQvfk5aAGP0IMKfA7vV2LQ5gNtgLaSOEhbArL3HSaChYPH1DEI9U/FuIABLp31 ZAtvxJl0TwKCacXDXnWqjaYkikJ4LWdq74rg0CTjvIBC37MipoY4KTFmMP7hZCRY4cNt KkuI1MC41o/Fn0c0s1AIu/N1gd4MDgJIEezE16vxk2sjmp33uOI8Kgt3Mkr69a7Z13He joLbG4SofLxReDlt99xzlGurKX/1/7QmTd5ax+2SB+NLVhdGqQJzgcvxm99psx3+39Cn kADFjacl4FWdnQWrMWwoEeM1UZZZfz0LSyOJ46RRBHikz7FMVKqx5S+7g0WgiOj+AvUI BXZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=n9fLKdgW9f2XXdObgGzN12Cm/zmLpIRqLh2L2kSmuVo=; b=wDNT713GzEmI1XoksP2NuH4I1osuCnolA9A8T8zs+ISHoajyj37Za0r5/Xs7OpPPGX elhyi4EbpZE2wjzMeAEHa/T1mG99TbDMi9LhpV0B/NJyt1OBkc8FSg6CMBLO8nJw6HiV B5yuxU39VNyD1aVzhr1mmHXBA7EOV+gdiBNniL9dIJJuDaQus4UpZKf0ytRF1eNBeWHg nxEmOPhYMV1NlAj3lLn1CurBfCPwsGJm9XWFD8HgdfaYy7h8rggcQGeXfjsrsvVCXb94 VmaD3pM1nNU/sKnX1Dul2h5GigaG5TXmj43qHBJApd3MLpaT4wUur2ELGb4PxvWnTVbo j08A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=isrmR80H; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r36-20020a632064000000b003ab358a4d44si3732510pgm.199.2022.08.30.18.39.23; Tue, 30 Aug 2022 18:39:37 -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; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=isrmR80H; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232287AbiHaAq5 (ORCPT + 99 others); Tue, 30 Aug 2022 20:46:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiHaAqf (ORCPT ); Tue, 30 Aug 2022 20:46:35 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5535598A4E for ; Tue, 30 Aug 2022 17:45:34 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id DDB465FD04; Wed, 31 Aug 2022 03:45:31 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1661906731; bh=n9fLKdgW9f2XXdObgGzN12Cm/zmLpIRqLh2L2kSmuVo=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=isrmR80H9bJEfe2uNnx9Yk8lrXM5pWBmjCWI1xKSkj1varZaSAgIqdbulwQQ6939t Nt4M9qIqcfWNlsWMPzf5JHYCbRcunL5Rd6ImNN41uhGrfUgLIUa/CQWC/MzemrH7wv 1g8WzChJUy6zTqqtWxFkCTkyEifqm91xr1BqPx17cxRbZ+gf+d8i+NaRrcOzCKgrgg J70jPj7otEwmW/RHGszIIOeVXrH371nQs92Pe9IeGXEv1JOJRACRvkrfIDGvfOYw7Y sbObqEUEXODpGb8LoEzlkNDuBGajIn0jRvJWptskwWChJXvshuVpenIyXJRSzgR/1/ Y7IH8N2vIJ9sQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Wed, 31 Aug 2022 03:45:31 +0300 (MSK) Date: Wed, 31 Aug 2022 03:45:30 +0300 From: Dmitry Rokosov To: Andy Shevchenko 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: <20220831004530.zhvd7ehndqwmqgve@Rockosov-MBP> References: <20220816181451.5628-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/08/30 23:23:00 #20191014 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 Hello Andy, Sorry for late response. I didn't have the ability to reach my laptop during last week. [...] > > > + 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. [...] > > + TP_printk("%s reg=%x val=%s", __get_str(name), > > + (unsigned int)__entry->reg, > > Why do you need casting? > To be honest, I've made it based on the already existing regmap tracepoints style. All of them make a cast to unsigned int type when printout reg number. -- Thank you, Dmitry