Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2166525ybv; Fri, 14 Feb 2020 12:49:49 -0800 (PST) X-Google-Smtp-Source: APXvYqymyTQ9SFi/6/FZUSWqO+Gkkws3pGcnh6n2AV9UojVTfDdpdXyrWv8qThgw6iDsbXPVOfj7 X-Received: by 2002:aca:4c9:: with SMTP id 192mr3280991oie.105.1581713388938; Fri, 14 Feb 2020 12:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713388; cv=none; d=google.com; s=arc-20160816; b=YI4jM7G8KFrK4k9+CmtLOMFU3I30H9o4UTlbOaj+t7rfJBq5+WNtegDN7JJVgFV8ps /t+3IbiFjnh28ICAbwtgE0QNLfHylmQjRoTFWOwqcdYWUa3QyGJm+i9h8GVQy9dHlxlt 8d7D4sPn3iaZYb8XSAFyFmFWa3u7iDGVREPiJy91cspAFse/Q1XLpKFESaqCAtFRPWIe 1o1MwWQdFe1KbWZMOlWZNgQNlB6UdykljYD5YIkHJGiOiKqkIqvlzuKZWw4gE1g/fE9q e4/XYoU22E9E5lXx/9mc1UOkArCXhDyFcF4r4p3PCw5FQlfBbjxzk1k0tzqDqGlfT938 PfhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6XsQT0gObPoSU0UgJgA1GdqnzHklrUE0AMoAAAklsQY=; b=gI0r71snPv6vTBs2Ngy7GsYyd2/n0ljrqaEFipSJ0k1SbMN1wNzffIMOcOcRgn2Fje RY/5nsUz/po4mWRUH9jZn7No9Up+4D0Z1OndGAOqs8qtphgqGtUJC+sT2PtuJxhyMiUw 3EKR2MwxOySy9y1mJEoVbjemSSYCzbjZrEBwzpAGP+VLW9u/Piw9gqTNr4sZ2hdJQSqU eGP22QwROcnisiNWcsf+Gs9RJ4YTdXzItm1KyppptiT3a5ggcGyxvBVbuqap5hroZteJ 2WwneF8bLOiiYYF25Jydb236DWy7QPkXN8Mou0TwLjCzXVb172tIfjSvy8k6S9zyxjyM XCNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QrUJ8uRZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si3477397oth.274.2020.02.14.12.49.36; Fri, 14 Feb 2020 12:49:48 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=QrUJ8uRZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389169AbgBNUtH (ORCPT + 99 others); Fri, 14 Feb 2020 15:49:07 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55951 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388656AbgBNUs7 (ORCPT ); Fri, 14 Feb 2020 15:48:59 -0500 Received: by mail-wm1-f68.google.com with SMTP id q9so11330811wmj.5; Fri, 14 Feb 2020 12:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6XsQT0gObPoSU0UgJgA1GdqnzHklrUE0AMoAAAklsQY=; b=QrUJ8uRZoP8v/Sa9/OXY2Ur1o6rwClRgBosKHcqHIhy4H6FCEGUiUI3U1iWG7dM9B/ ZtxPAx5tCLR820zCr479QJBa3X/1y9n2/Uf3MzepzbLcj2e/7iB58lSCUFLQ8pn+MTqI DcF6okbihwy/vkt6VqCfo7wvWbJ0377cV5/42hVXS1vWmmgw/YE5f3JzpjNU9JK3UhBP 1E41y1TUZWfPbFnQrYMb1BhwgFOTfKTaodaZGTy52+CdnuuW1xMA1MwhRk/hhDAhWO47 2RHjEYPag5NNX6nFTnR0Nh3+AYXX2GiiOyQlprhoOMoocl1+e5GZetn8SO2HuE24WKCx mLNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6XsQT0gObPoSU0UgJgA1GdqnzHklrUE0AMoAAAklsQY=; b=K2FEt5bgiNi6TerBpdsMo0qRQv4C7rfILwQ5KMfKgAo1kmEpZOYbKZLHHySeRcpA4k nXcAmbfW4wa0RBI83T0uNfYSqOMt3qBQhCbI4m3FKdWp9JdonBlspT0U8iSAeldOzfpw AdVE0Q8yZB5FDlgLBobry1xkgjA4qcwk66h++t2d9fC6pIjYgaWHIu4HGZtIr1C7/iYx YSsPN3h0Bzc2j9UwSDnGXUYd9LdMSHFimdsHsGJVKIsIUA84BxCg6CtkrjTqtNPQJ0QS BW8sY6bgri+28l4F4HA9yjX4mATvKHechM8sAy9Y8cznxfQ4E4tSixsZ5V/Y6x/OwN4r Rejg== X-Gm-Message-State: APjAAAX45jIQ9WNU89W5sfqz1QRcUkIP4U8s93J7c05o1dB37ZBmiyAT H2GoXDzN46rVOyTL633ovvg6teQzlcCN X-Received: by 2002:a7b:c7cb:: with SMTP id z11mr6289679wmk.29.1581713337000; Fri, 14 Feb 2020 12:48:57 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:56 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Solarflare linux maintainers , Edward Cree , Martin Habets , "David S. Miller" , netdev@vger.kernel.org (open list:SFC NETWORK DRIVER) Subject: [PATCH 21/30] sfc: Add missing annotation for efx_ef10_try_update_nic_stats_vf() Date: Fri, 14 Feb 2020 20:47:32 +0000 Message-Id: <20200214204741.94112-22-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at efx_ef10_try_update_nic_stats_vf() warning: context imbalance in efx_ef10_try_update_nic_stats_vf() - unexpected unlock The root cause is the missing annotation at efx_ef10_try_update_nic_stats_vf() Add the missing __must_hold(&efx->stats_lock) annotattion Signed-off-by: Jules Irenge --- drivers/net/ethernet/sfc/ef10.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 52113b7529d6..b1102c7e814d 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -1820,6 +1820,7 @@ static size_t efx_ef10_update_stats_pf(struct efx_nic *efx, u64 *full_stats, } static int efx_ef10_try_update_nic_stats_vf(struct efx_nic *efx) + __must_hold(&efx->stats_lock) { MCDI_DECLARE_BUF(inbuf, MC_CMD_MAC_STATS_IN_LEN); struct efx_ef10_nic_data *nic_data = efx->nic_data; -- 2.24.1