From patchwork Fri Jun 11 20:39:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 458517 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp1268386jae; Fri, 11 Jun 2021 13:39:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY0YdfCORzsBvIPye4Odlkmh1LuMavYrbrswYLVm0gtFGFoSj4frhmp8swPAqG0zhPSzEt X-Received: by 2002:a05:6402:b17:: with SMTP id bm23mr5506260edb.236.1623443995722; Fri, 11 Jun 2021 13:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623443995; cv=none; d=google.com; s=arc-20160816; b=W2+rK0BUBhL5z7qX/9+peFQB2WfJTFfnXewr5GwOUTrfeS1g9ZPerU+I3woTEfkE5y FlBTiSRCHnJGDVk8ngTfRc+cVhO2nqzDqQRpTOw2rtU4X/Ps17JupIERPO6oCX36y0mD FMNzpYxWgvGBOdTQ5AJr5RFe0PgjUyYVB+q+OLOjxu0ZKlnIG/KJPeNnSJN3UEM66VE9 UuELl6e0Zfby32aG7Aq5kwNhTAOIq4XEITuhfEhssO2MdF4tAZq1oAb5njoj0ZF9shAi JsN/EX74/MlGQgi5D3mXdKimWnsSEVN/M9VqVVR7HFI4JgknBxEooNTkTjo9iRIn3BEF +N1A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P7uaYucC+62klUqk+ruT7sASOO838Q3Fy6yssPZtvh4=; b=XWmmmFi2e5hQsn7PmEmzqsC4EO0ctjK+03D4GbQdI4WGwnV8AoVgcMRztN+kvm/swn 3VJLN5L88yDOcTgDUY+VePaLll8RuWkmDBbub8rrkt/+Ys59drrzIcRApWPpdDBumj+b NC33qDyVxHT+Gs28ow8z+aMQ14wHSaAIxgFR/lrPAWCxr7xauF4pe5aZYF4hv25nNm6P SrxI+i/kUUfQBOuqKLW+SvxO+HK6+Nlz3Svx+4mgKliDR4wBv6ENqy3iES6DtBl+5WW2 mrn71NwZUBjrtaNnjbkcatGwX1jhCWW/Qcs+CK9DX5mDBiau/GAjeZb784PCZVP8RxgI xSMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KMCAcHJA; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si5385307edq.534.2021.06.11.13.39.55; Fri, 11 Jun 2021 13:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=@linaro.org header.s=google header.b=KMCAcHJA; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbhFKUlq (ORCPT + 8 others); Fri, 11 Jun 2021 16:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbhFKUlq (ORCPT ); Fri, 11 Jun 2021 16:41:46 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D39C061574 for ; Fri, 11 Jun 2021 13:39:47 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id l64so10886482ioa.7 for ; Fri, 11 Jun 2021 13:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P7uaYucC+62klUqk+ruT7sASOO838Q3Fy6yssPZtvh4=; b=KMCAcHJAIMxrgGwUWsIpQ9GXDLNt5lT/NifJxtXW+piGpj/hshXULJfk6G3W/Ce/zI nI+LlP2qDy73Q6Kl8mFbbuzvuIEdchOnRywPShlPUaYjK6KZXxyKEvRQAnwICSDieWVl l1Hns8Xs5uyGYuuVH3+JXO5Z4V0o4luisclY9/O/pkh8WXNujyHC8vWLhRH2JPffbzKZ Tf2+M6anOupoo1HM4OMsUkLyvarGujJIpqKr2YvHZ4rbuTSK7p6g2h6Pc7k8qpl15y8Z xHsqLw9k8/OEVcPjuqC53U8vBbgORFVvjcrxaMuZr7pQtQC5Hwcrv0Gwb7f5QpqHgJPK z4DQ== 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=P7uaYucC+62klUqk+ruT7sASOO838Q3Fy6yssPZtvh4=; b=hhoO4a3nYe43hQP8r8aQkHFGk6+Ox63yrUzST8FRZX/lkkkDUfmno0CzWGsVjAe+kI 44A5BdKAUIbwtVL7zOlXf2XZ0nsU2VJ8JCbzjDQDysA2+ut2uKoOhZU/lsne5xSiKyDA KY3tRvcNvxErG4SQyMaNpn10OQ+ZFPha4PoGU8noRweiD/7yUItsyhzrNQaeLG6hJezQ 6YCzg+HbOMQRrOc2uoLTYHYJOl1PAZ3YVhD6Qt70gb/XUdcrw87btpimyiAzyWOf+bEY CY9JWk9jv1tz9I/mugbMWKmgYZ4Zq3c+vI++BTs7zzL6OWcetLSp32mEwxbPlrOfU6zK e5Xw== X-Gm-Message-State: AOAM5315DULx4abCoQL/2oaHJFOpyZ8jkW0c7fULgOZiDCrP383WUieu Yr2+vrRFG/qUf8V0QShq29aELQ== X-Received: by 2002:a02:354d:: with SMTP id y13mr5524096jae.83.1623443984720; Fri, 11 Jun 2021 13:39:44 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id y9sm3761544ilp.58.2021.06.11.13.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 13:39:44 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: leon@kernel.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, aleksander@aleksander.es, ejcaruso@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/3] net: ipa: make endpoint data validation unconditional Date: Fri, 11 Jun 2021 15:39:38 -0500 Message-Id: <20210611203940.3171057-2-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210611203940.3171057-1-elder@linaro.org> References: <20210611203940.3171057-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The cost of validating the endpoint configuration data is not all that high, so just do it unconditionally, rather than doing so only when IPA_VALIDATAION is defined. Suggested-by: Leon Romanovsky Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 12 ------------ 1 file changed, 12 deletions(-) -- 2.27.0 diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 07a81b73306fe..3520852936ed1 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -75,8 +75,6 @@ struct ipa_status { #define IPA_STATUS_FLAGS1_RT_RULE_ID_FMASK GENMASK(31, 22) #define IPA_STATUS_FLAGS2_TAG_FMASK GENMASK_ULL(63, 16) -#ifdef IPA_VALIDATE - static bool ipa_endpoint_data_valid_one(struct ipa *ipa, u32 count, const struct ipa_gsi_endpoint_data *all_data, const struct ipa_gsi_endpoint_data *data) @@ -225,16 +223,6 @@ static bool ipa_endpoint_data_valid(struct ipa *ipa, u32 count, return true; } -#else /* !IPA_VALIDATE */ - -static bool ipa_endpoint_data_valid(struct ipa *ipa, u32 count, - const struct ipa_gsi_endpoint_data *data) -{ - return true; -} - -#endif /* !IPA_VALIDATE */ - /* Allocate a transaction to use on a non-command endpoint */ static struct gsi_trans *ipa_endpoint_trans_alloc(struct ipa_endpoint *endpoint, u32 tre_count)