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 */