Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4245653pxb; Tue, 25 Jan 2022 06:35:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbk4m7RsvJncmjoS+p46MNONreMp7EXhZTAsOgbPd5Ky3efJL72prUlnKZmarP0YnbF8CN X-Received: by 2002:a05:6402:195:: with SMTP id r21mr20492206edv.174.1643121348436; Tue, 25 Jan 2022 06:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121348; cv=none; d=google.com; s=arc-20160816; b=WocqlEWowspjeVrfXeAfhtICxInjs2zJFOAutc+ixVWttSTp3/QsBTrex6yEDh4lOO 1YSkX+Z9vvJIpjlgJMJBOaANls2pvNYx7fzV0mbL0syjmLgPyAfvX+LovfYmwh26PcCc 6MS546qKm4AQORaQIOLac2C1LGBje1YisvlifhkJ3ImhtcjfPFpe2PrDvWzsr/+6mPOw Fn7RBL45FoXmZI2UaKdUyapJovvUMILXOnzVhJPBhLewyVFnT32tvpN+HEtl+KxjqleI voCyqRFsNtmJtlt0t6MFM2wtaClGbFB2bh5lAMxEvF6/7UvgD9wwYXbW1GCCMkVBnrMe Hj8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fFdstgg2rUPcDb1ze6Gb3FBjJ5NhUjfUjZg63XhP3m8=; b=hdI+Tc3u4T0Jz0+iiGBxLAysSrhmEv+Gnak/xbLOLB6XfJmcy1rU7wHYl6il9GQurQ 4e1TPivAVDaqqqCWVSAkl7vtpxdNPnWuwltKCv2CR+xar7L/6Vri3r9+tMs0ZEyrtAFa W/B9c9iL6SMJOS59FM5KPO30Qv7a/dHuQHPVcPgNJbSuC9Cl48cHSHSlgR8K+yU84KHd kHKSW30kD/hlIMCxqxmKbcK3StKhxa9bST8xciW9z05DvU0zplrK8d5oHd1zl+AQPzgw QPf29i+nHp8saWivlTel6nF4D6/6MmfBJoD7AySK7cWo88lK7E8rAwt5xCnUXfKJG9+B Dn2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d+kNdAtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb8si11664339ejc.721.2022.01.25.06.35.18; Tue, 25 Jan 2022 06:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d+kNdAtM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238107AbiAYKCM (ORCPT + 99 others); Tue, 25 Jan 2022 05:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238379AbiAYJ7W (ORCPT ); Tue, 25 Jan 2022 04:59:22 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD4FC06173B; Tue, 25 Jan 2022 01:59:17 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id j16so8192112plx.4; Tue, 25 Jan 2022 01:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fFdstgg2rUPcDb1ze6Gb3FBjJ5NhUjfUjZg63XhP3m8=; b=d+kNdAtMC6VO/K1pd0rlN3+UkQOHTSr4/8Gvkn1XwyLvTnRQ/TA3GNk3a2s1bCr2Gd 3xuvmKQHZ3Fy9dVJw6BkE4phM9S95dvpNcR683U5+kTyWv8JQvTZmFLZVyvaluxvP1o5 +Wpx8L1PAgT5V9HdJURbByv1VzZq1ANPnl28o6uHseAe0V1tJUF6/LKGT+nMvK/xt7y5 ckk8STa/NEXmMkks/iqDTEARcLiofyLonnojaiQ26bLAnylen+NUHqpP/VwoCy70Oxrw G2myquSEOWdac1UHYok3RKBzxT1s2Y06/YTb1+IRAcchqE1v1j6GsmXeO23aUDER9Yyu wtpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fFdstgg2rUPcDb1ze6Gb3FBjJ5NhUjfUjZg63XhP3m8=; b=psNXcdOy0jAo8UoY/f0pN+V1p0iO9r5zgJECP2trw/Mqr+PtXg1rbM8H+vZQZzkhRR ADvCzkNhaQNK/2IKI2aznkE8ieCrSQy5U+W5RWG3WpQ94rMw/FxwEpVtb+Guw/ISznwo t/d1Phe/h9FxamdzKpf8vuEDv8OANsQteIfB5ys+Lk2auMFVpN/xxy4gJA3mOZ2nyrks lqyzi2mmxzDkjV/5QmMhEM9YLQ2buZLsuF2XvHooLgQiN+CU1NwaLE50wB2aGaFqMCHZ DJ8M6kFgfmgHzeGdO8/1RfSPv3FQeRVEvcLzzuLL6oLidWY8xxOLKuzDCddWEcGWuZQu eTXg== X-Gm-Message-State: AOAM531zDRKPAE83yJXBk1a5O0GUC5/FbgaHoz37GMqWpQWfsPUc6C3a 2Lu4Ae+l3G3RTVGf01Im+wQ= X-Received: by 2002:a17:902:8695:b0:14a:f006:db03 with SMTP id g21-20020a170902869500b0014af006db03mr17647228plo.173.1643104757470; Tue, 25 Jan 2022 01:59:17 -0800 (PST) Received: from CLOUDLIANG-MB0.tencent.com ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id mq3sm201606pjb.4.2022.01.25.01.59.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 01:59:17 -0800 (PST) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Paolo Bonzini Cc: Xianting Tian , Jim Mattson , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 00/19] KVM: x86: Bulk removal of unused function parameters Date: Tue, 25 Jan 2022 17:58:50 +0800 Message-Id: <20220125095909.38122-1-cloudliang@tencent.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Like Xu Hi, This patch set is a follow up to a similar patch [1], and may hopefully help to improve the code quality of KVM. Basically, the cleanup is triggered by a compiler feature[2], but obviously there are a lot of false positives here, and so far we may apply at least this changset, which also helps the related developers to think more carefully about why these functions were declared that way in the first place or what is left after a series of loosely-coupled clean-ups. [1] https://lore.kernel.org/kvm/20220124020456.156386-1-xianting.tian@linux.alibaba.com/ [2] ccflags-y += -Wunused-parameter Thanks, Like Xu Jinrong Liang (19): KVM: x86/mmu: Remove unused "kvm" of kvm_mmu_unlink_parents() KVM: x86/mmu: Remove unused "kvm" of __rmap_write_protect() KVM: x86/mmu: Remove unused "vcpu" of reset_{tdp,ept}_shadow_zero_bits_mask() KVM: x86/tdp_mmu: Remove unused "kvm" of kvm_tdp_mmu_get_root() KVM: x86/mmu_audit: Remove unused "level" of audit_spte_after_sync() KVM: x86/svm: Remove unused "vcpu" of svm_check_exit_valid() KVM: x86/svm: Remove unused "vcpu" of nested_svm_check_tlb_ctl() KVM: x86/svm: Remove unused "vcpu" of kvm_after_interrupt() KVM: x86/sev: Remove unused "svm" of sev_es_prepare_guest_switch() KVM: x86/sev: Remove unused "kvm" of sev_unbind_asid() KVM: x86/sev: Remove unused "vector" of sev_vcpu_deliver_sipi_vector() KVM: x86/i8259: Remove unused "addr" of elcr_ioport_{read,write}() KVM: x86/ioapic: Remove unused "addr" and "length" of ioapic_read_indirect() KVM: x86/emulate: Remove unused "ctxt" of setup_syscalls_segments() KVM: x86/emulate: Remove unused "ctxt" of task_switch_{16, 32}() KVM: x86: Remove unused "vcpu" of kvm_arch_tsc_has_attr() KVM: x86: Remove unused "vcpu" of kvm_scale_tsc() KVM: Remove unused "kvm" of kvm_make_vcpu_request() KVM: Remove unused "flags" of kvm_pv_kick_cpu_op() arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/emulate.c | 20 ++++++++------------ arch/x86/kvm/i8259.c | 8 ++++---- arch/x86/kvm/ioapic.c | 6 ++---- arch/x86/kvm/mmu/mmu.c | 23 ++++++++++------------- arch/x86/kvm/mmu/mmu_audit.c | 4 ++-- arch/x86/kvm/mmu/tdp_mmu.c | 4 ++-- arch/x86/kvm/mmu/tdp_mmu.h | 3 +-- arch/x86/kvm/svm/nested.c | 4 ++-- arch/x86/kvm/svm/sev.c | 12 ++++++------ arch/x86/kvm/svm/svm.c | 10 +++++----- arch/x86/kvm/svm/svm.h | 4 ++-- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/x86.c | 25 ++++++++++++------------- arch/x86/kvm/x86.h | 2 +- virt/kvm/kvm_main.c | 9 ++++----- 16 files changed, 63 insertions(+), 75 deletions(-) -- 2.33.1