From patchwork Mon Oct 17 03:22:02 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: 13008144 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 52CCAC433FE for ; Mon, 17 Oct 2022 03:23:41 +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=CEYm8BtHGy05Ki+QNYjlcjEI79BxLv1A/ci5tEOan/8=; b=c1pPq2Vdsb3wK/ 0Q8q203eXtCA5DCtfLm8rMacZVYogBbkIzf1Giqt9m7zkepDIMkMA0GIVqtdJPHxOgqBvUGxE4Ko9 8ykDs882V9vusc8mQpM+dF054B6xoSSl5k6IfflTUDvI2Ulk+lbK8ERR9V+R84yBTxJ5KbtfTDL3b /6ZXao/hU+eecCt/xwBl881MvSp9FFSeWQK26Ok1oMGOZ6ZYHIhFt3o39TfoiTuVuNvRzmbBGqbmb 6ZeRT9B2+F3L4Yd55WzIKu/yQC0xMB/GBIt4Gv4dp+S2AFhsUEBqdKUOg7SpJ1Fd2SfN/2SAL7UR/ b86rLMrUiRt48yxFgZyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okGiA-006QbG-Cm; Mon, 17 Oct 2022 03:22: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 1okGhj-006QMA-0g for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 03:22:16 +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=1665976934; x=1697512934; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P/VGei3mXd338tEnTEiU0+WWo95l65D0cCUal/7BcvY=; b=NWCw9nb81pqfiehpkrlQFkELjqSt6a48+8eEhm5sNh7wIYItFfC0OM4/ Z8NzIKPTRfK7zmnSABhy3zkzAru1p9ujKME9TZNZfiKQfMYYQwFbjzq8I xmknNzWmdF93aDPazYnxzZJz4t+vy/gzHaHKB7Jh0XSIKGvrfB/tqfU5z NNi1L0kswpClLBf46DpTsI/CU5npWslD/Z41QJNfZya0WGdh8amtKmLbf V1FenERVt1Q2bJq1myl2JLQyLFRpZoU2J1uNxeI9idRD21rbYIPWhTrPT Vs18Tj2Zz0AR+dbozU8axgCoVPDgInaL2stLAM82105ZJhbD7ezD5Hyv4 g==; X-IronPort-AV: E=Sophos;i="5.95,190,1661788800"; d="scan'208";a="214366016" 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:14 +0800 IronPort-SDR: T2iACHrZkoiQxVghbNu03mtY70VI9OduEjzWFP2CKQS3brNzvLdmtBzQa2KQ3h1X+dPwF1yeyi Jus1g3dc3Pb5L/cq1F79QfBAWfdK6lQitgkAqP4UmsXLtpI8eBz9v3K4tRnJ0cn3ObJDcItdHq myt13zFfNxMcR69791P4soe+cZCnpzd1FVtqCQIi6W+KRb86G3qkehe+6WpQdhV0zaxN9Lmxri K0nGuZ107BJfExQZuEz7fWy5XpTzVJMxtC+Cm3Q9NNV8MbXmZcBtjOKtccLb9Ez0CI23i+3kWb nv8CI5YnqX3dctXWaW+DSRIx 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:47 -0700 IronPort-SDR: L7gi/zPp8d1QlG7jCFWZfQY8AbRcvc8pycbn5EM1JrbVDzLM011UmwJ4iCZ+IZo7W8rHBIvhXS V4B+T73Ae3gDkp0nFsdwC6B51DF1+v5sZAgzhwhNTMZivHYjxdBF8l7rKYdOn6lOCO0Upm9VJJ FtePq+Zhq5PmA5pHkUPT7SwDTu+fM6n3bai6VJXnW/hqpNNGCa7FcbkneMeTitfwlbnGb/Uzak VNMGG1zIXmGQHLvdG3Q5JW3EUzUhYIr5AePyCST35EhFx4csDdbymuMGXmNdgXkUuxXXqRa6z9 Vuk= 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:14 -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 4MrMjy2Gn1z1RwvT for ; Sun, 16 Oct 2022 20:22:14 -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=1665976933; x=1668568934; bh=P/VGei3mXd338tEnTE iU0+WWo95l65D0cCUal/7BcvY=; b=iE3onShvPCfj/siEPXRQhrUS73RvlWqKoa sA/qAc/XmhHk0gw8di+mBTOxngD9CxgjSn7qhuVP9kSsXtbEHQmQMQKIv9zVD2su Et9CM3/roeD07CSf5kIcoMUH64kbtPlvb5aDjAS6m1XxR6JSPtdLqKtvncWA+QsG e5FHg6+akc8hsFv4oxeGqtWXU1DoNW4/rYxGwCDh7D39qb7Gy4AUvR+J1tqqsWDE SWsTa4wr3OwbpjI6g6TMBHEfADYY+q9FjJ5y5nzyLMS7GCwVp7/tf++61ou47Qgh M/XzgzULfo9dFfbU92yX9WD198Ny9sDc3s9pdRXCZYvbqF8Z3apg== 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 LFO7BV4WyjNX for ; Sun, 16 Oct 2022 20:22:13 -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 4MrMjw2TCXz1RvTp; Sun, 16 Oct 2022 20:22:12 -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 3/6] ata: ahci_brcm: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:02 +0900 Message-Id: <20221017032205.2210188-4-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_202215_138266_8C508E38 X-CRM114-Status: GOOD ( 16.30 ) 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_brcm.c:451:18: error: cast to smaller integer type 'enum brcm_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] priv->version = (enum brcm_ahci_version)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_brcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index f61795c546cf..6f216eb25610 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -448,7 +448,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) if (!of_id) return -ENODEV; - priv->version = (enum brcm_ahci_version)of_id->data; + priv->version = (unsigned long)of_id->data; priv->dev = dev; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");