From patchwork Fri Aug 9 16:27:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 170955 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10228963ile; Fri, 9 Aug 2019 09:27:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtq+q1UCkRnt1lO4yil87/xKKb9DzrBjdZf8YVMzJXFLt8fY8UMr+gVNQGvUD3gvr+xT7B X-Received: by 2002:a63:8a49:: with SMTP id y70mr19022920pgd.271.1565368044317; Fri, 09 Aug 2019 09:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368044; cv=none; d=google.com; s=arc-20160816; b=UWVn7AgrvDGRO7HhI10llFPsFOKh2QKv7yNEwU8V7ciLViSotGjPHYJRL+eH0nCu41 9xe7WmFK0rpvSwnNmcjV+1MrL4RNhKlx9WcrksSATxvInaAZi+dYygSVUElVXi+f8B7e BEqJvEhUOfU46hpUl1NkWfT8hLRh4XUmhb5tkW07j8uUrLqNy9ci8mxfd/AXAUUJX1SE cWpUf+2A0JLaPt7To0WI+vn45lu/6VffnGKUui3saCTrlclCofVWMB/s9fgrN6hgmT+N E4A+E2z4l0XXbmGEjCx06MU4/LqnEIhPY0De8fdDtosdIbFTw2ylIQ2/7rXDJS2EJSVP eesA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ycgZGu5jizhkdNlgseKrh0xuvw11PVPMLsg9Kj5tN+w=; b=MJHX0bXwvSrZbgblL3mi22npxzAWZabpys+sYjiOFmfmOIsStNw2vpHXt026GATlaL OlSVEX88RnI27fCAXdYQLmVcQ85GxNS3gAoiDQSEORZE5K7xHpccCO1Mm+nomsSBGHWm ueD/1H4nDWtfQevmilMKOM2i6FHOKG87FTUWS8/24NWVdBLKidjH0+AeqnbJrWLCmcl0 bd4vjclsmzRzH2RVTjndU4acCeCubwZb3jRmBRzjrsjzSmP/zV6+irQ0T7wlm6HXMMKf tq9Ypa5v+rWOVL3oD3BgcGj9E/PMQ3jNqqzeKE8VcccPfRhVrLorYNWUdTZGD5Pl38os kToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ybXgvvzX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c36si55984425pgl.287.2019.08.09.09.27.24; Fri, 09 Aug 2019 09:27:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ybXgvvzX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437071AbfHIQ1W (ORCPT + 28 others); Fri, 9 Aug 2019 12:27:22 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54360 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfHIQ1W (ORCPT ); Fri, 9 Aug 2019 12:27:22 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x79GRHmd008862; Fri, 9 Aug 2019 11:27:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565368037; bh=ycgZGu5jizhkdNlgseKrh0xuvw11PVPMLsg9Kj5tN+w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ybXgvvzX349Gw1IsgaEQY0uV4oCn6ib/HczFWW7kF1QJ4xMNBF1QT/Fi8jo8LX5B9 oq1E/oPW3fqup2kSp3TKnbKqh5tl4spWMvv5FvvAjILqNo2dGRY/QPBkt495Axx2n/ OnDwGeBqfCLJ76FotwO1fSr9+XU5089WJlYyj0/k= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x79GRHR5029802 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Aug 2019 11:27:17 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 9 Aug 2019 11:27:17 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 9 Aug 2019 11:27:17 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x79GRHlg092929; Fri, 9 Aug 2019 11:27:17 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.153]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id x79GRGZ10540; Fri, 9 Aug 2019 11:27:16 -0500 (CDT) From: Suman Anna To: Bjorn Andersson , Ohad Ben-Cohen CC: , , , Suman Anna Subject: [PATCH 1/2] samples/rpmsg: Replace print_hex_dump() with print_hex_dump_debug() Date: Fri, 9 Aug 2019 11:27:09 -0500 Message-ID: <20190809162710.823-2-s-anna@ti.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809162710.823-1-s-anna@ti.com> References: <20190809162710.823-1-s-anna@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace the raw print_hex_dump() call in the rpmsg_sample_cb() function with the equivalent print_hex_dump_debug() better suited for dynamic debug. This switch allows flexibility of controlling this trace through dynamic debug when enabled. Signed-off-by: Suman Anna --- samples/rpmsg/rpmsg_client_sample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.22.0 diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index 2a0695573b47..b9a99e621a5c 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -29,8 +29,8 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n", ++idata->rx_count, src); - print_hex_dump(KERN_DEBUG, __func__, DUMP_PREFIX_NONE, 16, 1, - data, len, true); + print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len, + true); /* samples should not live forever */ if (idata->rx_count >= MSG_LIMIT) { From patchwork Fri Aug 9 16:27:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 170957 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10229029ile; Fri, 9 Aug 2019 09:27:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqERdv2KqkY8T5Rp8Vb32E+Sf6jqMwotM35gg/gJiuAz4TADmf0i/fMphxeViUq/nkdOnq X-Received: by 2002:a17:902:ab83:: with SMTP id f3mr19831483plr.122.1565368048266; Fri, 09 Aug 2019 09:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368048; cv=none; d=google.com; s=arc-20160816; b=ZNdpjrGCIAWOHpZTzfR/nAki6LHgwtP3MZS3u3tK1CPn0Sd2zoLQxZgcdNh+6VFqcd OM7cQOt9AmLfkU/cAAqe8ZlJm0nKLuQZCyj9KIPT9GO5MM1gGFWWPpu4El79hK1ac4lm m5DmqyupwM3ew1E4m6UcUbnR3mPlPH2HBeOo7QJIWSW5haYxNNG7ppSlR7HIj/pnk5Qg VYxKGwJcu9boFodTKBw7jIQKhVkJy5Li5qdynDWhMO/nhOFbdXdbfN0Ko7qYA1gCMUCE CrQ+3eftMUKxASB91VwDvGM/SpL7wfM3Qfgfybll570Lkp2tN3cz3BIVAJqxgeu5/WJ+ r2nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hejhV7p35tABFvLqhdiGyN6o5tkE6x3rXXh80KuLZxc=; b=KS24zXtN8YQlooBdTc3k3WZRGOLgNs9wFYPtpfHXQapnO0J0LHJApjuLNTo7q0DXzr SmgSemAvmmVbyB1evq9G0SMvuhQLJmAcgPs99xnhh5b+HsXt3x5dTAwdhuCTeQh75CCG AoAUtuBzst0rwwSeEW/yBhrfgdv1G9c1WBs9GYO/1RCVlCkoiCpXNGpLRTxWawgDS33T iIsRD9Gcuf3jIq/Vl2jHyFMYKPtiiU06NcwkiCoK8zmydIfAPWJHizAY695sPawLWgO9 P/6Rjs4bTayDssGwNSTAr6irtmRw6JeD1o2VEVjEYceY44Gkr1ZrvGwsI9nFjwpyegXr 8WbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=olyPnxjT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t134si56030507pgc.361.2019.08.09.09.27.27; Fri, 09 Aug 2019 09:27:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=olyPnxjT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437199AbfHIQ10 (ORCPT + 28 others); Fri, 9 Aug 2019 12:27:26 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:55540 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbfHIQ1W (ORCPT ); Fri, 9 Aug 2019 12:27:22 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x79GRIaX068444; Fri, 9 Aug 2019 11:27:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565368038; bh=hejhV7p35tABFvLqhdiGyN6o5tkE6x3rXXh80KuLZxc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=olyPnxjTYspFa2lTlq6wq3nFOp8orHB0zNOLMdX60uTyyibXGhVj1omuuYp35mu6K rAp4IyJkbhbO74Iz3K3Xj+jex+dGtlD0KaY+OO+xfMwgtpIL5khaiGFavroPKk+0aF S+1KZMEVsl4Pw2U3IysD3WZbc4JwLdEB4N7CVOAw= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x79GRID0035097 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Aug 2019 11:27:18 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 9 Aug 2019 11:27:18 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 9 Aug 2019 11:27:18 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x79GRIqC032436; Fri, 9 Aug 2019 11:27:18 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.153]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id x79GRIZ10563; Fri, 9 Aug 2019 11:27:18 -0500 (CDT) From: Suman Anna To: Bjorn Andersson , Ohad Ben-Cohen CC: , , , Suman Anna Subject: [PATCH 2/2] samples/rpmsg: Introduce a module parameter for message count Date: Fri, 9 Aug 2019 11:27:10 -0500 Message-ID: <20190809162710.823-3-s-anna@ti.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809162710.823-1-s-anna@ti.com> References: <20190809162710.823-1-s-anna@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current rpmsg_client_sample uses a fixed number of messages to be sent to each instance. This is currently set at 100. Introduce an optional module parameter 'count' so that the number of messages to be exchanged can be made flexible. Signed-off-by: Suman Anna --- samples/rpmsg/rpmsg_client_sample.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.22.0 diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index b9a99e621a5c..ae5081662283 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -14,7 +14,9 @@ #include #define MSG "hello world!" -#define MSG_LIMIT 100 + +static int count = 100; +module_param(count, int, 0644); struct instance_data { int rx_count; @@ -33,7 +35,7 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, true); /* samples should not live forever */ - if (idata->rx_count >= MSG_LIMIT) { + if (idata->rx_count >= count) { dev_info(&rpdev->dev, "goodbye!\n"); return 0; }