From patchwork Mon Oct 17 03:22:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 13008147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6436AC4332F for ; Mon, 17 Oct 2022 03:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4wVwp7KPXEmdd3k2LZPVUzbEuyHh6YLRN+XtKJUIFi8=; b=HwXdAaxqnXXwkU AXO0DZzs5aFNrPxqi4dPCyfZrXOFwRaFV9hwc3Hd7zYxF/U6qcj2JYAZlnDt9yHBlGD38FvfzlTqq nx9TbmYMW2jIku1OP6FHfBlZAqE9agoYYd2Pv3/y9GmjTwAtp+LYkzoLcgcbvQQKFnfHBfNdWfyOt qtih34IkBa72PpHnISMuCOiq88K4q8CO96ZfiFhMKQO8mQjfRvOfkWE4t8zxH6QsCc9vAPpRnNGFg VKwoU/aGS8ok8IhC+KycMud9niQdavDtB79qxYUHNLOqG8zTczKLb2bmbpy9tGDeROYbX8mYU6Qj7 N4/wJsIpk8bzlFtkkB+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okGik-006QwH-UI; Mon, 17 Oct 2022 03:23:19 +0000 Received: from esa6.hgst.iphmx.com ([216.71.154.45]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okGhm-006QMA-0g for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 03:22:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1665976937; x=1697512937; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AmpxHBtPrMCtfK9ErFiTCWFNTcLn+8gXnygCT8fikds=; b=pAjvWlr0R+vRGUSmRr+Q0MFv+cEjrmoCyB1Qq7HNGHjhjWus0B/f1Ib/ rnuHn9HIiP2z9ez8x8BUIgD9MXM0YdgLR4dFFDFmYpCfdjuchmxE+EA7S xoJAcboSqh2G9+kT0PECOsfR3coQYa71ZHToB6gABwzZv461DGu3vXOyD R23IBsAduD/GtPXYPRrStvaCUiP6rmv7FpeomY/tgmh4kbDJMvAACTKcu cw/cQciemcmdwo1jIXoNc29A/FYao1KxYGs1UwSD2q6bgHCWPT5PV/5W6 EDz13tGDtprZGZY19rORl3EKo9I0vIDu6hfWEaeB/rkHhf2+1YpqDZyKt A==; X-IronPort-AV: E=Sophos;i="5.95,190,1661788800"; d="scan'208";a="214366023" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 17 Oct 2022 11:22:17 +0800 IronPort-SDR: NElnBw6H4aMuGjESwRa+3J+DhA3FbCGiN7OVR6qZxBs9qN4WaTM2ykyWYgBhuTd/UQW4FTOtgK oYpGLrgoFf8U/BD6WXCv8EwGxagvAGRU0JC5ACL6KtrSRnBFVBT53S/cyTYYJpQNqpP7LQaKE5 IxE71HJDrPbqnylA/lkFIOZxrJSyz28ShgayLqIErOF8Kyt2SUVn+QgKTnjkkQNeaEImNIgWWG gSITm9NqrR4nBIhVb/Wj6dWk3bIEY6LAFnUZzfw61KtwsgSZTzLPcU5Fk4afii2y8JZzFuUXfb pqJeWgpjKtnv0iZ//Psm/2S9 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Oct 2022 19:41:50 -0700 IronPort-SDR: SSLGqRQAoVoQdPxG3pnzFHHRgY291IL+cbBI0w8cbb/cW3bygxSCShk3skL8XxHty95CgecwOY 4wlK7UrVm8/k4zgIP8QGBJ4ngzmC6GKfAQJg+XFvDKepxu+Em6EQjzqTYqgMUgU0DExVBZC6M/ hT/CiQOF6KKn2CqIK8y+J6HqYU2Nb99EI8GPdjq++qu7lndoJgTH1uSiAf3DdlTr73U+QAjWlT osDjGSXvxWRfc/d2fEvWZoKZyLOK7Kur+w6N6RYWuTgy+36aWDRoyqxDHnPKbydmd/L6gMSlh1 gYU= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Oct 2022 20:22:17 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4MrMk13pY0z1RwvT for ; Sun, 16 Oct 2022 20:22:17 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:subject:to :from; s=dkim; t=1665976936; x=1668568937; bh=AmpxHBtPrMCtfK9ErF iTCWFNTcLn+8gXnygCT8fikds=; b=cUGWmPYrDgagYgHWORXg/qDECfoHwxItyT 6FtOBNK11hup6LwKhURPVTN2VFd3hkNKpcLSMmduiIUULQDzkpGVy1TCz3Iw/bVP nMBkHc/AC/7Z/22mRAam9MT6ccrLG3cjaxvi58I+YPjwf4mPxQpXQapVgALF/wAf YZ5cp/fRQZrqF6T7nthBzqcuQRy6ER7sOnxhIeq/YowFm1vyv19eNjkfh2F2Trdo rjn2JZqubruG3AnNoriueX/Vqg3WwapGKriB/1rxYGCbtK2IKlbJ1Yv5WsULdhnA pGat7l/k0VTGcv3sk2Kh2SDEwfitbEHYa0k4vZcOcmsHOL2NP+ow== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EuUGx8WH6YZh for ; Sun, 16 Oct 2022 20:22:16 -0700 (PDT) Received: from washi.fujisawa.hgst.com (washi.fujisawa.hgst.com [10.149.53.254]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4MrMjz4F4Dz1RvTp; Sun, 16 Oct 2022 20:22:15 -0700 (PDT) From: Damien Le Moal To: linux-ide@vger.kernel.org Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Patrice Chotard , linux-renesas-soc@vger.kernel.org, Sergey Shtylyov , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team Subject: [PATCH 5/6] ata: ahci_imx: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:04 +0900 Message-Id: <20221017032205.2210188-6-damien.lemoal@opensource.wdc.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com> References: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221016_202218_133962_FECDB9D2 X-CRM114-Status: GOOD ( 16.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_imx.c:1070:18: error: cast to smaller integer type 'enum ahci_imx_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] imxpriv->type = (enum ahci_imx_type)of_id->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_id->data. Signed-off-by: Damien Le Moal --- drivers/ata/ahci_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 632caa301458..a950767f7948 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev) imxpriv->ahci_pdev = pdev; imxpriv->no_device = false; imxpriv->first_time = true; - imxpriv->type = (enum ahci_imx_type)of_id->data; + imxpriv->type = (unsigned long)of_id->data; imxpriv->sata_clk = devm_clk_get(dev, "sata"); if (IS_ERR(imxpriv->sata_clk)) {