From patchwork Thu Dec 9 14:59:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1565782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4J8xyg60pJz9s5P for ; Fri, 10 Dec 2021 01:59:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239071AbhLIPDL (ORCPT ); Thu, 9 Dec 2021 10:03:11 -0500 Received: from mga05.intel.com ([192.55.52.43]:47029 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbhLIPDK (ORCPT ); Thu, 9 Dec 2021 10:03:10 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10192"; a="324375277" X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="324375277" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 06:59:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="503518966" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 09 Dec 2021 06:59:33 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2033015C; Thu, 9 Dec 2021 16:59:40 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Jens Axboe , Damien Le Moal Subject: [PATCH v1 1/2] ata: libahci_platform: Get rid of dup message when IRQ can't be retrieved Date: Thu, 9 Dec 2021 16:59:36 +0200 Message-Id: <20211209145937.77719-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org platform_get_irq() will print a message when it fails. No need to repeat this. While at it, drop redundant check for 0 as platform_get_irq() spills out a big WARN() in such case. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede --- drivers/ata/libahci_platform.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index 0910441321f7..1af642c84e7b 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -579,13 +579,8 @@ int ahci_platform_init_host(struct platform_device *pdev, int i, irq, n_ports, rc; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - if (irq != -EPROBE_DEFER) - dev_err(dev, "no irq\n"); + if (irq < 0) return irq; - } - if (!irq) - return -EINVAL; hpriv->irq = irq; From patchwork Thu Dec 9 14:59:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1565781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4J8xyf1zf1z9s5P for ; Fri, 10 Dec 2021 01:59:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239060AbhLIPDJ (ORCPT ); Thu, 9 Dec 2021 10:03:09 -0500 Received: from mga09.intel.com ([134.134.136.24]:59272 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbhLIPDJ (ORCPT ); Thu, 9 Dec 2021 10:03:09 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10192"; a="237919747" X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="237919747" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2021 06:59:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,192,1635231600"; d="scan'208";a="463258687" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 09 Dec 2021 06:59:34 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E24C2329; Thu, 9 Dec 2021 16:59:40 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Jens Axboe , Damien Le Moal Subject: [PATCH v1 2/2] ata: libahci_platform: Remove bogus 32-bit DMA mask attempt Date: Thu, 9 Dec 2021 16:59:37 +0200 Message-Id: <20211209145937.77719-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211209145937.77719-1-andriy.shevchenko@linux.intel.com> References: <20211209145937.77719-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org If 64-bit mask attempt fails, the 32-bit will fail by the very same reason. Don't even try the latter. It's a continuation of the changes that contains, e.g. dcc02c19cc06 ("sata_sil24: use dma_set_mask_and_coherent"). Signed-off-by: Andy Shevchenko --- drivers/ata/libahci_platform.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index 1af642c84e7b..972f5ec86a27 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -637,13 +637,8 @@ int ahci_platform_init_host(struct platform_device *pdev, if (hpriv->cap & HOST_CAP_64) { rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64)); if (rc) { - rc = dma_coerce_mask_and_coherent(dev, - DMA_BIT_MASK(32)); - if (rc) { - dev_err(dev, "Failed to enable 64-bit DMA.\n"); - return rc; - } - dev_warn(dev, "Enable 32-bit DMA instead of 64-bit.\n"); + dev_err(dev, "Failed to enable 64-bit DMA.\n"); + return rc; } }