From patchwork Tue Sep 11 17:46:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 146477 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3902663ljw; Tue, 11 Sep 2018 10:47:16 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbGoChpAXxNpOPc/+mDbiOP514A/gI3vrd8wj6hfEhDqxr2W2mP4psi5x+QDWrcLxfU0/mH X-Received: by 2002:a62:8a4f:: with SMTP id y76-v6mr30600508pfd.233.1536688036523; Tue, 11 Sep 2018 10:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536688036; cv=none; d=google.com; s=arc-20160816; b=UjiRIAYDzAc7ob0W7yRpo9vmsLTN9aP6LPehsmOKd2nvpNTxen2Ui4j7fuNTHYkw3i rAu6SqwSH0zsa2g1gjtq7ZdxuAHOP/8uh0KWHr3BHbZkLltPFgK71XL0Gh9sDSwKQ/l+ O5XHu0GnSR6PKR1lsUpTOlokizKUUGqY9DTy/GMvnV6zJufB+xzwLwMnqb+PX9qs0iyQ B2PPXXuf6ATFr4QpDXl+fMZ/WqNNgW7bp522YO5yW6t0RoJ0TlXaQu7rjX2e/u21Iglp c1kz6F0AAbsd3GermgAmW9t/cPtq7YgNJTklwnRuDeQzs4GgGlnTk7j4zoTnwYNvTHH5 gffg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=lGkxae0idkG9O6iI5j3ScufmdGgRG3WnEEttniLuimQ=; b=Q9u52M/jc4A+EwrlGzcUuKUvQR0UxrS0TVlx+/bYutzQ4kVzTjeMyLwgAd3HUU0aIG 7x2jaglfx8mCNACRX3tUQAm2lMFczOruhkE/DP4aCswDa74mMu2jDHr/vxA87IuV9eRX 7X+pnjkZzdMIHWWDnB5lVHh0JGYVDtk7l2N/+er6uqJkOB2mD3B8WL5p2Gc7seKB4UHZ 1cihatQ4z74vwJTAFohjEVIagLMbrow86iJQcCuuVrX8rab7ehek74ZAQC1oExHMaBnO cttEk/VbcaAFg5TfnRmy9VNhZsniFFCBx6yvtWmPwLTC6VNqayktvUpJ+foZB+danS1f iVIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h0X5Rub5; 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 y141-v6si22063934pfb.331.2018.09.11.10.47.06; Tue, 11 Sep 2018 10:47:16 -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=h0X5Rub5; 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 S1728208AbeIKWr1 (ORCPT + 32 others); Tue, 11 Sep 2018 18:47:27 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:52794 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbeIKWr1 (ORCPT ); Tue, 11 Sep 2018 18:47:27 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w8BHkkPr044137; Tue, 11 Sep 2018 12:46:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1536688006; bh=lGkxae0idkG9O6iI5j3ScufmdGgRG3WnEEttniLuimQ=; h=From:To:CC:Subject:Date; b=h0X5Rub5dsFKxIEXEuKbYcGlVGrLMogzvrtk4aw1oUvO91gkqjIH3Dhot1htTD2dX +0wNyyqukvEijjkJxDmaFIGlQJG59mRTERbPIvIAiDB/HU74pQBkL6ZcRJJ0u+7c/p Wzbmnfjk79PtsbHC8GRyub3nSie1dOrH1TOqVf6Q= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8BHkkMx026793; Tue, 11 Sep 2018 12:46:46 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 11 Sep 2018 12:46:46 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 11 Sep 2018 12:46:46 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8BHkkXH012565; Tue, 11 Sep 2018 12:46:46 -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 w8BHkkx23076; Tue, 11 Sep 2018 12:46:46 -0500 (CDT) From: Suman Anna To: Bjorn Andersson CC: , , , Suman Anna Subject: [PATCH] samples/rpmsg: Introduce a module parameter for message count Date: Tue, 11 Sep 2018 12:46:43 -0500 Message-ID: <20180911174643.26199-1-s-anna@ti.com> X-Mailer: git-send-email 2.18.0 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.18.0 diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c index f161dfd3e70a..9b6b27ea504f 100644 --- a/samples/rpmsg/rpmsg_client_sample.c +++ b/samples/rpmsg/rpmsg_client_sample.c @@ -22,7 +22,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; @@ -41,7 +43,7 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len, data, 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; }