From patchwork Wed Feb 1 05:45:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaoqin Huang X-Patchwork-Id: 13123776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30687C05027 for ; Wed, 1 Feb 2023 05:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbjBAFqY (ORCPT ); Wed, 1 Feb 2023 00:46:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjBAFqY (ORCPT ); Wed, 1 Feb 2023 00:46:24 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1FE253E4E for ; Tue, 31 Jan 2023 21:45:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675230334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=13iyMrEPGqfJCvL2yfeb8yGxwtVrKuwJE/ODZ2h33NQ=; b=KDIaRlKLibnjrUIzAkbkYu9iaQEdlJrzPOXQ8O1VXbx1z3shuNIj0ePAJOrLTLVgZ+eOWO hS2Zae9YFTKfdeprs02BBOl8fDauqYRcNLFD4IWy21bo8HUjHoLS1J7Gs0A9YXrpSLAeqw nLCen++X2/YJjROIIqBBg+3r9TMimjA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-319-Z_ToLan2PaSYDSt7Z0MoEA-1; Wed, 01 Feb 2023 00:45:33 -0500 X-MC-Unique: Z_ToLan2PaSYDSt7Z0MoEA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FF932A59546; Wed, 1 Feb 2023 05:45:33 +0000 (UTC) Received: from q.redhat.com (unknown [10.66.61.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 814DF401531B; Wed, 1 Feb 2023 05:45:30 +0000 (UTC) From: shahuang@redhat.com To: kvm@vger.kernel.org Cc: Shaoqin Huang , Paolo Bonzini , Shuah Khan , Sean Christopherson , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] selftests: KVM: Replace optarg with arg in guest_modes_cmdline Date: Wed, 1 Feb 2023 13:45:20 +0800 Message-Id: <20230201054522.162611-1-shahuang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Shaoqin Huang The parameter arg in guest_modes_cmdline not being used now, and the optarg should be replaced with arg in guest_modes_cmdline. Signed-off-by: Shaoqin Huang --- tools/testing/selftests/kvm/lib/guest_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/lib/guest_modes.c b/tools/testing/selftests/kvm/lib/guest_modes.c index 99a575bbbc52..1f2dca4520ab 100644 --- a/tools/testing/selftests/kvm/lib/guest_modes.c +++ b/tools/testing/selftests/kvm/lib/guest_modes.c @@ -127,7 +127,7 @@ void guest_modes_cmdline(const char *arg) mode_selected = true; } - mode = strtoul(optarg, NULL, 10); + mode = strtoul(arg, NULL, 10); TEST_ASSERT(mode < NUM_VM_MODES, "Guest mode ID %d too big", mode); guest_modes[mode].enabled = true; }