From patchwork Mon Nov 9 16:56:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 320928 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1890149ilc; Mon, 9 Nov 2020 08:56:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGOmd0ovSX4JPVu9VRlnIACPbtIBxBNKjYF4cLAOpAAzeF2R8kN6jf6wa9OWPv0rRpjcGp X-Received: by 2002:a17:906:7254:: with SMTP id n20mr15128902ejk.382.1604941005347; Mon, 09 Nov 2020 08:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604941005; cv=none; d=google.com; s=arc-20160816; b=UCN7jlM1wyI7dJOJTEEQBUmdkSTRdyAzb4Are6ySomDaphF7oOQVWUSf/KeC0GME7i aMpuQN0f2m5JTGUOah/JPWFZTwsr9yg7ASNLz8oWvnIEQThV0LoklOmMAew32eWkiMw2 aDr8SwXqGXY2fk86Vh6Lm/wsC8m6gc1ALWmRF/5vpA4puPsGp1B1QtT0x9VHSXA7+Oh9 b/nkCsMQ8MMdzJmig2zkIF+BehOerFqrmPW54irQCDjLUzHvSu2qqLr6uXPAo61sbE1+ ttUZZm75kuIJHvKCQAtQQyQf5Pxx5AhTxr8tUqtsP7Xw4mGyRCEsEWOh5ovpcdSzpmsg q3ZA== 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=4yWrXzwfznxNU372UdbxuIAHo54u4g17q1CuRCAU4Gc=; b=Z7NtsOf6hRHtB8mp/NhqJnpw3kUy9eEhsTDTKPtdU41LTTTiambffgCI3QCaHFSb4X tnXBdON7J+5iZhtYOPWmsQiO5dNqOAKejSeeYpiWu2rJHg0x8vJOha03AoDe3ktd8xB9 P8LSwa4fvveE0QazTwABuf4zaw+4jhnYby4+Sqxse2b8k+ccyrPE21uDtLYyw3GHZORh ohmkS14iv7lbv48KF+fcpDUCUWrNFluFYl9Fqb5ZUktVNvPibHF1D5nWHIX7J2Wo3HqU s+dq3GvXw4EEG2bnqGPxxByXUEEE/qfLzXip0G672JfzNiWhtBDNVPrV8AsYZzsIovp/ 06Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jYHzo1/s"; 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 q7si8159322ejy.607.2020.11.09.08.56.45; Mon, 09 Nov 2020 08:56:45 -0800 (PST) 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="jYHzo1/s"; 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 S1730895AbgKIQ4o (ORCPT + 8 others); Mon, 9 Nov 2020 11:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729776AbgKIQ4m (ORCPT ); Mon, 9 Nov 2020 11:56:42 -0500 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C162BC0613D3 for ; Mon, 9 Nov 2020 08:56:40 -0800 (PST) Received: by mail-io1-xd44.google.com with SMTP id n12so10508369ioc.2 for ; Mon, 09 Nov 2020 08:56:40 -0800 (PST) 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=4yWrXzwfznxNU372UdbxuIAHo54u4g17q1CuRCAU4Gc=; b=jYHzo1/shxPWr7/tBwF8gfq6RrvxnXOGHH/E1Fa7/3/U7/J74dAGnw+6bPfm58XK8n ZF+CsKprjhQtuqJgD302DAM7pr6EE2hBXPfBzcT9d4M3Kwhrh7GqZYPayqPkXNGSIyD3 MYjnueSZFkrqTsjENpheg2B4xQAVsjr9v7io2CHLNjXvmHxC+xeegYgfuXNq5Q4q8tgG OHshgukqDszdWe+IY2PmP5BNiu6ZZla76vGfqwi8FvXEFtQXr0/e7z4B3hCXONTUYIhl e+y/7cT7fePz9PBc3/pFPJ9gJr8VT5u/LEYsB51DPfnXvmJ47W96xAOSDJn2kYKPhuQ0 SAnQ== 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=4yWrXzwfznxNU372UdbxuIAHo54u4g17q1CuRCAU4Gc=; b=nBcJPlaA9EWJB5VweY3fw1NHoruIZKiqnow2uMYXjUCYJxTefhCCtj180Xhv07toD8 tEdmbYptwFejYvdobqeMaO2oALiYyD4VYlsiztPHGdgU/8+16yU2CyB8IUcSoJhnUltV xN9pdg+spGuXTiUV03l8bnYMXuh2+SS6ALZiFxZ1O6ucOX+pvtc8yeEh1wFneTuZiy6Q Rb98fxhFmk/j6XVeFuWjv68aOV3Ul5sAYybB8CFOex2kaNKcE9pZmjw3ORqKwWAKHPSN TKc3CjWJMxt1aViCR1DD3BGIwNLUl8thwc+MCjn/iOXi003R1ZtLEGiRfZvCw2nnGW3J 8wDw== X-Gm-Message-State: AOAM533YqJEm+EnNHHGSOT9MQIwlKnSVCrI60XIE5EBeLttp+lmeNYCz V5QYaDuLr1DjNFM8rNMAIO0AXg== X-Received: by 2002:a02:cd02:: with SMTP id g2mr11928881jaq.22.1604941000087; Mon, 09 Nov 2020 08:56:40 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j85sm7576556ilg.82.2020.11.09.08.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 08:56:39 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/4] net: ipa: don't break build on large transaction size Date: Mon, 9 Nov 2020 10:56:32 -0600 Message-Id: <20201109165635.5449-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201109165635.5449-1-elder@linaro.org> References: <20201109165635.5449-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The following call in ipa_validate_build() is erroneous: BUILD_BUG_ON(sizeof(struct gsi_trans) > 128); The fact is, it is not a bug for the size of a GSI transaction to be bigger than 128 bytes. The correct operation of the driver is not dependent on the size of this structure. The only consequence of the transaction being large is that the amount of memory required is larger. The problem this was trying to flag is that a *slight* increase in the size of this structure will have a disproportionate effect on the amount of memory used. E.g. if the structure grew to 132 bytes the memory requirement for the transaction arrays would be about double. With various debugging build flags enabled, the size grows to 160 bytes. But there's no reason to treat that as a build-time bug. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index a580cab794b1c..d1e582707800a 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -680,9 +680,6 @@ static void ipa_validate_build(void) */ BUILD_BUG_ON(GSI_TLV_MAX > U8_MAX); - /* Exceeding 128 bytes makes the transaction pool *much* larger */ - BUILD_BUG_ON(sizeof(struct gsi_trans) > 128); - /* This is used as a divisor */ BUILD_BUG_ON(!IPA_AGGR_GRANULARITY); From patchwork Mon Nov 9 16:56:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 320931 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1890343ilc; Mon, 9 Nov 2020 08:57:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyV2w/QHTenpoXV8Pw2ag14Bgj3z0qdfPdekHZzxKNRGtF3CT4t4WjXHszhP9XzkV24M0k X-Received: by 2002:a17:906:7c9:: with SMTP id m9mr15629352ejc.178.1604941023752; Mon, 09 Nov 2020 08:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604941023; cv=none; d=google.com; s=arc-20160816; b=ONTKe/oeV26V6XBZC5Y5VnTixOigpblCg64bZ0WXLsnha69OYmtwXJC5Ri0voiB3CO k9S6mLuwPvxW/+b/VmoCsAKPvV+Fj152JYXE+CGIEaWylBSoPxbioJNH+qMBUon/N7eu mqi3Be8yRu/DmH+QtcygR+iFFUgXT4tmE01azRjlPrkW0uvXlToFOhLcj0bnI7ZxpC6Z kIEahWnbFfRCIPBxhS9E6INExXBcDc8Mv1XR0kmwk34UyV9IEorjQQ4Dn6C4K9gqCsAl vIdpzH2J1XMlbhlTL2z0ykoaGNnepZ0CSY2oY9cIM07b9NlXiKiWEfTb4PEZT0B2NW+B suMw== 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=08abeJNv4qBy1pxGXBXjopswc7xkT9rkpPsBR41Sgkw=; b=MJUmjt9XSwbJa4Nk3bF93UeTaAXuHHEd7CEsrPMcv7T0r3eqZcNCYNhcNeWvl3V1z6 u8piG2pFPUgCkAOtbALWTPwJISakI05QqO87JmjrGtUrNLyoMmbljk19BRbL6XtwRnzm 0f/YinvGsau3SxxyVQzfztRGS9+xCTAWEVOSYfrS9QjxWP6GpmR9DF0D4KdOVy+tgs1c o3tieDjTWd5ipCikCZ/S3frWe2vSvDkcRhRFmHkEOWroVOVLwtFa1ShunUMwXRj/DIoO XiVtKsubC7h/8ZsyaBHHgv8j+qUBjNjA6fUS6+Cc1ILqEsbe/aNYXndxDp9NnFBhbvok MkqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KL/auJzZ"; 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 u26si4548475ejc.249.2020.11.09.08.57.03; Mon, 09 Nov 2020 08:57:03 -0800 (PST) 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="KL/auJzZ"; 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 S1730795AbgKIQ4n (ORCPT + 8 others); Mon, 9 Nov 2020 11:56:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730765AbgKIQ4m (ORCPT ); Mon, 9 Nov 2020 11:56:42 -0500 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE2AC0613D4 for ; Mon, 9 Nov 2020 08:56:42 -0800 (PST) Received: by mail-il1-x142.google.com with SMTP id l12so6195145ilo.1 for ; Mon, 09 Nov 2020 08:56:42 -0800 (PST) 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=08abeJNv4qBy1pxGXBXjopswc7xkT9rkpPsBR41Sgkw=; b=KL/auJzZZwrzzz6b44y5xBOCRS7ddo7BcGzGvZoWBcYBjI0XKteyMvgudYWwFSRUUC oMRcZNeftE3rvnBFKQzreOTI6w78f/rpgka+cSUlJQqwsXYa3PYbFS+dTIRnCE2yaJUQ jHnxcoPSC90eDU8kj+QqYrwTjDD8pF+9ZVrtnNQRpxxWFX5GTJ1WM+f4QpGrnb9ouyuT RH8lEupKZpIncv80GVNnTUvx9b0foUYKdxH+J/k5X0Gjbkxzv04TKtfUAkR7mNJ+LSeg 2nPnbNcc/C6KZDnsjAkGSCmKVQMmbgal3Bx6m7YQ7OLRuswEgC8r9/1QnlEJwFxXQiJ0 UmMA== 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=08abeJNv4qBy1pxGXBXjopswc7xkT9rkpPsBR41Sgkw=; b=JoXZ7/bsHzoHhU9FaVabSAEnWY1xu858zugYPsijWvM6G+CQwkxAykMulWgmGX/foZ tTdljzgws4HuAq5i+b2JR1MaPJb345tcBISdq/kXIfmbOSGq6LkuWbU8O4MnU/lynXZ0 +iheepOGBykJRBog9RjFfYab8/RfQV6F/9sdvfPF9Bf3daHII8CautcZiGuI+zEDIXNg Pq9FHKF4HvTvAbanLBtqLMbeFVLmftQp5CVDzZQt9MmzF9UqzCfwArWmcEvjO4qS730F PAItLnb/agOuJsbBx7Hnt/1IMRfFUK86iBmB0qZbf/+kcXNhVJu8010a65lSqDZ5k5ct WR1w== X-Gm-Message-State: AOAM532P+ekOEIfkCAc1qI43UwQsr9A297UPMBHQIHU10Op27X0UxWN1 6PRfwD7esf9m2HJMOfy1GirCIg== X-Received: by 2002:a92:1548:: with SMTP id v69mr9529474ilk.68.1604941001239; Mon, 09 Nov 2020 08:56:41 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j85sm7576556ilg.82.2020.11.09.08.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 08:56:40 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/4] net: ipa: get rid of a useless line of code Date: Mon, 9 Nov 2020 10:56:33 -0600 Message-Id: <20201109165635.5449-3-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201109165635.5449-1-elder@linaro.org> References: <20201109165635.5449-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Delete a spurious line of code in ipa_hardware_config(). It reads a register value then ignores the value, so is completely unnecessary. Add a missing word in a comment. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index d1e582707800a..bfe95a46acaf1 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -335,7 +335,6 @@ static void ipa_hardware_config(struct ipa *ipa) ipa_hardware_config_qsb(ipa); /* Configure aggregation granularity */ - val = ioread32(ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET); granularity = ipa_aggr_granularity_val(IPA_AGGR_GRANULARITY); val = u32_encode_bits(granularity, AGGR_GRANULARITY); iowrite32(val, ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET); @@ -787,7 +786,7 @@ static int ipa_probe(struct platform_device *pdev) if (ret) goto err_mem_exit; - /* Result is a non-zero mask endpoints that support filtering */ + /* Result is a non-zero mask of endpoints that support filtering */ ipa->filter_map = ipa_endpoint_init(ipa, data->endpoint_count, data->endpoint_data); if (!ipa->filter_map) { From patchwork Mon Nov 9 16:56:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 320930 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1890274ilc; Mon, 9 Nov 2020 08:56:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9lh5N3M0wjZSkB/iKOzn5/0hqOYMXli36Vw2EhJUyXXoiWNRSapks+bvbG4NgUNA/iP/U X-Received: by 2002:a50:8ada:: with SMTP id k26mr16209809edk.281.1604941016932; Mon, 09 Nov 2020 08:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604941016; cv=none; d=google.com; s=arc-20160816; b=oHoG0ewnsOX7VUFNGom3LV275YP/IwrTx/n0L13XyStAPOZpJa+1gv5R69ii3k0od5 wjfFNh8Blefe5I3nrwb11syMbielMHh5wvHCvFhlvqJ1u+NA2+7vZtzDA0hUKbNl4Xms LfcZAqbdEWR9qldoWf5GBvPwY5+yXjGSkgaV4rqa2VHoif1WOLOU3tKYonYtLJhiNhoO 7YRNY4DuLJm9hrMJgjpc/u8YFuueV4qXVPdgcLA26aCd7riyU+ELGJ4VCbHTx/SVFZtj wqr3x6o+NdCPEgstvwh52gua3B+w/ZUwiJtwC+B5zuTnvpjJc01Aegt/QpsiuRKR/tTB 4hHw== 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=/Vdf65yzuDCrr/hvWk0aTTXpWc5ZNNvy02Ck48ydFJk=; b=MtPM/f6UmFkGDLAC6DFyYcxXkrp9dhRtOSZdmcVT4a0V0BKlxV9YSKj0f3yeG/V7RA BV2+0iKsVWidHHJHIyJX3qTmfCwrEEYJ107j7KALAkg+Kt9VNa64L5mh1I4tiWkYoOU5 VwJYMfZLdadQLJeky7uScpYNPfQwFcapKxPbsE/DAAXX9a1Tx7YlovncW4gNXes1F+WI GGkki2w/xktxkrMYrZReJ9yQ1ZG/Mu4off6VBgHSUwI3h1eHyYGvGQ6AVdAnqvLSoPFo G6ij27zaTgDMASU3SX5LkY5WBd3WGTyXlEX8GEtJ2dlvsiALk4L8e5acx3UKTYDA32z4 lskw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mibJzcXp; 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 k13si5663644edk.167.2020.11.09.08.56.56; Mon, 09 Nov 2020 08:56:56 -0800 (PST) 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=mibJzcXp; 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 S1730899AbgKIQ4x (ORCPT + 8 others); Mon, 9 Nov 2020 11:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730736AbgKIQ4o (ORCPT ); Mon, 9 Nov 2020 11:56:44 -0500 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D48EC0613D3 for ; Mon, 9 Nov 2020 08:56:43 -0800 (PST) Received: by mail-io1-xd41.google.com with SMTP id s10so10523016ioe.1 for ; Mon, 09 Nov 2020 08:56:43 -0800 (PST) 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=/Vdf65yzuDCrr/hvWk0aTTXpWc5ZNNvy02Ck48ydFJk=; b=mibJzcXpvmvzLZWpCf4PGwU3zb/b293QV8UyvXMkNooM1NutYjJ1qw9av82rcrIW3j /l9dlo+1o69PfGRzbXggHMQT/Q97/M3TrkrsQIHRMoW+5d4Z03XqY73BzqhGudOBKgRU lz40pPJbQtuOY0nQ0m7dMkvI02iQ2N1UIpkB73Ok2h1FvynxocisqyhBig3jDqbeZ04n Yo5khOIdzpC8JJsCekgN0lNMAkykgpzY3M5U7WA248uwZgUuvI7vG6Vun6OYS7oGicHC Al+25ntjcAed667J28ayHlmmUgdjKsaF0Sve+1uphCEAI8tXF6rIj+DBpTgCAThXiwNb u+qw== 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=/Vdf65yzuDCrr/hvWk0aTTXpWc5ZNNvy02Ck48ydFJk=; b=tfNlYGGi/GeWUJW7G3uA3a6+SJ+hh2cAcPUFS3Rypu6YIadt3AgQljlz7biSehOlJ8 sEAFm5ZYehS5KjvugDraTy1UE28CK9NrBhO7f4UVQO5DBwzzyzoqwDtsdMkWzJHArMem uxGPQDslOJZheUsfrjcAUdy4LLnu0HEuu0HuxdVZ4eV55eeaPy7pnSkOUA7jBz1cp7GR CZaqoy6PF0E/v9W3V1SY6EC+xglIfaxse4aOsdlwIUdkEwOAOiEUz2ghF/AqtkZchCKR OKZnqUO2CB3jLJMrBiwRQaIgWIkKH3GWcv57jtKRe+rzRAgujU1o1exd0A9hig9RNvKU z4wA== X-Gm-Message-State: AOAM531+Gr6B2TT4eoAF/hD+5L7MUvOw7xsHZwf49e6OzXkQQj9P6zCo yzJPI/9xJpI5BbqyGm7m12VcJQ== X-Received: by 2002:a02:cb99:: with SMTP id u25mr7544235jap.73.1604941002534; Mon, 09 Nov 2020 08:56:42 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j85sm7576556ilg.82.2020.11.09.08.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 08:56:41 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd Subject: [PATCH net-next 3/4] net: ipa: change a warning to debug Date: Mon, 9 Nov 2020 10:56:34 -0600 Message-Id: <20201109165635.5449-4-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201109165635.5449-1-elder@linaro.org> References: <20201109165635.5449-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When we determine from hardware what the size of IPA memory is we compare it against what we learned about it from DT. If DT defines a region that's larger than actual memory, we use the smaller actual size and issue a warning. If DT defines a smaller region than actual memory we issue a warning too. But in this case the difference is harmless; so rather than issuing a warning, just provide a debug message instead. Reorder these checks so the one that matters more is done first. Reported-by: Stephen Boyd Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_mem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index ecfd1f91fce3b..0cc3a3374caa2 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -160,13 +160,13 @@ int ipa_mem_config(struct ipa *ipa) mem_size = 8 * u32_get_bits(val, SHARED_MEM_SIZE_FMASK); /* If the sizes don't match, issue a warning */ - if (ipa->mem_offset + mem_size > ipa->mem_size) { - dev_warn(dev, "ignoring larger reported memory size: 0x%08x\n", - mem_size); - } else if (ipa->mem_offset + mem_size < ipa->mem_size) { + if (ipa->mem_offset + mem_size < ipa->mem_size) { dev_warn(dev, "limiting IPA memory size to 0x%08x\n", mem_size); ipa->mem_size = mem_size; + } else if (ipa->mem_offset + mem_size > ipa->mem_size) { + dev_dbg(dev, "ignoring larger reported memory size: 0x%08x\n", + mem_size); } /* Prealloc DMA memory for zeroing regions */ From patchwork Mon Nov 9 16:56:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 320929 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1890235ilc; Mon, 9 Nov 2020 08:56:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6p2VeuWqMtPwmV5gZ7FXGCRuZaQ5Q81qUfHNtE/s+pO19NqyeNZFZvScE6yjhOxResElE X-Received: by 2002:a05:6402:1701:: with SMTP id y1mr11951046edu.209.1604941012586; Mon, 09 Nov 2020 08:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604941012; cv=none; d=google.com; s=arc-20160816; b=C9sesGLreIgvVQ0k0dEazmtuOjq1JrksQfFpIqkUB7UBK+BsNtEiVXRRqd5CD4Sjnc QPB8DP16jRsglw6PwnEgyYZfyJEHjWE4lnwsp1LSdWTp9xjRTuIraboBWYfbO6yvlvX0 2rUI/IIB5BTc1StsGiRU3y2Hr9CTBWik7y0XRVeiG03SWczskHkKotzjJyhz26HvPwEK HfOprcWxmsduuS54JXj+VmEJJBrTT0iuJNulXyZw1L8bWZMt18Hx49NaQjK+NzpBKWRv fzD/YkYzY8C4bDPaqzeuDCHHKLCUSt/5BpYu8FERDLOU/5HHlL+o1fRnRAqwpKUwL5En hYMg== 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=e5NRbYsOo+mspumDtpUEM/+OEsVGUUWKaYNV+1cLmV4=; b=ddPdZ6AkDkgNIZaAV9NxhjC8a/aTrJFiHqVR3BNsOZPaQOyaHU4MN6j/veiBZBqOBd Cc2H5zhgcRFKfKFvA1CK/ttBmzdzhmBrdXcMs6w2yx06wggicamFLjHkyYPF7sQHFbbc qIzJI/0UrjzWY5qEgn6BKaC906Ngf3cOTJBrMtFkuMBc+7CcodcA7E2zv5MxEzZius+O eIybRQkkCADeCfAjAJP0wHe7qCgl1LjSbWcq8mjqj7gK4Gwq4CdHq8Y0U6X9HdQPPnUa qf7i1iI1fNouCORFN8vg/BCykhyhPfpcss+j6TU9sGBpcOpoebRgcueXUVEUOfMsQCir Y8FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n2hLQ7PH; 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 a13si7691742edq.317.2020.11.09.08.56.52; Mon, 09 Nov 2020 08:56:52 -0800 (PST) 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=n2hLQ7PH; 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 S1730984AbgKIQ4v (ORCPT + 8 others); Mon, 9 Nov 2020 11:56:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730914AbgKIQ4p (ORCPT ); Mon, 9 Nov 2020 11:56:45 -0500 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E905C0613D4 for ; Mon, 9 Nov 2020 08:56:44 -0800 (PST) Received: by mail-io1-xd41.google.com with SMTP id n12so10508612ioc.2 for ; Mon, 09 Nov 2020 08:56:44 -0800 (PST) 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=e5NRbYsOo+mspumDtpUEM/+OEsVGUUWKaYNV+1cLmV4=; b=n2hLQ7PHR3cMzHVOFkT8wDfl5WJbEyE2GW1mdy0w/0zYQtDrGdHtRa5QQkWlZxb5Hr ZiWMQ4SWjn76IQEWW6bs+66vkbmPjrt3SckLb2CZHkW+p9Wak7QEf5bBuj4VzDJAYANR 26uzhkzrwmiuiGFzwkT2T2MfSJkJlOlFCVp/kYBmRTh15+fi74ulQZ7XJvWatsnYDW0Y T2bG7COiMZqnbvoXO+dF9fb6msEE0blbS5ZJ5IFPkB5PVOHlp3sfiSmFSGsqhdje+l6q lV7Clecaxjr4+g+ck1g54xmyck3PQ7MnZd+oNon49VOoPdS5EzO3Xa5SMgMhdBJ2VOSm MYjw== 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=e5NRbYsOo+mspumDtpUEM/+OEsVGUUWKaYNV+1cLmV4=; b=s1+IZCmqOO6ggY3cTlH6LvCzB/o7d2Z5n877HA+7Ap/a/aQlreIagTLt+UHT2YRl34 Q8Tf6Yw0WYGtPYj3LBo+BduZAp4XpUGTgRu0q/7T6SGjucFxgFPDry4b4JYFDl/q/Wrp ToJggIZduCp9ZvUCPlMFGhQe6tGdS1Xnxe5AT4V49UrO2Ox57DBxIMYRBR7mWvrGH5sf 8H+KDLhTSJOAtrt1vMqwKY4CWQUhDbtY0Ph3sT8GBM+M9vUHdulqlAXhbOT04re5FoWG 9Hh70b7p58t5zvL4XaD+B/3h7l/rWQDHCZOn/nsa1OX65CvDfa0whlUB9/9wSr8n2Esd +kMw== X-Gm-Message-State: AOAM530kpCBs0uWyOafukv16LOw8q+ML/EBkpB5b8FvLXPhIACMqGRgl MFRfmSrS8xb5xgRBqx81TJVsZRhwwu9uwvq8 X-Received: by 2002:a05:6602:21c2:: with SMTP id c2mr10882933ioc.184.1604941003739; Mon, 09 Nov 2020 08:56:43 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j85sm7576556ilg.82.2020.11.09.08.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 08:56:43 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/4] net: ipa: drop an error message Date: Mon, 9 Nov 2020 10:56:35 -0600 Message-Id: <20201109165635.5449-5-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201109165635.5449-1-elder@linaro.org> References: <20201109165635.5449-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is no need for gsi_modem_channel_halt() to report an error, because gsi_generic_command() will already have done that if the command times out. So get rid of the extra message. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.20.1 diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 961a11d4fb270..3a5998a037dab 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1661,12 +1661,7 @@ static int gsi_modem_channel_alloc(struct gsi *gsi, u32 channel_id) static void gsi_modem_channel_halt(struct gsi *gsi, u32 channel_id) { - int ret; - - ret = gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL); - if (ret) - dev_err(gsi->dev, "error %d halting modem channel %u\n", - ret, channel_id); + (void)gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL); } /* Setup function for channels */