Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4524790rwl; Mon, 3 Apr 2023 06:18:12 -0700 (PDT) X-Google-Smtp-Source: AKy350YfVlBGZHBeNnVyWoW1czt6ISNItLPT8BVfS+tCIX2/4U1VNE6vFp/cH8J8SQQgQJvyhoyA X-Received: by 2002:a17:906:e0c6:b0:93b:a133:f7e6 with SMTP id gl6-20020a170906e0c600b0093ba133f7e6mr32706525ejb.46.1680527891774; Mon, 03 Apr 2023 06:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680527891; cv=none; d=google.com; s=arc-20160816; b=w/SGU7lRQbRuSXBpSaTnH0uBekGVRX4cTAs8PmdPOR2WlR1C0GLDDtVnMVi3qaHpdj 00evOITBjUldqtWljtZcFnnzyTbtc8b3EzfF6SPnZFAkq0aNVeRHWvLMhwHh9Ht6cIAt fgfmXvQWMBpxp8N4rICwIaDi7DBg+RyOwLOqoEjGTeZey1GSAayfE6rGBZyNXcyOqICS V9pK9PV6UFw0Wlb1F0x80djzjERxSiW4gVqFE5jWlefC1Uks35JdPv9yNkXgCdJp5C7E NPaPnEsP4utnN11PrQLdEgKJ1w8OdUsKW7Hg1OdwHa4cstfXz9/eYhvLH7EN45X9pQ8Y 9hLg== 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:date:dkim-signature; bh=QAV3sdLHu+/DfazQI0mFqQgwyB2hsfX1SWF9Zzdebqg=; b=Yidhnlbof3o+Qi0uT08Ifqh150gX63vqrh/1rtQzWYxH7oGbCcb8Gy9sA6KMJJB82n O7/SAX++LgyF0Es9DBySRn+fB+IGLvbP11hhWLS15cZ0TDvd4j+wWJCowU7swvoo79vQ QNO+UQrwbpGND0ud0TFRavImHb5S84mWMOg0YtOQxfTfpU/yoi0a/+wU0FIEEDXFXLtb +yfO5jjvLpt82W15NQcbPhBkiy4UWwXivmvJ0Q/i3BjeSLsKcg55d07/fGEgOkWQ5V7R EPeAb6k6wfmcT4kZgK2gp8XpxaJDdv7LkTqa+dU0mhJUY779VOtoKeh1E9bUy7Qp1V3p ecAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gggQY+4w; 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 lr6-20020a170906fb8600b0092ff55fd0cfsi3476959ejb.818.2023.04.03.06.17.47; Mon, 03 Apr 2023 06:18:11 -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=gggQY+4w; 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 S232560AbjDCNLA (ORCPT + 99 others); Mon, 3 Apr 2023 09:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232299AbjDCNKx (ORCPT ); Mon, 3 Apr 2023 09:10:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B0AC22EA8; Mon, 3 Apr 2023 06:10:46 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 307D961AC4; Mon, 3 Apr 2023 13:10:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31201C433D2; Mon, 3 Apr 2023 13:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680527444; bh=3b2ENjjWzb2QJ0MXawu7kgVsFRlkLRrqtQBzOOQHUks=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gggQY+4wprQzVkw7hhfNN6RAyK77n5ZvqKJofkbyHOYZaLLqeTkc0bQCsBuc9ZgSA zgIYPSgcpjcOkS9WS0Ak0wUAiAQcAj+Hsy8m+IObyM1wAEz6M393ZCGBGm9APRkuFX /W6+uephIRORbWgf6P5tOaJjLH0TRYdPN4NkK7v5obnSzqI3u9KPlVcDAVT+KEcmCH lJ2SS93PTAKrcjny40SKb38xMi5AlpcL5HUH92dAdeWsvAPNgj7h75LjYbgaJ0U4BY QzsswF52xa4+1j6+xh90mbfm5b1nUrq9XKJDThvA/lO2CKBUTVG70wI+eeuYWyEzfx XEP+u5VhjM1mQ== Date: Mon, 3 Apr 2023 15:10:40 +0200 From: Simon Horman To: Manivannan Sadhasivam Cc: Steven Rostedt , Masami Hiramatsu , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH RFC] net: qrtr: correct types of trace event parameters Message-ID: References: <20230402-qrtr-trace-types-v1-1-da062d368e74@kernel.org> <20230403051436.GA4627@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230403051436.GA4627@thinkpad> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 On Mon, Apr 03, 2023 at 10:44:56AM +0530, Manivannan Sadhasivam wrote: > On Sun, Apr 02, 2023 at 01:15:33PM +0200, Simon Horman wrote: > > 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) > > > > You are right. The actual arguments (service, instance, node, port) transferred/ > received over QRTR are in le32 as per the protocol. But in the NS driver, the > arguments passed to the trace events are in the native endian (i.e) before > getting typecased to le32 for transmission. > > And my intention was to trace the arguments in native endian format only. So > this patch indeed fixes the issue. > > > Signed-off-by: Simon Horman > > Please add the fixes tag once you remove RFC, > > Fixes: dfddb54043f0 ("net: qrtr: Add tracepoint support") > > Reviewed-by: Manivannan Sadhasivam Hi Manivannan, thanks for your review. I'll add the tags and drop the RFC designation.