Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3320403rwl; Sun, 2 Apr 2023 05:20:57 -0700 (PDT) X-Google-Smtp-Source: AKy350Z0JGClDPQzPTwJU2STjUGAXLqmK+Ev410481mkBVl5St4KYO39S+ue0icxEadWYbVjAHz4 X-Received: by 2002:a62:1c4e:0:b0:626:2984:8a76 with SMTP id c75-20020a621c4e000000b0062629848a76mr31931612pfc.34.1680438057543; Sun, 02 Apr 2023 05:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680438057; cv=none; d=google.com; s=arc-20160816; b=XSKJ4CPb/ccj97UbnOHKhQwyo7uvfbqk9Qo1hJNmVDHtxUl0c3ZSJqiy3ndG8WUHeh ws6SY0OFKUgqU7AFCjqazHAZT8dJceq4gu47bhMDVYWIXGwDD0atD8mSrbFX4e/2Xryt DXxR4hYkrUC4b8w2Lnn7OnimYl3VcRAVwTnhIyscafI7f6zuDTpsTpqk1MWPPX8+Nolx gZb0i/36l8lNmOP+PdYYPfhHGMf3D7FZAHd4lsoTELAzgJkqmTx7Fi2fotCKsgLU0utI +NyMWpUkInNaI1S+SEpcuKmbhNh78mz+6GWYm1FQ9hsd7KVclMum3VCfM67toS/AK/GR QIkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=dwNzovjHEyjpqU30MkE+8SzBmo9neERc45QJj319RsI=; b=ohV72YdK4Lt0goLHJREuoBwBfYpF4eBktq1vaqCyM/zxnlNvuQb2XUbD3xYgp53xo5 W5GZ/ulBjdZ5Q7GrtX+PXLzrpvveyXPXiRxSChNag1ikUCPMAdOkmPtxNy+x3U2hoR6n YS7R9q2328Zm5uOQQa+2eg+K3bZ0RWoq7DaAGsmNifSiCiCSvzrpCI3s+ogI/NhRDfjq anij2Cq3SNg5YtV/9Yt1WbevdoigJJeqrqG7hAmqcRO20wm0j6BEWMvazLvIULmjwa0+ /DtkNAUcXGhZvn90NXLVVC1XbjS4R3Ts7IB+WpWgVHSio2I3+KSgvwSiosQin0uQbwAz JKYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e4gDTBli; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o125-20020a634183000000b005139ef2fc1dsi6375529pga.58.2023.04.02.05.20.43; Sun, 02 Apr 2023 05:20:57 -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=@kernel.org header.s=k20201202 header.b=e4gDTBli; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjDBLPq (ORCPT + 99 others); Sun, 2 Apr 2023 07:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbjDBLPp (ORCPT ); Sun, 2 Apr 2023 07:15:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F9AFAF0C; Sun, 2 Apr 2023 04:15:44 -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 ams.source.kernel.org (Postfix) with ESMTPS id D65FFB8068D; Sun, 2 Apr 2023 11:15:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA7C9C4339B; Sun, 2 Apr 2023 11:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680434141; bh=qDuCb9jB6m4dPBHgb/ksN36Hij3KDguXmS0bhWU2DiA=; h=From:Date:Subject:To:Cc:From; b=e4gDTBliFoU/oaCbgZJa+s1wt9Jia1+DIGqn5B/Wb51kBv+CKPgFkcPoQ/am+Y6YI Nvf1+Qgg0f+ds+ohoTYLjQerbMSovH5MXpEWJvzz9tX9ztqgGWPLhTq14FrRp1ZrsS CQguvUyybzd9vyTkBDIplQz2VYvYC9CRA6ONz+l9yIsQKAa/ZyJco6Qif7n/TpFecl DnLAei72nZQPnfZWu1/qZALbMM0qZ61lSkWp3wi7v6L8/QTI0NgU7RMg9VOYxshkJR UxZSaydpcShXcGOPzZ/vWXSp5sM8J/JKTPwaSi2wuvAyjCiAL4IwipM66nqQCP1dfH eBoJqNQm2cnTw== From: Simon Horman Date: Sun, 02 Apr 2023 13:15:33 +0200 Subject: [PATCH RFC] net: qrtr: correct types of trace event parameters MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230402-qrtr-trace-types-v1-1-da062d368e74@kernel.org> X-B4-Tracking: v=1; b=H4sIANRjKWQC/x2NQQrCQAwAv1JyNrDGpYpXwQd4FQ/pNrULZa3JK krp3w0eZ2CYBUw0i8GxWUDlnS0/isN200AaudwFc+8MFGgXYiB8alWsykmwfmcxpMhE+7aPh6E Fzzo2wU65pNHD8poml7PKkD//zxUu5xPc1vUHZpq9onwAAAA= To: Manivannan Sadhasivam , Steven Rostedt , Masami Hiramatsu Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 The arguments passed to the trace events are of type unsigned int, however the signature of the events used __le32 parameters. I may be missing the point here, but sparse flagged this and it does seem incorrect to me. net/qrtr/ns.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/qrtr.h): ./include/trace/events/qrtr.h:11:1: warning: cast to restricted __le32 ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer ... (a lot more similar warnings) net/qrtr/ns.c:115:47: expected restricted __le32 [usertype] service net/qrtr/ns.c:115:47: got unsigned int service net/qrtr/ns.c:115:61: warning: incorrect type in argument 2 (different base types) ... (a lot more similar warnings) Signed-off-by: Simon Horman --- include/trace/events/qrtr.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/include/trace/events/qrtr.h b/include/trace/events/qrtr.h index b1de14c3bb93..441132c67133 100644 --- a/include/trace/events/qrtr.h +++ b/include/trace/events/qrtr.h @@ -10,15 +10,16 @@ TRACE_EVENT(qrtr_ns_service_announce_new, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign( @@ -36,15 +37,16 @@ TRACE_EVENT(qrtr_ns_service_announce_new, TRACE_EVENT(qrtr_ns_service_announce_del, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign( @@ -62,15 +64,16 @@ TRACE_EVENT(qrtr_ns_service_announce_del, TRACE_EVENT(qrtr_ns_server_add, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign(