From patchwork Thu Aug 10 10:38:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349216 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA044C001DB for ; Thu, 10 Aug 2023 10:39:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235018AbjHJKjL (ORCPT ); Thu, 10 Aug 2023 06:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234873AbjHJKjH (ORCPT ); Thu, 10 Aug 2023 06:39:07 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C04E7E6B for ; Thu, 10 Aug 2023 03:39:06 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-99c1c66876aso108906866b.2 for ; Thu, 10 Aug 2023 03:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691663945; x=1692268745; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GPET/8xbW9KfixaXy/3dH2F6+eueO+mbhdFOuDhANY8=; b=jWqntEcnvXKTmbnxQsFCm2cMvf8PLiBuQrLk1rwrhS7jnuPQ4z0dp6n0IaXAHIsqUH V7d6UeOThHJ9cA9npB/LOT1Y3FqrCGdD4cnAb+TcBwkfROII6L+dMuIdvpnlpGS7XZfV o1w4VR5gEZrNu8MCXlKbeAskkttLDiulZ6vi8zDn+2oIk37SosmpHjRmXDpM19Tn/pIV YWfXeuNQLi6Zy+SgxMHJAVvPccHXbov74I/bLdyLNDz8aAmPhYAAe928NM/Q5SnqgONN GJDeAw1uC4rL79BzKUOAMXa1J9sxZuEAZ0hVapKvNxpa3CaVnrnEQWyYG4OJ7L5y6gp9 IYzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691663945; x=1692268745; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GPET/8xbW9KfixaXy/3dH2F6+eueO+mbhdFOuDhANY8=; b=R2h29M80JcyhusftKHMcLlT5xa+fJVAhAupCbgAVE6lqvj600bnCAxLykQZFJjavzj JSy3dcy5uS9PPZ2J4tg1gerMPMhmhD5HeX8lutY68igRT2IbOjrmJZhEJpjS/8xU87Uk Y5549n2SJ5UlL4cp2CoXESVbB2S/Ovq9zoVqWsXJdmf7chiz4qYOJYTY7SNXq+7uJPkM FurpYU2Xf9hG4hlU1flxVYyKTS4sqyfEiRPQdF3/QiYCLnudfrfWw/5UjHGlJrmxDaW+ Ntyxuyxva1tf3ZRt3xlGXXqH3UmZgzzdYIfy59OX9Xub1oPK9bBTemNqrfOGtSEl9/md HrbA== X-Gm-Message-State: AOJu0YyPC8pffOv2WVSmhwAgKThSCHlB8ZZhSnqv0rNeChBa3GI4UN3G wjbLckP2g9eytHtwihf1LV4vxw== X-Google-Smtp-Source: AGHT+IELgt+KjxK743DSJKaI1jmqAfjuVrtmcAw9JFRkl7XRfteq2RZ4ARNgkHjliKBPKGwIjteatg== X-Received: by 2002:a17:907:2cd1:b0:992:61c5:dab0 with SMTP id hg17-20020a1709072cd100b0099261c5dab0mr1693290ejc.62.1691663945185; Thu, 10 Aug 2023 03:39:05 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id g11-20020a170906868b00b0099bca8b9a31sm742180ejx.100.2023.08.10.03.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:39:04 -0700 (PDT) From: Krzysztof Kozlowski To: Alessandro Zummo , Alexandre Belloni , Paul Cercueil , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 1/4] rtc: ds1307: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:38:59 +0200 Message-Id: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rtc-ds1307.c:1747:18: error: cast to smaller integer type 'enum ds_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index cb5acecc11aa..506b7d1c2397 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -1744,7 +1744,7 @@ static int ds1307_probe(struct i2c_client *client) match = device_get_match_data(&client->dev); if (match) { - ds1307->type = (enum ds_type)match; + ds1307->type = (uintptr_t)match; chip = &chips[ds1307->type]; } else if (id) { chip = &chips[id->driver_data]; From patchwork Thu Aug 10 10:39:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349217 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B365BC001DE for ; Thu, 10 Aug 2023 10:39:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235025AbjHJKjL (ORCPT ); Thu, 10 Aug 2023 06:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbjHJKjI (ORCPT ); Thu, 10 Aug 2023 06:39:08 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D8010DE for ; Thu, 10 Aug 2023 03:39:08 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-99bed101b70so110744266b.3 for ; Thu, 10 Aug 2023 03:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691663946; x=1692268746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tjssVyu9VJwz+xDSDWNEHPUfzXNslCG23eueJNmPGQ8=; b=uqNJ1HX/qjQIexV2nf059Rdzb/vqdUAP7+BucQ7L2+H6Cv3YX4VzsYY2QdgUBz5zfw RqIgwEmU/2ZOhRu3NoQxtaPmwxFofNfW9LUb5IwQQs7enednpNFFYIA5KT3Yc9Kdwofv 15SJTOYUrlVSwP3qf17oDTKcHc26PGvCDh4wGHdiDsX/xOZU8M2pXdp8Npgm8kpjNh2y mDHQRW4VFSrGvKVxO5APnSh54XKspyCJpbgznrvtOPMbWTb9c4S8oXFfmDUa/2l8jxNE 0t/Fi8H4wBUqr9RsCnrlgBWsI2W9hW6UK3ceRzrIrmlQrclmH7TlrdEeKnIFFyvMm/dR eVpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691663946; x=1692268746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tjssVyu9VJwz+xDSDWNEHPUfzXNslCG23eueJNmPGQ8=; b=Limc728/lZjT7+Fb8KwOElsyVi/BZKzcxru580sxtg3NKF68aK/Tj3kukxaBtODpRk fExGV9/8FjmbOg/Mh8lhiu6v2NQTcqoK+/Ei38fbtGCymaU2w+/b4wLy8fXBS/Lu5YuA fAwpDuQ3SIbpMJgMnNRsp4IS4rw6+90enY3TN9XZJkwhII3QJ8LkJSxRU5l/DYBrFHgs DjLcBXY5Lr/KGpDuX/ZkcxPRaUd+cBYzJ0Z53neNNYuEt4eehd7PSHtEI8uPw8Ns2jor U40wYCbco5/azDJsp4DTgp8QWJjA70QqJ4pqAnMGtIhCriHX+c36Yb1jlbS4Df31fyZ4 PpLg== X-Gm-Message-State: AOJu0YyrGsq6Ix1SCRz+2hxxT3ovTMgRzqBVv++SmmYCIamHgwe1Rbuo uBNmifRL/mE2XuKJ52dgto4I/A== X-Google-Smtp-Source: AGHT+IGT/7vPszp+L5u5i3kb8y/saAj4/upC2TQoXFJR3H17BGkbKlbzLVtk7KUts7U7TQAQw1OGEg== X-Received: by 2002:a17:906:1da1:b0:99b:f3f5:9752 with SMTP id u1-20020a1709061da100b0099bf3f59752mr1854481ejh.14.1691663946501; Thu, 10 Aug 2023 03:39:06 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id g11-20020a170906868b00b0099bca8b9a31sm742180ejx.100.2023.08.10.03.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:39:06 -0700 (PDT) From: Krzysztof Kozlowski To: Alessandro Zummo , Alexandre Belloni , Paul Cercueil , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 2/4] rtc: rv8803: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:39:00 +0200 Message-Id: <20230810103902.151145-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> References: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rtc-rv8803.c:648:18: error: cast to smaller integer type 'enum rv8803_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-rv8803.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 98679cae13e8..c09d66f881fd 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -645,8 +645,7 @@ static int rv8803_probe(struct i2c_client *client) mutex_init(&rv8803->flags_lock); rv8803->client = client; if (client->dev.of_node) { - rv8803->type = (enum rv8803_type) - of_device_get_match_data(&client->dev); + rv8803->type = (uintptr_t)of_device_get_match_data(&client->dev); } else { const struct i2c_device_id *id = i2c_match_id(rv8803_id, client); From patchwork Thu Aug 10 10:39:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349218 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0743C001DB for ; Thu, 10 Aug 2023 10:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235061AbjHJKjN (ORCPT ); Thu, 10 Aug 2023 06:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbjHJKjL (ORCPT ); Thu, 10 Aug 2023 06:39:11 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF7CB211B for ; Thu, 10 Aug 2023 03:39:09 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b9cdba1228so12181351fa.2 for ; Thu, 10 Aug 2023 03:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691663948; x=1692268748; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LE5HgK/rmOOcUMyFbPo2FN+e7FctifYK6zOjgKT3LSs=; b=g10IMHnJ+fZFZ1dfJ5J3AL7iR1tbfBL7Jl2QHu4kvr4HkDB8XIel0BNUGj5D4xep3m wptZ4Q4S5j2v9tT6dnWVP2O6Uanht3RByki4mYlb29jx0la608eSd/BjvYV/obGMIZhH rinjmQySqDYW5j81/F3PZ0mNjSxJMuixpZ1pqAVTyrV3/ppiVhcwE6bzTs9nEheNOdNH HzH7+YmsLS63xji+mO3mkLBc4ZX28NJp1qXOevuwa1d5wahKE90p+R37Ypwi0SGWXI2H viEJbbqvLh87DS0KaPQcvHq9foZ0gRgTdZnsEhF1kSZSFIk/pmHdgDKlh9EyWVxXQRQc 8LWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691663948; x=1692268748; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LE5HgK/rmOOcUMyFbPo2FN+e7FctifYK6zOjgKT3LSs=; b=cEpDyaXuA/exzrR619iBwOfnLbVzoUmrSVPa6+PqtkHcvSlitLcf5aEPia77fclKZi RpthPALbHTTrGw72ukXuoUjnwr2ZrYByTPZc653EcvhBe9t1oSh1jR+syluBpS8Foyc8 BYOAPvx83QSgMonh0bO1GtI/SlRQVrLvs/TE4bNzDYz40mPoTiUG2wSDUaRb1qI9hbch R4fGJG0Df9cVGPFomnassPuOeuDDbLFWgF5fHIDolQlzUfPydSDBYayxsXUbsDDuG529 6+uej31tI8QKO37LD+uqAgbgZLoDGgDYGCpn/NPbzkJ886b9HfEYgavbQBpC3u3UN3qG iULQ== X-Gm-Message-State: AOJu0YxqjFLBwL91wb6uSvrFcJSePsw++QQd9J1aFoigbU/T0C5S+2oE iST4cynVl2AvcvqWv6LEU0v46Q== X-Google-Smtp-Source: AGHT+IHioxh6ty/gJLegWCk8bgABdEYE5FHXi7z0uwbf+dChlaEeI6p677vKiBzREvHPOuq8G3JQIQ== X-Received: by 2002:a2e:b60a:0:b0:2b9:c8fb:8df6 with SMTP id r10-20020a2eb60a000000b002b9c8fb8df6mr1527466ljn.33.1691663948155; Thu, 10 Aug 2023 03:39:08 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id g11-20020a170906868b00b0099bca8b9a31sm742180ejx.100.2023.08.10.03.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:39:07 -0700 (PDT) From: Krzysztof Kozlowski To: Alessandro Zummo , Alexandre Belloni , Paul Cercueil , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 3/4] rtc: jz4740: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:39:01 +0200 Message-Id: <20230810103902.151145-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> References: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rtc-jz4740.c:352:14: error: cast to smaller integer type 'enum jz4740_rtc_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-jz4740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 36453b008139..84e0b3bfa71f 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -349,7 +349,7 @@ static int jz4740_rtc_probe(struct platform_device *pdev) if (!rtc) return -ENOMEM; - rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev); + rtc->type = (uintptr_t)device_get_match_data(dev); irq = platform_get_irq(pdev, 0); if (irq < 0) From patchwork Thu Aug 10 10:39:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13349219 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 392E8C04FE0 for ; Thu, 10 Aug 2023 10:39:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235017AbjHJKjO (ORCPT ); Thu, 10 Aug 2023 06:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbjHJKjM (ORCPT ); Thu, 10 Aug 2023 06:39:12 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4197E1BD9 for ; Thu, 10 Aug 2023 03:39:11 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5230df1ce4fso926156a12.1 for ; Thu, 10 Aug 2023 03:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691663950; x=1692268750; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UVkz966lVYyCDepVDZixPFVRMmINlccfjfN4fA3av38=; b=rcBWBchpudmlABde9Rt0jgbwvZt3JLlNKnutj7SpHxmJb+2+blf8UeEmRvnoxluzW5 1gv0+uFgkYSX35giBFSt9niVpWRGpyGZdkai1ta1th3BOkF5gQ2GIZUaH/mYg0SR0snU x1pZ8KoqOKd0D7HN+ijqszlHiiJGiiY6XQp2NGiWnjhaPXa4JTYLbJT2A3VIKGXCOQlm sf6425ASRzlmlV/URjhquYM3Y3zDd1PxHBCfewhZH/6j5iTH18r2hSMG2FxDCIWTPXXM IrlIBhztFlBkJMejHnraCLp2zpGL9fYMyf/knI35LDBH/LvzEvfPG4ehkKekvAex96AF /Krg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691663950; x=1692268750; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UVkz966lVYyCDepVDZixPFVRMmINlccfjfN4fA3av38=; b=M3c5Cq80E0MJRtZJSLfXMcDl/KFSKQ51dd18twuN++uuY6hk80UbQKrb7FGyRSitBr QBlYS17l1c2vt9k6a2JfQpz7JPIz1LJlVdy13FdXwRWYeCxJcgqigpeHDjOfiKtBWEhp 5fp7CVCSFDIngO44dRrTMBQTiCHtthI0MpviJJysJD2f+irUL3PTEk2NjaJoL8F+WsNM dzV9F5wDxD5T4ciVeeDL97Lj16OXlpNe71lyLjHH32FavhpyOa4q4BnxDNPFOt+zkk1R RuoLgpsAl3ysMWajN9GTAFi5FLBgGonBKwhJWgDfodNMU5yqQwUYn+8Rvy71+GbdCb1L +ETw== X-Gm-Message-State: AOJu0Yy5TpCK/gFzhFEisKRWBIQNvnctvGItnFYnhiU+AvC7cBAw/hOp V9kVl/tCMRejy85AyjZ6OpvZUg== X-Google-Smtp-Source: AGHT+IEjQzcGZgIz+Rb4K1zibn9OcjCTVtMdKc90JKBBfHAV2Gn4v8OlNYGNSmZP7MYiUBNsXJF8oA== X-Received: by 2002:a05:6402:6c9:b0:51e:3558:5eb6 with SMTP id n9-20020a05640206c900b0051e35585eb6mr1856385edy.3.1691663949849; Thu, 10 Aug 2023 03:39:09 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id g11-20020a170906868b00b0099bca8b9a31sm742180ejx.100.2023.08.10.03.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:39:09 -0700 (PDT) From: Krzysztof Kozlowski To: Alessandro Zummo , Alexandre Belloni , Paul Cercueil , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andi Shyti , Krzysztof Kozlowski Subject: [PATCH 4/4] rtc: rs5c372: fix Wvoid-pointer-to-enum-cast warning Date: Thu, 10 Aug 2023 12:39:02 +0200 Message-Id: <20230810103902.151145-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> References: <20230810103902.151145-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rtc-rs5c372.c:829:19: error: cast to smaller integer type 'enum rtc_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-rs5c372.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index a5a6c8772ecd..6df3d25345ac 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -826,8 +826,7 @@ static int rs5c372_probe(struct i2c_client *client) rs5c372->client = client; i2c_set_clientdata(client, rs5c372); if (client->dev.of_node) { - rs5c372->type = (enum rtc_type) - of_device_get_match_data(&client->dev); + rs5c372->type = (uintptr_t)of_device_get_match_data(&client->dev); } else { const struct i2c_device_id *id = i2c_match_id(rs5c372_id, client); rs5c372->type = id->driver_data;