From patchwork Thu Feb 1 20:20:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10195959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 92CCA60247 for ; Thu, 1 Feb 2018 20:40:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8346F289C5 for ; Thu, 1 Feb 2018 20:40:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81EC52895A; Thu, 1 Feb 2018 20:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 655EB2847B for ; Thu, 1 Feb 2018 20:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754746AbeBAUUR (ORCPT ); Thu, 1 Feb 2018 15:20:17 -0500 Received: from mga07.intel.com ([134.134.136.100]:50516 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754703AbeBAUUQ (ORCPT ); Thu, 1 Feb 2018 15:20:16 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 12:20:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,444,1511856000"; d="scan'208";a="26607969" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 01 Feb 2018 12:20:14 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 51CB8367; Thu, 1 Feb 2018 22:20:13 +0200 (EET) From: Andy Shevchenko To: dmaengine , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Andy Shevchenko , Sinan Kaya , Sakari Ailus , Vinod Koul Subject: [PATCH v2 5/6] dmaengine: hidma: Constify returned by device_get_match_data() value Date: Thu, 1 Feb 2018 22:20:11 +0200 Message-Id: <20180201202012.36524-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180201202012.36524-1-andriy.shevchenko@linux.intel.com> References: <20180201202012.36524-1-andriy.shevchenko@linux.intel.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The value under the hood is constant in any case. It makes sense to show this explicitly. Fixes: 95fbfb7aa28d ("dmaengine: qcom_hidma: Add support for the new revision") Cc: Sinan Kaya Cc: Sakari Ailus Cc: Vinod Koul Signed-off-by: Andy Shevchenko --- drivers/dma/qcom/hidma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 963cc5228d05..24e163cefb7c 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -743,9 +743,9 @@ static int hidma_request_msi(struct hidma_dev *dmadev, static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap) { - enum hidma_cap cap; + const enum hidma_cap cap; - cap = (enum hidma_cap) device_get_match_data(dev); + cap = (const enum hidma_cap) device_get_match_data(dev); return cap ? ((cap & test_cap) > 0) : 0; }