Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4728247ybb; Tue, 14 Apr 2020 12:58:54 -0700 (PDT) X-Google-Smtp-Source: APiQypKwlcUvM0ZiH1KJKNFgjjf4izN20WC8xZ/4nBLlGpvbcZT56UTnSC2Zn9BvMFKb24aCO0aT X-Received: by 2002:a17:907:361:: with SMTP id rs1mr1791371ejb.228.1586894333997; Tue, 14 Apr 2020 12:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586894333; cv=none; d=google.com; s=arc-20160816; b=VfGYl5L5jh78n+McNUursZKXriMsqtIlknQBrh+4keHJEuNLWVPeT5MHC3mICm2QwO C45XlzoAfu9Qt78gwAbQeb+i7Kqw++kFXJZTCPK+khM+cJU5HL7IPTzNkkBr04pKZjC+ CFOaLBpZxQUmuBG00wedbwbF9N2KFn+DiVnYWVMYdrg5dweoPojY1CypBiztAYrv9iCC nl5kVp7+5awDTSKxBKboTUEOVTRY/w2G+NR2zasASd+dGH2WmIN1CBy6L+0ND1clwQDe GwC4V3mEArqwVD43CX4D8GV1VMrrZkNMkT6ljLaJb06h0dF3z7i9PXLW8grHcHjsW4aM EnDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=v9GqIaMZnCXFSL0gg1+1j1pl+DuqYWQNyLKXwoBWpTM=; b=oJQKMjreJSVqBqhXrSRZcx/2hwfZT0XhNBS0WGB9AqGhsZ6vBeTmNpbTihncwbvp7I aRVLD02Muoe5axErdTDIZ5GgvmyO3+6t3sfe2iyE2wKBpxMyzn0PkqjSuIBUUCm8cO7b vo0JbTjvNKYeeB9XfsF10bbYmf+kszWfHJmQyb0TavLlYc66bBTEJBJLt1ril0eNpRNh euNWmit7rlb7RCbM2BkggD5v6zUrqlBNQjRJ6PtqJtHreng4U32LmakyvDW0gSTcubo5 hq0LNgacfw1vlY7NLYwjXOSvXhIJq7Y/HDUvS/2W3PHY+iljojEH3w3SaSswLW1eozBZ JrTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si9269008ejl.164.2020.04.14.12.58.30; Tue, 14 Apr 2020 12:58:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730356AbgDMPcu (ORCPT + 99 others); Mon, 13 Apr 2020 11:32:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:60688 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730336AbgDMPct (ORCPT ); Mon, 13 Apr 2020 11:32:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A252DAC9B; Mon, 13 Apr 2020 15:32:47 +0000 (UTC) From: Nikolay Borisov To: rostedt@goodmis.org Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, Nikolay Borisov Subject: [PATCH] tracing: Remove DECLARE_TRACE_NOARGS Date: Mon, 13 Apr 2020 18:32:46 +0300 Message-Id: <20200413153246.8511-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This macro was intentionally broken so that the kernel code is not poluted with such noargs macro used simply as markers. This use case can be satisfied by using dummy no inline functions. Just remove it. Signed-off-by: Nikolay Borisov --- include/linux/tracepoint.h | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 1fb11daa5c53..a1fecf311621 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -156,8 +156,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) * Note, the proto and args passed in includes "__data" as the first parameter. * The reason for this is to handle the "void" prototype. If a tracepoint * has a "void" prototype, then it is invalid to declare a function - * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just - * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto". + * as "(void *, void)". */ #define __DO_TRACE(tp, proto, args, cond, rcuidle) \ do { \ @@ -373,25 +372,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) # define __tracepoint_string #endif -/* - * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype - * (void). "void" is a special value in a function prototype and can - * not be combined with other arguments. Since the DECLARE_TRACE() - * macro adds a data element at the beginning of the prototype, - * we need a way to differentiate "(void *data, proto)" from - * "(void *data, void)". The second prototype is invalid. - * - * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype - * and "void *__data" as the callback prototype. - * - * DECLARE_TRACE() passes "proto" as the tracepoint protoype and - * "void *__data, proto" as the callback prototype. - */ -#define DECLARE_TRACE_NOARGS(name) \ - __DECLARE_TRACE(name, void, , \ - cpu_online(raw_smp_processor_id()), \ - void *__data, __data) - #define DECLARE_TRACE(name, proto, args) \ __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ cpu_online(raw_smp_processor_id()), \ -- 2.17.1