From patchwork Thu Apr 4 11:06:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 161776 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1454172jan; Thu, 4 Apr 2019 04:07:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzMXVI3M87jwTI7yQLlDCJ9vHtGx8iN1ByXEMlteixhs9R9UyrgdCw5dXjRLqJnjytBRvH X-Received: by 2002:a17:902:380c:: with SMTP id l12mr5510367plc.238.1554376039522; Thu, 04 Apr 2019 04:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554376039; cv=none; d=google.com; s=arc-20160816; b=oPNj+tguyDeDVBds438hO/z4GacepdtDu2B1WQ/BmS/p6N05ausV5yGpapd5gsGRa5 71wRyEEVsxOZUPmmtbPdFE0aJs178KdhX/KU0up2bWw+RXWxJTxTCsAebW1f4W/EtuW0 0sJ9L3ZdA3WFgTHISN0Tv4w6KKgB4ffgWtq3foAcwfLiotOqfnhGKce6TFu2vYT+L7zt 9EjAc+VxQsHIh9o1Ycm6ZX4rP/PKXXNGYMN8+t2yz8x1EeRN9q7EwKIgiOe+0rfK6VdI 8JMdccF0husBG/9eriEg88o5baJ2oHpFYvtAC653TqkxgJT01zmJw6KhAQuK+UD/2cTW BH/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rTCB4trMp3+/hiirLD2nEEbonlYRZIaX35QyuQfeVRM=; b=iGV1iLaV2GBaA2/AI/pTLrnZBPCVaklaHClGWmCsTR8OkO+mqAr7dQZHQsGqQ0cj8k I12DXwaUSljAWQjZyqLQWpkES+TXjYEGfrdGEXus6k1xzxmw8PbX6/d1B+PVYL3nAflB K+1C589X/+wYxt4xq1yQFvbOp8GcaSOVdyww/qXD6hgaDbEUTLrTcLOwIh7QUXC9/I7j UCzDGTrdG84Na39IGElr6Gc5S6nofL6HMUvNtWp2gnu+/gCkAQ4gS9cxOSI4J2Gj141L kFbUPSWcNoCuGmNEiV+tVs43aRck6HvafAmV3uhD5442cfT5cfy9npDUFQTk27Vg1Sk9 2f/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DxF21jQR; 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 n22si15975640pgk.102.2019.04.04.04.07.19; Thu, 04 Apr 2019 04:07:19 -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=DxF21jQR; 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 S1729191AbfDDLHS (ORCPT + 31 others); Thu, 4 Apr 2019 07:07:18 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:33996 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729032AbfDDLHQ (ORCPT ); Thu, 4 Apr 2019 07:07:16 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x34B7C1u024749; Thu, 4 Apr 2019 06:07:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554376032; bh=rTCB4trMp3+/hiirLD2nEEbonlYRZIaX35QyuQfeVRM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=DxF21jQRIODFjP3PFvOkZqaaZSCN/jP898h51AODXUI+uoJ4YiOVrmFF58+ehYUt1 s7DhS0cHSypQVT86p22LKl1+MnMANDt070tkQwfhCyAIeRxZZAdYFySt69dW3ix1lI hC4ewQPgSgVcFhmaF15ppkY47m4xzfYPBaGMUPGc= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x34B7CM6057594 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2019 06:07:12 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 4 Apr 2019 06:07:12 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.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; Thu, 4 Apr 2019 06:07:12 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x34B78dV106541; Thu, 4 Apr 2019 06:07:11 -0500 From: Kishon Vijay Abraham I To: Lorenzo Pieralisi CC: , , Kishon Vijay Abraham I , Sekhar Nori Subject: [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt() Date: Thu, 4 Apr 2019 16:36:08 +0530 Message-ID: <20190404110609.26158-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190404110609.26158-1-kishon@ti.com> References: <20190404110609.26158-1-kishon@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 'h' is a valid option character for pcitest utility used to print the pcitest usage. Add 'h' in optstring of getopt() in order to get rid of "pcitest: invalid option -- 'h'" warning. While at that remove unncessary case '?'. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori --- tools/pci/pcitest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index ec4d51f3308b..34d71f7d3b12 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -162,7 +162,7 @@ int main(int argc, char **argv) /* set default endpoint device */ test->device = "/dev/pci-endpoint-test.0"; - while ((c = getopt(argc, argv, "D:b:m:x:i:Ilrwcs:")) != EOF) + while ((c = getopt(argc, argv, "D:b:m:x:i:Ilhrwcs:")) != EOF) switch (c) { case 'D': test->device = optarg; @@ -206,7 +206,6 @@ int main(int argc, char **argv) case 's': test->size = strtoul(optarg, NULL, 0); continue; - case '?': case 'h': default: usage: @@ -224,6 +223,7 @@ int main(int argc, char **argv) "\t-w Write buffer test\n" "\t-c Copy buffer test\n" "\t-s Size of buffer {default: 100KB}\n", + "\t-h Print this help message\n", argv[0]); return -EINVAL; }