Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5044961pxu; Tue, 22 Dec 2020 07:09:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmwAQ05mnx4GI4rbRGVG4wADkZ/HRG95NtJmZvcfLcoYpdmRWGhnoHtJ8Yp/nDjRIl/NU3 X-Received: by 2002:a17:906:cf81:: with SMTP id um1mr20596354ejb.122.1608649770540; Tue, 22 Dec 2020 07:09:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608649770; cv=none; d=google.com; s=arc-20160816; b=zSQtvT7Y7nRnDs6HUPSfPqWLswJrx6Qrco2bFXg76htQRxLfGa4PC/tvKjDcfmVvd7 bKxqx9Wspg66f77HDCrcORCfGm+fBHJTmdZd1gvG5+nGRqtjvVxTMQRG2hSEC/grhv54 sWp2V75BUsOjjTWDdkA7Fta0OycVmwDuCc245mB8DMvyj/4HwUVwo6YAHKlEFxrQfBn/ hWM9S5xj3F6qUWk3/fA5ZQP58mEPrK4KDRKhMxsqQQs+zN354SWat93icbrR6kW/Huz2 lUMFJ6zqrBhcpp8RLKCuMwXQ0MEhMjfdk+ZGP4251deO+tVtXjQzZ3bH5iw9we5FrpeB PO6g== 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 :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=Qx0+gSCQI+zwlEgYtmJbydKr/M0gl5zfTxgSnTu7KjM=; b=BmJAtl7d70pOSllO5c6cltqdMGyrLDh/IDP5Pl9fN2bmGMYsnlouR5hH+yXphyO/wX 4dG12DrAayrOVUcq45JPkle162pt2Gk/pJa/jBtAnOk0kJbhx82rkAbhkyCz44PlXJ8x kxAACJVksJBmJKOsiZn2NNfeGZL0bGJLke3M7BcNP+jr70XTqZF+BgIc2OaIqRrxJGvA dAlt2mR1Ovx4zUdHjMQ3rVL4QpfXEsFqaBLhryEa3a4Ihys7yk3ZyIX2lXKzgI1yA21h MARWZz3hAV2oNkhhEIpAr8DpSxfclVKFqQQvZbOGtCYnUSsI7Zc0cS1GoV98awDQ8EQu d/eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=l8olzOOF; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd40si11205821ejc.265.2020.12.22.07.09.07; Tue, 22 Dec 2020 07:09:30 -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=@pm.me header.s=protonmail header.b=l8olzOOF; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727731AbgLVPIg (ORCPT + 99 others); Tue, 22 Dec 2020 10:08:36 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:50555 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbgLVPIg (ORCPT ); Tue, 22 Dec 2020 10:08:36 -0500 Date: Tue, 22 Dec 2020 15:07:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1608649672; bh=Qx0+gSCQI+zwlEgYtmJbydKr/M0gl5zfTxgSnTu7KjM=; h=Date:To:From:Cc:Reply-To:Subject:From; b=l8olzOOFqQl9PpAudL0kQlto9/wJQ3L9VKguKXGkYaEfDWjLD6fDIZuKb7U350kFv pHdowhTtIOLbdW0JHiO+X4M35VvCLrYSvM5jeUaydv4TBQywZZWG2TY+QKFIxwXq7e waOQLsroh4qjjR6LgXx2ytkd9qhe14JvyC+eVsYNqL5Qj6Bx8eV/lX+TKxgp5JbqyU 2kRlyer4REV/tAxZPd5S793BJ3wrfHAu92ExDOW3ikn6dxhp/XzSZzI3QoXsZNcFJW OUw12ESRn/uDnK3d3AtJ/8g+ixZudY1oD/KkhJonL35OzTlzxcuVp477fUuXqojOII xxnAezm/k28tQ== To: Bjorn Helgaas , Lorenzo Pieralisi From: Alexander Lobakin Cc: Jingoo Han , Gustavo Pimentel , Rob Herring , Vidya Sagar , Robin Murphy , Alexander Lobakin , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH pci] PCI: dwc: fix inverted condition of DMA mask setup warning Message-ID: <20201222150708.67983-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 =3D=3D 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 --- 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/pc= i/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) =09=09=09=09=09=09=09 pp); =20 =09=09=09ret =3D dma_set_mask(pci->dev, DMA_BIT_MASK(32)); -=09=09=09if (!ret) { +=09=09=09if (ret) =09=09=09=09dev_warn(pci->dev, =09=09=09=09=09 "Failed to set DMA mask to 32-bit. " =09=09=09=09=09 "Devices with only 32-bit MSI support" =09=09=09=09=09 " may not work properly\n"); -=09=09=09} =20 =09=09=09pp->msi_data =3D dma_map_single_attrs(pci->dev, &pp->msi_msg, =09=09=09=09=09=09 sizeof(pp->msi_msg), --=20 2.29.2