From patchwork Mon Oct 17 03:22:05 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: 13008148 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 C1080C4332F for ; Mon, 17 Oct 2022 03:24:51 +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=xtC9yL8Mnknwry6qAmoieGkVFZI6/ZMDbU8VfyZeZEg=; b=Xb5pWfyRAEEPhV QeU9VFMicwTeKUKnV/h8b2VMARRLuqdNJUZCMYgwea/CLCuNiQb1gy4/5n9PjGM8nVsdcNIZzNC05 ceYipxdnS0Gnqi4Uq3qhFzJa3P2NVoix//tMrjxFUGWkn5T0nuVRa/YUIzyOiEH7n2PjQgfkHObV/ IKtWhkRMocTq9wjVK/EsaYZb+yVCId7oq3xly4JPQjYLaFXb6uq5qNmwX16cHhAGjbG1RLDUMPxCj xUNcgZPOZeHEVceLTOshT7WxtxKUkP91bVJFTaUkxUdIxd2xCqnfUKipEKZo2gaOgNa+3QJhzAImC o92nFBeXM1JAkpNqRyxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okGj7-006R9w-UH; Mon, 17 Oct 2022 03:23:42 +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 1okGhn-006QMA-SZ for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 03:22:21 +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=1665976939; x=1697512939; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3O2DopF+MAK2Mx8ruuGInQ2SFsIiGXlyPCLzDG43pXY=; b=AOxVGXZHmlCoyReohD6F2KG+T6JEHPlBXzTWYrFaTW2KJTgaEpdeq3v9 qgsKcEN1yiG4X5vREvTEMa/xOEutpu424Az8NzyQEv8Xqsv3xkZJEt+Th PQsvM/STKz0EQlvvabn5vul8+AWp3Fglpt7UEeig9LWYMLiwOMkkEhyxg 8brXT4mdl5VeGL6U5lsHvAMzD1GZOC+0xW7Wac8VM4Qng+mnMXccJLSno u/4CH0uRqQVDgYQm62IMDT1Ba24cJ907lqEbdN9GyS0gQHTDjJgB9+IHT DapfTe5nZrvZeeIMAtYH3hxVdVYzlIZDR9tIsZwGdCxeTiTgOijqPdRS5 A==; X-IronPort-AV: E=Sophos;i="5.95,190,1661788800"; d="scan'208";a="214366027" 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:19 +0800 IronPort-SDR: tY5ipyeLT1BWJ3jw406zQFtJe4SyEXX/8a2bipB2YGp4VBMZGKERSHaQYd2jAjAlsyg8+2qNXV +0i8hynxeGJqQgqGPlb77jIVmpM2noYesgiuEfc6SDjEY0zfpkCGeNr3F4xJlZSD2hNsxHNX5R ZXgwv+cbnKPdFE+nAHz+1o37TY5/4PPOkWltn9no95Ff5Ppy7uv18HZasC3+l0ht1eQLu/Hm4F zurO63bVuCf/nMjN2JAFhCXLsZSCUzCOwhd+HIZMZesM0YaCo6ZN0t6jbMyP9Agr0OuXMp/xih H8XPeJfVK5MQB9zyAz4/3zxb 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:52 -0700 IronPort-SDR: weB+isJ8SYnaEg4oOfa+4HLv5tWu+HWJrIYQzp40GMhL0ZYqHvX2tBa7puJ0jqcszr+lutCJw8 a09g+gwbuBXFuZEg/mk12kP4Z9igAINHVV0ANaFBJUmk1sW4le0zcpe/6E0MGdZEgooY1QuS0G MCm9KudTswCQad5dA0OwmakCbDOI6rkPlBOs3pD9oXQ1LYjq0if4xvrdzDkYJo3c6051WEnT1E B0Rjz+NguzBo0Z02337CHGYwcU/1aBF4H1CMmwWk1tFm1U93UA3a5Iki47RPpbiAhcmTEV5jRq QYs= 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:19 -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 4MrMk317XXz1Rwtl for ; Sun, 16 Oct 2022 20:22:19 -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=1665976938; x=1668568939; bh=3O2DopF+MAK2Mx8ruu GInQ2SFsIiGXlyPCLzDG43pXY=; b=RCynmvaL5zaWltinvB5z52t6rBCY9W5gCi I/WilDl2DGdnhoXb2YGFg5XIov6R+Ol0M6DceWpYVEH2Tv1IuBzay406j/ynho5y nV/DiJh8OIHodf5bQSBmYOWs1YzHXjqmP1jBk4VTjj3KBtq7wSo76FAjBBtT6sbb 80b4VARwiTG7RBJEohD55a0aiocQGPxThs+XhoxfpHzPrnfy4izukCbLh8lb2K1A 9d3r4bv6IS/NAsXcUEeEnNjHm34zgIICA4ZmdLej0DJZWuMW7D4CcMnNPFzcCKQ2 LwEWZnqct5bx/RE5OjD3Uj0gfpabPCE/LlhBfIuypslx/2mhu9bA== 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 EwAmPPJIhXcQ for ; Sun, 16 Oct 2022 20:22:18 -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 4MrMk123nCz1RvLy; Sun, 16 Oct 2022 20:22:17 -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 6/6] ata: ahci_qoriq: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:05 +0900 Message-Id: <20221017032205.2210188-7-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_202220_033427_D2C47432 X-CRM114-Status: GOOD ( 16.22 ) 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_qoriq.c:283:22: error: cast to smaller integer type 'enum ahci_qoriq_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] qoriq_priv->type = (enum ahci_qoriq_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_qoriq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 6cd61842ad48..9cf9bf36a874 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev) return -ENOMEM; if (of_id) - qoriq_priv->type = (enum ahci_qoriq_type)of_id->data; + qoriq_priv->type = (unsigned long)of_id->data; else qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;