From patchwork Tue Oct 11 21:04:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004344 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 7F1BBC4321E for ; Tue, 11 Oct 2022 21:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229722AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE982317E for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=aKpASQxM+L1ao/hUZiGp7bz/wsNaofKipVnIHGWs+fg=; t=1665522295; x=1666731895; b=LUnkcaDo2XxOasU34kIbAlfZWdfyC6UCrreUwryT2QZOsd9 xJQCAdHeHoKFc5KCBKkogOduUjA+LpkQY4HUpkMt3ggLHMvumckeUXpzmQe29dH+fFAIppKj0/6G5 c+DfTwLwhwP4gPe9jET3vtXFU6jUz49uh7Vp7VHuk/+ueBTJafpeR3TW5THRGUxcLUKndbBYta9ww yfWUQR8uHwE3VpmAEzlNS5GJqxygkXrFvMhIEKoHRLLK5iM9S7z75bGMYF4P1M5HDx0YgTQim6m0X 1itR82mhepwKWmx7tUeXwF2New0NdsYboSeyrR9bzCP+XzWZdEfJFvUtkKaYFtFQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQm-0045LP-1n; Tue, 11 Oct 2022 23:04:52 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 14/38] patches: add spatch to adjust to changed ethtool ringparam API Date: Tue, 11 Oct 2022 23:04:22 +0200 Message-Id: <20221011230356.4d7ccb57c7e8.I18f41541a5b4c6f8285a78d32203e6dbc35a5105@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This changed in 5.17-rc1, so add the necessary ifdefs via a new spatch. Signed-off-by: Johannes Berg --- patches/0106-ethtool-ringparam.cocci | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/0106-ethtool-ringparam.cocci diff --git a/patches/0106-ethtool-ringparam.cocci b/patches/0106-ethtool-ringparam.cocci new file mode 100644 index 000000000000..b131d52039ca --- /dev/null +++ b/patches/0106-ethtool-ringparam.cocci @@ -0,0 +1,45 @@ +@set@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .set_ringparam = fn, + ... +}; + +@@ +identifier set.fn; +identifier dev, rp, krp, extack; +@@ +int fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +} + +@get@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .get_ringparam = fn, + ... +}; + +@@ +identifier get.fn; +identifier dev, rp, krp, extack; +@@ +void fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +}