From patchwork Thu Jun 6 14:36:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13688593 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 A0CE4C27C54 for ; Thu, 6 Jun 2024 14:37:11 +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: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:In-Reply-To:References: List-Owner; bh=sRozQPWnVAi/G7inxnzxHp8uXYGMd86EEfcd1fjBzq4=; b=V6PwEBqjtzxhVz A0VXcdPRvoPEEv/1h4Gt8WfnxNLEyBTdibW9PzsAmnh8XWOiH2KYuPCx++MeA0NgWhJ9XvfyusIfK pjldUnTCv8ry0d+vxYd2k+sgzYi/v3bB38Mqfwe+0nRKpHDWaOMEOfSVeoKb4CoOSc/9qMNtDkrKP sgeSpy6L+He/5Yfbm97921CNR23oBANmWeQ/PuW7xFWF+2bF9BOUCAcDDbthe7yvWdQfauqlSEeoT 1HDADopDZHNV6xHhqUwpVvuMMPRzUApnGrSC525ZM6i+ZgkOK2R4TdKetIRy4UDSYBisOoCq471Zh dfJo6t2UYuOjb2le7aAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEc-0000000A6Ua-0G1U; Thu, 06 Jun 2024 14:36:58 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEEX-0000000A6TO-2hVM for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2024 14:36:55 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-421555a4454so10835115e9.3 for ; Thu, 06 Jun 2024 07:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684612; x=1718289412; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BEGX/YRM4abY7OJ5gwhaYjtg7TEA+2R15UHkn44kNAM=; b=OXW4nfKLQVpNQrs5txlVptIVnlabRBEt0/L6inXtUNT/bIZq3c2xF9Mm8WhOjJt6DB pF53CBUuFGXr9Qq/g3lpma74dwr4FFnS5c0RmqWDl2GlUsnXnOgrXRMwR5ODcazdD1xM vmjZdEG3dDyweWF+dw1dLyDd6abwk0YsdjXOemyIqlFnDaTu8JGcOWAwwk6YxGCQZCqe qPPfCBL7f/EJq8pe7QrD8abV7yFq3KH0q0Rwg2HjjNwG8juRuZUJu3WmshvaMwl3Qmr5 suiMBlreQJG3DKEFSyLYl3ZLeOHVk/zXNgKfWaG2F24ObLa2ZVbJhVrs76sy1hwFVxSs wNTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684612; x=1718289412; 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=BEGX/YRM4abY7OJ5gwhaYjtg7TEA+2R15UHkn44kNAM=; b=iY5VsglovaEkMELnubSvH5vsv6EN6eltuCihWSp1chNNyDdplLWxPCgELJzj2KHh16 RwtLw0SpK3LqAW3XEBhsWxO9AKC6xFemKRdtzbmnypTy7z6FOZERAp4WzUeSaq4aBZn7 dqax39TeA0Y8Px/MMGnwc4XG8sVPqDeYB7iuzo+WR0rdLk9emg2NfIQv2ZbIJmTF41NX 4PM9zmT300gWkZ2JFCF5m54ICrfNQvOLSx3jIMbD20+txzZCC1s+MFXIOFPiHfqUR7yf Jhk4sOmerfQ0qUXHYzksT1hguQA3sa/2ho2sWdSPjPADM9HESFfvSu+vv1cw8NJc0VHq jEgg== X-Forwarded-Encrypted: i=1; AJvYcCWT26r50YaXzR4Fc7il+v3ul723YmkOWGi1CXkGJdj06LOARzQbxCiKXhlNSnWUyMJTZ98HsfZuEs19o/pNabtApUVHxfL4dpNUlSTJ12U1vkhwcRA= X-Gm-Message-State: AOJu0YwhcYUXGf9cd1FeFeFpgOgL5QdqI87kDP3nwxSOnTjYAErbEzHt XghJkmZGcQ6UTOxaCu+n0vKeDGD4gaG3OMJ5Sdr8fLLN/fbkC8eyON1qkjnDg8c= X-Google-Smtp-Source: AGHT+IEzOvqTcqQFVTM/zPrDfgG4Ch2gvXbBob36jdrxqP8DV2hXHRxxXD0hBtX3K+evZarwhWDdKQ== X-Received: by 2002:a05:600c:4714:b0:41f:afa6:3d85 with SMTP id 5b1f17b1804b1-421563504aamr51262215e9.31.1717684611808; Thu, 06 Jun 2024 07:36:51 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158148ffasm59540865e9.38.2024.06.06.07.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:36:51 -0700 (PDT) From: Krzysztof Kozlowski To: Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, llvm@lists.linux.dev Cc: Krzysztof Kozlowski Subject: [PATCH 1/3] mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again) Date: Thu, 6 Jun 2024 16:36:46 +0200 Message-ID: <20240606143648.152668-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073653_840646_669D7D31 X-CRM114-Status: GOOD ( 12.09 ) 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 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 8f7472c76009..67bf4de4c0c1 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -397,7 +397,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c) return ret; } - max14577->dev_type = (enum maxim_device_type)i2c_get_match_data(i2c); + max14577->dev_type = (kernel_ulong_t)i2c_get_match_data(i2c); max14577_print_dev_type(max14577);