Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6014961pxu; Wed, 23 Dec 2020 11:01:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJw76f1qN98/eV+1rS/1+5hMHZbwQ8JCOpf2EzRBNsmasWeEBa44+7KHq/wyB0GIFQs/BNU0 X-Received: by 2002:a17:906:8152:: with SMTP id z18mr25993348ejw.317.1608750092995; Wed, 23 Dec 2020 11:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608750092; cv=none; d=google.com; s=arc-20160816; b=zZH3Hyqzyfd09ew/plMjk/uW/0nv36pcR/d3M0n8OLO1g/2RKyfyra38l4dQm6mkL4 nYozZ+8c/vzn0R5BBSQlajiELKimXGEWDlhysMb+4z8DaPcTw1HK7LY3jD2j4Ifh5nmy 8kXqaHPpXjxgEO1XOBT+2bzZk2sK2ox4CEBqwAWE5xtEqps5WgZj6wu+MoYnR5dI7EQ5 oIJrkH7dUjA4CiD0e1/56aPzSpdb/S9bhzxZVBgkin9TG5mBWV+BpmMfaje47N9VxKfE T4Ro+omY8U1YWoRQ39mBBkp+CieLzuCHKeG2+sP22H7hLyti96LVeLF66AC31irYLQ2/ yZTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=1EuhrJfdKT/3T829A90bCtM27ubyVeGczwvouIEbqlY=; b=kkBv+aJbfjCYOm6aKrOXLt6NeYRigwcXu6j5QPxSHMhJL1UCjC41Q4i9Y+l44KuadC cVqhRaefGImBOVK2yr5kOMUqruedZeFo+s5UlTBuF06xVKFDMCNusX5yZG4IPNW6Nej0 80u94WZtKBxR9bzT3z4RTd6hElc0dQblXAV/tzzxDPB0TgCGf6y5YcGr3+mla9Cujj2b RRj+iKDpwBbH9qS5NbMfLBSW+9Nhv9pBUBCm8LfrEzrmH2V2vK417LLtzd7fChCjKUEo N0e93TxQEXYYofEuPBhGPyJ4bIvL29KoTY94JeSp1gDV+IGiWw3Df7cZH+PCkIEc6XR4 75Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i3BYi4+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si12744029ejg.728.2020.12.23.11.01.10; Wed, 23 Dec 2020 11:01:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=i3BYi4+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728355AbgLWS7K (ORCPT + 99 others); Wed, 23 Dec 2020 13:59:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:54298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbgLWS7J (ORCPT ); Wed, 23 Dec 2020 13:59:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AAA122225; Wed, 23 Dec 2020 18:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608749909; bh=vLh2hwI5HuBwbica7jhrzWGB4C1u8uENLeADqYz1zP0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=i3BYi4+ftGJxXXuiQskbCYWpUaAwk94LoSBVURpDdXd3wscMqTVftY2QIS5w6KvB0 QZw53KT7FHi0lzITD7KhRVwls2r5OwlRvjYbpaK0OrF0mUJhFcshgLQ2mgeoiRkX2W aJ+fKU8J8TRynf3z/nx1WbGupuLrz5NSxLKQMgaIy3KJ7LcBdoXW7AOx04BvnlVRBX 9woO57e6gWfU3jDC2J5/PEyUxRAwpKDd1QlI8o572YmXg4UojP8q7+7uIKHE5G5zr9 EnDe6CrtWrvIR0gobOOyuocIsZuIqywUC4pnps+AQRQ1nFjFlXqXYyKwzGnlvOhgQn TjwApfAaZ9Wtg== Date: Wed, 23 Dec 2020 12:58:27 -0600 From: Bjorn Helgaas To: Alexander Lobakin , Vidya Sagar Cc: Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Rob Herring , Robin Murphy , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH pci] PCI: dwc: fix inverted condition of DMA mask setup warning Message-ID: <20201223185827.GA312001@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201222150708.67983-1-alobakin@pm.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 03:07:43PM +0000, Alexander Lobakin wrote: > Commit 660c486590aa ("PCI: dwc: Set 32-bit DMA mask for MSI target > address allocation") added dma_mask_set() call to explicitly set > 32-bit DMA mask for MSI message mapping, but for now it throws a > warning on ret == 0, while dma_set_mask() returns 0 in case of > success. > Fix this by inverting the condition. > > Misc: remove redundant braces around single statement. > > Fixes: 660c486590aa ("PCI: dwc: Set 32-bit DMA mask for MSI target address allocation") > Signed-off-by: Alexander Lobakin I joined the string to make it greppable and applied to for-linus for v5.11, thanks! Vidya, speak up if this isn't right. I assume you should have seen this spurious warning while testing 660c486590aa. > --- > drivers/pci/controller/dwc/pcie-designware-host.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > index 516b151e0ef3..fa40cc2e376f 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -397,12 +397,11 @@ int dw_pcie_host_init(struct pcie_port *pp) > pp); > > ret = dma_set_mask(pci->dev, DMA_BIT_MASK(32)); > - if (!ret) { > + if (ret) > dev_warn(pci->dev, > "Failed to set DMA mask to 32-bit. " > "Devices with only 32-bit MSI support" > " may not work properly\n"); > - } > > pp->msi_data = dma_map_single_attrs(pci->dev, &pp->msi_msg, > sizeof(pp->msi_msg), > -- > 2.29.2 > >