From patchwork Mon Oct 17 03:22:01 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: 13008145 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 1118FC4332F for ; Mon, 17 Oct 2022 03:23:43 +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=5WUus0XvF3RKM8N+m+KXFUQ3YgxqewNfXTyxzz6D9Z0=; b=k7ZrNqvyge60qs ed8htnuZ+mjz1FCz3BrPzVN6aZ3dY5EaDeULIVS2o6tidTx2lx7P5r+p70B/CCNPMYa/7g/rE1g0o QwZ8J6fqBfLBqotqf8SAOtP/2mIEBdNTEvlUPgwNVfl0o5M4O4waL/fVtsazpyESvhU1wNAqmyp4K ATh5GqrVwKVxvWmAi/dS6/trCEg3cKBa2s5cxpbokR3JhnhPqQTEM0Etxw9L2qBhHClu+HWDpK4Wo WWOjdAPT3pekaaRTFGyV3CO62EWxjre2pXfYTNHIbznl/kFssCO07hvsyEHc0V+pMecxldNIrvjWD fCYKrhfCgvJRqBUuDn9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okGi0-006QWZ-KZ; Mon, 17 Oct 2022 03:22:32 +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 1okGhh-006QMA-B6 for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 03:22:14 +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=1665976933; x=1697512933; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qb90FWiWJqsBiM+rnnLq+ou+II9tNJdbJqeHntpNBfE=; b=q3uMJnMuUMPDCnNYfmFfyiFcGP2+knDr34832onjhlnFAp4cpiF+tOAw XeN6FooYUBPol2IsX9EdinBUFXWbcDtoOSvMMaSqHhfTxXGYQ7KNESqn+ WL9+OiRy3ngGgmvKsk0RxiGNYo9avwbDTjCOSwYkBaLtRibZo68ZcH9Jk r287Dm+XkiqiecUmpjXosWYlTmwTB3/aQ5aXmvKldgqPbwINntw2eylX6 sY96QAVuPDYIB4WKUKf+eMHekbVA5xUBmKKufcG6eKCMLvU0NYwQtyvqP JD701ZzCHSTjM/Ppde5Xvd6/dQKO+Bn54jEq/M0LbPEHjvr9hHqg0zhLh A==; X-IronPort-AV: E=Sophos;i="5.95,190,1661788800"; d="scan'208";a="214366010" 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:12 +0800 IronPort-SDR: hbZd+GinfrcemRoX+9/EzKLvWPFWtNqzZneQWmdcDjmOcxGXMbJobmMzTWkQIwlpsQ+qar3D+G NLTQkzPXG/6gHDUXmeSd2o3tcB064wahvOiGsJ4vo9W8fs6CMmFHidIJ0wlBVkbeuuInygSFg9 dyVVGvK2RehGAc2HAJFZP924gEZOpHaFcVZE8L2eGiUjif6qlGlOgKgEf7o3VhaDObF80bIDEo YH+InhF24U2zlbb64BA0F7IMX2W1pc72OuVBVUw/isc9IGktOvgV1kZni8AwLwZ8fbvMQqp3JA HVe9SaKt9MzI+JbDQN5CC4uB 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:45 -0700 IronPort-SDR: zdSnkjdfC0/Bypiaqg9uVuCrzQ85Mjh91cIHGpfEEOMoMSSy2JaPuiSHxRJG2Qi/A8Rcto1IGw eO4PRzi0uZqTYN6SzbYXC1F90iGrV99H74629SXlD72MXobtak0u3l2uW8Jcyi9u6Iw3k9ktf2 PSkSUu1+XzfgKJs2Vk97SLfUUdXjX9YE/sJHFweYpNQ1XOEey98VqYaifS4RjUAVTfO60KQuP8 GOxOCsZj6MM33m9G2R0KYIJrjqIP551rCD+NFt3tnn4GPvRnbkCUMH32wjIF9erBfdIx+JQgls Pdw= 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:12 -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 4MrMjw4GK3z1Rwtl for ; Sun, 16 Oct 2022 20:22:12 -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=1665976931; x=1668568932; bh=qb90FWiWJqsBiM+rnn Lq+ou+II9tNJdbJqeHntpNBfE=; b=pX4hETffpYuWnSM4cUy/mzy/YSWqKPaMN+ Y8s1HK5NKXdW5umftot/90hQibIvG85C/s5zeJYjEkqfDnKJ++WZg0LVqQE8MNK0 e0rF8aJ0Lfrw0lyfXjkxBcWQvdEg4CLF/b5QCFOH8RJkxAeVxRCg3sWyb8XnfTBj qx1Fr2nb5hBXdJ9c6NHU+nSaLg0sx9SUF9iT+qIUIK6wF2zB3luaRbvhc1/0QSW3 NRGNvl/hSFfynEbO+3JbxNejaNgbjU4ef6rS8x1LFHGHjhQ8OFGvVsa4UICJTc/5 HeGnQUtTb0Ux9RO0fosA1zThLypoNZvUP8GvViAWgUgLm1y5i2bA== 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 M48vNrt6mAWB for ; Sun, 16 Oct 2022 20:22:11 -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 4MrMjt4jtnz1RvLy; Sun, 16 Oct 2022 20:22:10 -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 2/6] ata: sata_rcar: Fix compilation warning Date: Mon, 17 Oct 2022 12:22:01 +0900 Message-Id: <20221017032205.2210188-3-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_202213_471907_7620F6B6 X-CRM114-Status: GOOD ( 15.99 ) 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/sata_rcar.c:878:15: error: cast to smaller integer type 'enum sata_rcar_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] priv->type = (enum sata_rcar_type)of_device_get_match_data(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size returned by of_device_get_match_data(). Signed-off-by: Damien Le Moal Reviewed-by: Geert Uytterhoeven Reviewed-by: Sergey Shtylyov --- drivers/ata/sata_rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 590ebea99601..0195eb29f6c2 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -875,7 +875,7 @@ static int sata_rcar_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - priv->type = (enum sata_rcar_type)of_device_get_match_data(dev); + priv->type = (unsigned long)of_device_get_match_data(dev); pm_runtime_enable(dev); ret = pm_runtime_get_sync(dev);