Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp636786imi; Thu, 21 Jul 2022 08:04:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sxTPrtCKAF8rYALvBWLBUNx0mBHw60eTsS+w2p0uSGxvigjqL0xTgfFyXSXtKZ6Tv5n69p X-Received: by 2002:ab0:4ad3:0:b0:384:243b:c95 with SMTP id t19-20020ab04ad3000000b00384243b0c95mr5532985uae.51.1658415887939; Thu, 21 Jul 2022 08:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658415887; cv=none; d=google.com; s=arc-20160816; b=xKJmMRDROm9gvGarOO7UOWadENlll+qEtswSfY2zquKttF+jD9rMzKGRtBj4Y0Wr9N e0YSE+/LDWocGivSEoQM+YfZaMH3WPiTTGd+ha+VPKMOmLWnMq5gGr2gMnQ48og95kP+ e/vz4yCGLhC7Qvr3XFxb1hTuo0iQYjCTiY+CZTJGZOCMdEIc/awMZR5JX1Nv3sP+gX6L Cn08EYJj7leEDWkmqBfzR2G6ejNry6BaX/mdsQICd58OT6wR44fLoD8xjjsXxywpeumb EUtmT1dnkvJVKZWZQO0XX/vhChd8hEYGo63xtrjLBUZMruAkcSeKES8DiGEIhPGCE1es RB8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=LZnrhTW0Fqj+gV1iEGOju+ZSnDl7pKjgf6K7E8bIcz8=; b=QgxiMqCgkj4kT0tYPvLBi1QUc/r3KgqENFHVEPWkyl+xWJarA1AaS29XWM/290yDAs jkPoFLY4e1lhIp4SSSLgi51Xdgga8d1h64ff/23ZZWR5axH+H5uS83iXlmL3JQ71t63t mtJ8dJsPNPV3o9NG4w/eZDWdQQVxfG7kzOAbKtK1druQaRDXPrsR9oexeRDd07xvwop4 JfKhN+kW+ZgnpfWCowBfTXckeZtTiq+D7N05/846FIZzemGxoL/QYf3gqted59vJAqAc pzZPYeyRmKneR3upZRKfFUvVrvsDosFGz9+cIZzZVG19oDq6lxDRAcFXmSYytsXQ/wHs /Nbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=D4yelCpm; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a67e043000000b003575b8cdfa2si256976vsl.604.2022.07.21.08.04.30; Thu, 21 Jul 2022 08:04:47 -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=@linux.dev header.s=key1 header.b=D4yelCpm; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbiGUOqc (ORCPT + 99 others); Thu, 21 Jul 2022 10:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiGUOqb (ORCPT ); Thu, 21 Jul 2022 10:46:31 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9D296D9DB; Thu, 21 Jul 2022 07:46:30 -0700 (PDT) Date: Thu, 21 Jul 2022 22:46:19 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1658414788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LZnrhTW0Fqj+gV1iEGOju+ZSnDl7pKjgf6K7E8bIcz8=; b=D4yelCpm2fyujnx6Wu3TMrwsEHCJ1zhM8vfCiRrX+f1zKcZixf8h767as8kaFyvN+bWx6E ebbE5kvn0INXrsPDyDSKRRETbJzuEn503qshdDuA4SHITokWVT2ZiDSCN8JU6uR9yemMHt 3aXpmZa9Yzf2cq2rB8W0mlP0dESyav0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Daniel Bristot de Oliveira Cc: Steven Rostedt , Wim Van Sebroeck , Guenter Roeck , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Shuah Khan , Gabriele Paoloni , Juri Lelli , Clark Williams , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org, Tao Zhou Subject: Re: [PATCH V6 02/16] rv: Add runtime reactors interface Message-ID: References: <4b5f93e3186b067073c1692d4c2b50d0b42101d5.1658244826.git.bristot@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b5f93e3186b067073c1692d4c2b50d0b42101d5.1658244826.git.bristot@kernel.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 Tue, Jul 19, 2022 at 07:27:07PM +0200, Daniel Bristot de Oliveira wrote: > diff --git a/include/linux/rv.h b/include/linux/rv.h > index b6bcdb4888e6..4f5b70eee557 100644 > --- a/include/linux/rv.h > +++ b/include/linux/rv.h > @@ -7,6 +7,12 @@ > #ifndef _LINUX_RV_H > #define _LINUX_RV_H > > +struct rv_reactor { > + char *name; > + char *description; > + void (*react)(char *msg); > +}; Like the definition of name and description in structure rv_monitor, use `const char *` for name and description. > +#ifdef CONFIG_RV_REACTORS > +struct rv_reactor_def { > + struct list_head list; > + struct rv_reactor *reactor; > + /* protected by the monitor interface lock */ > + int counter; Not see the `counter` be used(inc/dec). > +}; > +#endif