From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CEE9C433EF for ; Mon, 27 Sep 2021 16:40:11 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 17B0F6113D for ; Mon, 27 Sep 2021 16:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 17B0F6113D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 862AE4A3A5; Mon, 27 Sep 2021 12:40:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sjj9a1BYTzpm; Mon, 27 Sep 2021 12:40:09 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7AA7C40762; Mon, 27 Sep 2021 12:40:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 34F1740762 for ; Mon, 27 Sep 2021 12:40:08 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x644mJgmY9O7 for ; Mon, 27 Sep 2021 12:40:07 -0400 (EDT) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2BDF94057F for ; Mon, 27 Sep 2021 12:40:07 -0400 (EDT) Received: by mail-wr1-f43.google.com with SMTP id u18so53084247wrg.5 for ; Mon, 27 Sep 2021 09:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=ShmHcW7/EwN9y31VztAl5sWbgy+qbrOKhzAJBDeQTwUbLr3EqJa1zCP54fk27oJaHN nX+uDlhxuiJm3MuzUgDfp71rKNZvZ/NtJgJoIXrNrdO1oET1vtkPUCJFKKuxcfL8Kd9r 9pXlnfVc5BbCh9f1BDvaKpeLDgurgmakIcGdrEJt87/+j7UM2g/CJGgDD7aJQz60TKkw D2LnDAOLUSm1coZM2D8JKP+EklxtaxFNBRJkjvZzmhDBc8X374FhqrUFYc/mz4WbES3t YNN1I+kET1+Jp/qfcCwCE5u8Mu+wX/3NCdC6+iqAiUdPwtk043eGTxBDETr8YPgo4a85 +beg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=dgaKUuAeMdPlnygbeUtTpTBe2DfHF6U8Nsm4HTvSLTNo19XqnKqlxt61HSMzmHYQhN D+YJJhUsq67eecwxwdkRFkNe8QYnQ8GxulR1oBHKkYja/9olWE6xVfYsgCWkgd/V80Wz LL1ahPuzDCwE3WyqOQ0QouhU1wQXa0q+ggrO+MC7GVYk4be7BzBywdHMDGSdGf19lRUt tvu9kHJBU1Nf26jMwE2jlKlPju/oTstWXLkCcAIuvccVMPNkgWY1PmEyfVNJhYh9xbxv f8OBCeB7sapWzx8UMXczBgTcJboCGlTL7TMKRsdq8CAEbCcelBQawNjcq2Pjc9mEsBNZ LSyw== X-Gm-Message-State: AOAM532ekKrnHX9hdAkEsxn64W0aja1mIFeUIh6zn44i3VOZXDCOBvtq Z5UNijgMaLkhwcuTGdq432+5kQ== X-Google-Smtp-Source: ABdhPJxeIsgFjgYqOUquyC+YdPRjFg7ImEHfUd+nnFiThBHOZhs4dFClXfQIVL5NXC3K9mRijFdtDA== X-Received: by 2002:adf:f48b:: with SMTP id l11mr977771wro.254.1632760806108; Mon, 27 Sep 2021 09:40:06 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:fa68:b369:184:c5a]) by smtp.gmail.com with ESMTPSA id x4sm18967wmi.22.2021.09.27.09.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 09:40:05 -0700 (PDT) Date: Mon, 27 Sep 2021 17:40:03 +0100 From: Quentin Perret To: Fuad Tabba Subject: Re: [RFC PATCH v1 12/30] KVM: arm64: COCCI: add_hypstate.cocci use_hypstate.cocci: Reduce scope of functions to hyp_state Message-ID: References: <20210924125359.2587041-1-tabba@google.com> <20210924125359.2587041-13-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210924125359.2587041-13-tabba@google.com> Cc: kernel-team@android.com, kvm@vger.kernel.org, maz@kernel.org, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Friday 24 Sep 2021 at 13:53:41 (+0100), Fuad Tabba wrote: > Many functions don't need access to the vcpu structure, but only > the hyp_state. Reduce their scope. > > This applies the semantic patches with the following commands: > FILES="$(find arch/arm64/kvm/hyp -name "*.[ch]" ! -name "debug-sr*") arch/arm64/include/asm/kvm_hyp.h" > spatch --sp-file cocci_refactor/add_hypstate.cocci $FILES --in-place > spatch --sp-file cocci_refactor/use_hypstate.cocci $FILES --in-place > > This patch adds variables that may be unused. These will be > removed at the end of this patch series. I'm guessing you decided to separate things out to make sure this patch is purely the result of a coccinelle run w/o manual changes? It looks like the patch to remove the unused variables is a 'COCCI' patch too, so maybe it would make sense to run it here directly after the first coccinelle run, and squash the result into this patch? The resulting patch would still be entirely auto-generated, and wouldn't have these somewhat odd unused variables. Thoughts? Thanks, Quentin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE4B1C433EF for ; Mon, 27 Sep 2021 16:42:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85C0E608FE for ; Mon, 27 Sep 2021 16:42:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 85C0E608FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WeOA8t9nmjIAuQOK0jmuf7gXks+FOE16iu8x3+awzfk=; b=0a/LnSL8yxMcAg 3jfe0c8Wv9V9xKsrHGMQLnKhitPwBEKh3qOJvij5Mo2HDp8bILVKlNY4CVNIPNv3Scyt9LDpCTDEX voiRvpogAArBFv0N0lUFopu1bjiGgXxw9WnxspcN2kMRUZyV/duzQs8iynN+vme56cB+5h6U6CUO6 eM/8NCZQG75fSlYcFWxeB51MeTJ50fxOHZAO2BODZ5bXFV1f9y4aLfoB1C33URtUO5KuZ8oK/y2+C f93Yub00b72UJTKBhfC1RRzAVlufJuXpZ7RF8pURetquujEovWae7O1NFwu6MBREjI8uprLpa3KHV wnjFoNjEDb66j6wrKyQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUtfm-003PU4-QT; Mon, 27 Sep 2021 16:40:11 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUtfj-003PT6-G0 for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 16:40:08 +0000 Received: by mail-wr1-x430.google.com with SMTP id v17so9623712wrv.9 for ; Mon, 27 Sep 2021 09:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=ShmHcW7/EwN9y31VztAl5sWbgy+qbrOKhzAJBDeQTwUbLr3EqJa1zCP54fk27oJaHN nX+uDlhxuiJm3MuzUgDfp71rKNZvZ/NtJgJoIXrNrdO1oET1vtkPUCJFKKuxcfL8Kd9r 9pXlnfVc5BbCh9f1BDvaKpeLDgurgmakIcGdrEJt87/+j7UM2g/CJGgDD7aJQz60TKkw D2LnDAOLUSm1coZM2D8JKP+EklxtaxFNBRJkjvZzmhDBc8X374FhqrUFYc/mz4WbES3t YNN1I+kET1+Jp/qfcCwCE5u8Mu+wX/3NCdC6+iqAiUdPwtk043eGTxBDETr8YPgo4a85 +beg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=lVzH+v3QiV/GckT2XDl17gCrL2+5JeBeEFN09b2585GU+xWt9ly6xj8yrW5ExNjHXB otp4CqUzeBT7Q8YERJOVOx/4+vwfN1NJnvlfIpqENlOGv2KiF6hVQp/gaEgrxAfrEhV/ pgQjz7qHbQb+b+/Fm2KmCWIEvm/NMLsWyWfvz+MLURTwkJNfAh9NuE7X8YQs0ae6EOFX HgUR0NsoPHWUX5Q1hRUgSEP+XmhnBJ3H3i+OigOOirfx9Fl7rfegvJz7tOc/wZt8M9ZA CVaiBe9Mxz8syw2SaGz9YoJNH+FgvjIlH5bs+PWexp5t2/DXVM34DCWzJsxs8onijrkC +kfQ== X-Gm-Message-State: AOAM530NwYbdk4uCGZzH+EpEQ7Bft0SELHi+R7VE52cFQohp1T3jzn6i +V3NQu8EekspcreaGShznBtLDQ== X-Google-Smtp-Source: ABdhPJxeIsgFjgYqOUquyC+YdPRjFg7ImEHfUd+nnFiThBHOZhs4dFClXfQIVL5NXC3K9mRijFdtDA== X-Received: by 2002:adf:f48b:: with SMTP id l11mr977771wro.254.1632760806108; Mon, 27 Sep 2021 09:40:06 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:fa68:b369:184:c5a]) by smtp.gmail.com with ESMTPSA id x4sm18967wmi.22.2021.09.27.09.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 09:40:05 -0700 (PDT) Date: Mon, 27 Sep 2021 17:40:03 +0100 From: Quentin Perret To: Fuad Tabba Cc: kvmarm@lists.cs.columbia.edu, maz@kernel.org, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, drjones@redhat.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: Re: [RFC PATCH v1 12/30] KVM: arm64: COCCI: add_hypstate.cocci use_hypstate.cocci: Reduce scope of functions to hyp_state Message-ID: References: <20210924125359.2587041-1-tabba@google.com> <20210924125359.2587041-13-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210924125359.2587041-13-tabba@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210927_094007_564904_3E9D0B45 X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Friday 24 Sep 2021 at 13:53:41 (+0100), Fuad Tabba wrote: > Many functions don't need access to the vcpu structure, but only > the hyp_state. Reduce their scope. > > This applies the semantic patches with the following commands: > FILES="$(find arch/arm64/kvm/hyp -name "*.[ch]" ! -name "debug-sr*") arch/arm64/include/asm/kvm_hyp.h" > spatch --sp-file cocci_refactor/add_hypstate.cocci $FILES --in-place > spatch --sp-file cocci_refactor/use_hypstate.cocci $FILES --in-place > > This patch adds variables that may be unused. These will be > removed at the end of this patch series. I'm guessing you decided to separate things out to make sure this patch is purely the result of a coccinelle run w/o manual changes? It looks like the patch to remove the unused variables is a 'COCCI' patch too, so maybe it would make sense to run it here directly after the first coccinelle run, and squash the result into this patch? The resulting patch would still be entirely auto-generated, and wouldn't have these somewhat odd unused variables. Thoughts? Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B0DAC433F5 for ; Mon, 27 Sep 2021 16:40:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 038E8610FC for ; Mon, 27 Sep 2021 16:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235701AbhI0QmB (ORCPT ); Mon, 27 Sep 2021 12:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbhI0Qlu (ORCPT ); Mon, 27 Sep 2021 12:41:50 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2516C061604 for ; Mon, 27 Sep 2021 09:40:07 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id t8so53119421wrq.4 for ; Mon, 27 Sep 2021 09:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=ShmHcW7/EwN9y31VztAl5sWbgy+qbrOKhzAJBDeQTwUbLr3EqJa1zCP54fk27oJaHN nX+uDlhxuiJm3MuzUgDfp71rKNZvZ/NtJgJoIXrNrdO1oET1vtkPUCJFKKuxcfL8Kd9r 9pXlnfVc5BbCh9f1BDvaKpeLDgurgmakIcGdrEJt87/+j7UM2g/CJGgDD7aJQz60TKkw D2LnDAOLUSm1coZM2D8JKP+EklxtaxFNBRJkjvZzmhDBc8X374FhqrUFYc/mz4WbES3t YNN1I+kET1+Jp/qfcCwCE5u8Mu+wX/3NCdC6+iqAiUdPwtk043eGTxBDETr8YPgo4a85 +beg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uBxEi6AYAf/IDfN1v8J251RrBh4CFzk1e5mArk5PNvU=; b=c6qjJHHKBOaOVWUOxLw+EuUzJhINGt1FlFUPLMPo5CCE31iRK7o888RmM8yhjwxsOU Hid19bN+JAHweyEcE8ZBw7g/YWZmQS5NFN1MZ3SIgToxKor1con+OUOqHz7lHqpotuuC grYmA6lfD6T4ZxVH9AhNaHzt6Tvf690/dF8AsPbeHPLVXtLptb+6pUu6Irneyr21bB8m yrAmAxfKUlPkT6YLqXQ4l/WwpEsKT9BIAO2sCjFoyqyhShI1wjA6FYFaVTk7fOMJ55Hr OoOJHLIu0Ps2O4WeJO7QTi1mKcxA9cuCv8PBkdtHQdqOsw4KPBCU7QQKHo3q5rkt7zWz Ay9A== X-Gm-Message-State: AOAM5334SiQw7vauTTibUB/iEP7XKofVLMgB3ebuzGsne8299qNsW2HL cpim6Lm4XkOIohv+F+k1+emhGw== X-Google-Smtp-Source: ABdhPJxeIsgFjgYqOUquyC+YdPRjFg7ImEHfUd+nnFiThBHOZhs4dFClXfQIVL5NXC3K9mRijFdtDA== X-Received: by 2002:adf:f48b:: with SMTP id l11mr977771wro.254.1632760806108; Mon, 27 Sep 2021 09:40:06 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:fa68:b369:184:c5a]) by smtp.gmail.com with ESMTPSA id x4sm18967wmi.22.2021.09.27.09.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 09:40:05 -0700 (PDT) Date: Mon, 27 Sep 2021 17:40:03 +0100 From: Quentin Perret To: Fuad Tabba Cc: kvmarm@lists.cs.columbia.edu, maz@kernel.org, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, drjones@redhat.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: Re: [RFC PATCH v1 12/30] KVM: arm64: COCCI: add_hypstate.cocci use_hypstate.cocci: Reduce scope of functions to hyp_state Message-ID: References: <20210924125359.2587041-1-tabba@google.com> <20210924125359.2587041-13-tabba@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210924125359.2587041-13-tabba@google.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Friday 24 Sep 2021 at 13:53:41 (+0100), Fuad Tabba wrote: > Many functions don't need access to the vcpu structure, but only > the hyp_state. Reduce their scope. > > This applies the semantic patches with the following commands: > FILES="$(find arch/arm64/kvm/hyp -name "*.[ch]" ! -name "debug-sr*") arch/arm64/include/asm/kvm_hyp.h" > spatch --sp-file cocci_refactor/add_hypstate.cocci $FILES --in-place > spatch --sp-file cocci_refactor/use_hypstate.cocci $FILES --in-place > > This patch adds variables that may be unused. These will be > removed at the end of this patch series. I'm guessing you decided to separate things out to make sure this patch is purely the result of a coccinelle run w/o manual changes? It looks like the patch to remove the unused variables is a 'COCCI' patch too, so maybe it would make sense to run it here directly after the first coccinelle run, and squash the result into this patch? The resulting patch would still be entirely auto-generated, and wouldn't have these somewhat odd unused variables. Thoughts? Thanks, Quentin