Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp783093rwi; Wed, 2 Nov 2022 18:49:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HA6/Ki+UOeU4UkN8+sQk8gLXB/U/kVh4sQJ7TkInYvEriBLCpOqO0BxzoqBW+WEQ5jRuf X-Received: by 2002:a17:907:2715:b0:7ad:ef1e:3bc7 with SMTP id w21-20020a170907271500b007adef1e3bc7mr11233829ejk.580.1667440158019; Wed, 02 Nov 2022 18:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667440158; cv=none; d=google.com; s=arc-20160816; b=y9tPUeUsGWLyCLauV4iHcWijT+rG0HKuIRZZoG4tw26m0YEDoJBxeJNEJKMbHID/Eu NjzQ+y4SfA+niBBXnL1VtM3yk1Qc+Aiwcm6HHsax6oc7Ai6yoIZ33WScXYOzmuDPdlOA YaYixsvInsIBWRmKAJWPYDatd9uShdiukhUuhp8oizTpBlsYbSBbk3DSJt1i1dxCuARx m9QSEEiB0UPsRFU61PMu9mSIK/SWeDtB/xYop/8Szn4YKQAeZ95EmmIc4HmJIHe6wyXL 4+wrmu3e7aeuYm14UrIIN9JHLVVQI3wcOMoTbavTFM9JzNBkUmUYtog2KgkXqF67q5it pLpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=cAqvb1adlE7m5v5c13p4uOoA9i8UZn25iiLsJE+izqc=; b=nTTgVK5/ECc/VpIhgbT2774WgmrLBuoGT4r/UNJymYfODBr3xkuM5Oic9v242fflMq hBA9mndCootLAyo/vFKYrPhsnSHpnUz+/gOcx8ixno2Fw8Lqg0+WQ3C5rN+fOiZnnjOf 9MaWVYW9mjQgTPWd3vw2xHeX/Gu9zkyODmdQXYM1PmIhH6Zoi7o0WaXLifRksV1oGtVn SXvueyUsrogShfy/i33Nxs0df1eo8hOlQZbu5urTkkSvwiM2wJFyj4WfIYnAx+tB2tBT OIWGvN29SKRBs1obYkcTntt3q7jtfXhYwjAeOT3cL08E94hQru3rgxqjnhG9wZVYrEjB B/DQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a50aa90000000b00461b5ba9933si16562808edc.132.2022.11.02.18.48.54; Wed, 02 Nov 2022 18:49:18 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbiKCBVL (ORCPT + 98 others); Wed, 2 Nov 2022 21:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbiKCBVJ (ORCPT ); Wed, 2 Nov 2022 21:21:09 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B75E12A83; Wed, 2 Nov 2022 18:21:07 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N2mDF1KCbz15M1C; Thu, 3 Nov 2022 09:21:01 +0800 (CST) Received: from huawei.com (10.67.174.53) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 3 Nov 2022 09:21:04 +0800 From: Liao Chang To: , , , , , , CC: , , , Subject: [PATCH 2/2] KVM: x86: Fix a typo about the usage of kvcalloc() Date: Thu, 3 Nov 2022 09:17:49 +0800 Message-ID: <20221103011749.139262-1-liaochang1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.53] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Swap the 1st and 2nd arguments to be consistent with the usage of kvcalloc(). Fixes: c9b8fecddb5b ("KVM: use kvcalloc for array allocations") Signed-off-by: Liao Chang --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 7065462378e2..b33c18b142c2 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -1331,7 +1331,7 @@ int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid, if (sanity_check_entries(entries, cpuid->nent, type)) return -EINVAL; - array.entries = kvcalloc(sizeof(struct kvm_cpuid_entry2), cpuid->nent, GFP_KERNEL); + array.entries = kvcalloc(cpuid->nent, sizeof(struct kvm_cpuid_entry2), GFP_KERNEL); if (!array.entries) return -ENOMEM; -- 2.17.1