Message ID | 20230810103902.151145-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp347450vqi; Thu, 10 Aug 2023 04:25:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCiGGh3prvXgMS3NW9oxSj6FYLb5FuAwCprvj7jQ7OolueovocPqdqvMHS66+c27u4GYc+ X-Received: by 2002:a05:6808:613:b0:3a5:a78b:f773 with SMTP id y19-20020a056808061300b003a5a78bf773mr2081001oih.6.1691666745350; Thu, 10 Aug 2023 04:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691666745; cv=none; d=google.com; s=arc-20160816; b=VQ/LCnnuXg33UkYmmMdiJpAvHKpSkkuIjgLF7rMxMsZZHVv6E0m1S7J1A+KKh2DAdh G6aOiiy2v4DOtMtXOZnULfDk0KJja8CUU4SP8/IiZpuO7q2e4yUUFBpnifVAX/rb5dXy cEskCxBxev5E+riyqFlKGrRV9+uBYnAify9yi4tIOOp9kjpjBGd6R01HxJPRI1M49986 aEIB923hQ/oaKv9rWNu525ryWuuGKZft6k6EGPC9ldIRkDuCl8akyEbmexXz4XjEvny7 lREXopxRfH9WMUEb0f961W14sVlACE55iLaH060rBs6GdDLcqoE1BX9Fz6aD1ThUI2q0 gnhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GPET/8xbW9KfixaXy/3dH2F6+eueO+mbhdFOuDhANY8=; fh=oXYvYiVy3/oV4hkJPNbMeMpJ3ef3xaLIexth8/+Di54=; b=aUiewqIVlPsDp83G+yJ5G5Z2j2m23gwYC4SnRWAeSeO14kJpYWOK++kEgJRzWQK3Vp f03F01zrqh7Jypzmx6fh4XDkMsS+dYYoZjbeW1Vf+DrsP4e4g9598wWAUqe7prCx3Uu4 pnnm+P6PUeI29j2ofXaIFp6aYliQZavGrlyqXa28OZYkLJ0B6pJ7dXYwQAFawIzN4YMZ SIjMYscxs8TBlW7DWiTmWV5rMBr+s/kVc+dFKm0fLCbbI1tyxgOn8E3chSgzM5iBeHFZ meaAzj+FWbyq2x60vRNsMjUQqvFsPqf3qBDL0qkqP6Gt+azHappEo4SPA+inzzzqwLn9 AN8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jWqntEcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x190-20020a6386c7000000b0056507c2502fsi1414016pgd.236.2023.08.10.04.25.31; Thu, 10 Aug 2023 04:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jWqntEcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234233AbjHJKjM (ORCPT <rfc822;lanlanxiyiji@gmail.com> + 99 others); Thu, 10 Aug 2023 06:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234058AbjHJKjH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Aug 2023 06:39:07 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C14A810DA for <linux-kernel@vger.kernel.org>; Thu, 10 Aug 2023 03:39:06 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-99bdeae1d0aso110232766b.1 for <linux-kernel@vger.kernel.org>; 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=IUyUDehs378CmqxaMDHO5ZTmx4uLfgOTFn9qTEES2WQdATN2u4nma9ZfpjlGWLbGn0 9aECBxLPrtwVhgx5CNO/MlJVy3rb3FiohMuFI1LHKouDM8RxRCdKxtxX+YpR9o4amGde 9VL2HbqJkqoof1ftSO9cxUltT+zr/MSfYjKpjwMgJwUvK7whg2QMC9Zqv+5VnVdojC6M 8igW0qPa7rQ0UI38mp5DvFqjiKaYkEHztj2PzgGXugq2nHV++0TT7m8AyT76y/YseWd6 7wCeU3fBQk3YhAB3zy6EH7AcBBdL4RlCJN+Fu8Ngp/aXzbvzokar9aq+MgoMkmGZf67R aMQQ== X-Gm-Message-State: AOJu0Yw5KdwRIzRK7CLrTONrWhW3RF65i8UiwWfEjrjF3M3Kc69T+qWk rtJqrgeTdWmUw4jetmBdwrFQIA== 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 <krzysztof.kozlowski@linaro.org> To: Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Paul Cercueil <paul@crapouillou.net>, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andi Shyti <andi.shyti@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773841148787419606 X-GMAIL-MSGID: 1773841148787419606 |
Series |
[1/4] rtc: ds1307: fix Wvoid-pointer-to-enum-cast warning
|
|
Commit Message
Krzysztof Kozlowski
Aug. 10, 2023, 10:38 a.m. UTC
'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 <krzysztof.kozlowski@linaro.org>
---
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];