Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3615467pxk; Mon, 5 Oct 2020 14:37:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaHzHQH7B+1d39zgEV7jL/UR9ZyqksWEQeJ/tZJRmwZsqeabaFOLnA3DneYsR48vjfFlDK X-Received: by 2002:a17:906:68cd:: with SMTP id y13mr1744120ejr.230.1601933870253; Mon, 05 Oct 2020 14:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601933870; cv=none; d=google.com; s=arc-20160816; b=otazTD5zDOoydnoyLj+IGPiPDoFmY7ru1tDUGZLciKkx80FG0oqsye3B6UJRlsVudY w68zczVC1Z2D1VpsLPkH5ulDn8Sob2BshaTsZ6LeoxoQNTm7lFImxLdcSPhNi3F1gUUT +/k8mg7Mke6LE24z379JgSWAg6z4NSDCu7Hk5OUK1Ozo0E1ddLKFoDcsKLL8wOULdaeD 43q+72kkvPxJyoGNXeFUwcvnwoglhOGHVNbQyjIV/bHjfQqMMlie0aUdtkVPC2EU45Pu 6kTtGt0uWfjYCXjfddTD2bMICGbaJhWYRu+StBLjidTememKNM5By+axjxiNtmWyeRx3 jG9Q== 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=kDG90piP9bjjZ54VM7VZ8xIJjJTXJAd5c7/jB4KZCuw=; b=ifUXnkDKI71JWys3yXDXDQg9reNuOETL+3RFfUv6OvcATNIC69JbRFNTx1LL9mbd2K Qa37LmXfIG0WLXLGbxMoWfBCbTzjphePx1757MhS9omHzc5WKZf+TcNNcGXAtbOei+Rv 66ZYAyabNNuD6PJ17ToB0hAp6HOjgM4AWK/f/p6uJvfIihzEgRap5ucpvAvDUATtPfC/ xVhmkWLqKGxunGqeUbJWZL6LqBLuwXidxyr6PRCPfTR0+58f/PfVdKdP7B4oESexp0lm f9vDiaoEsNUli0hScwc+zHM84QudrCP8F3OnRaDKeX+2s5dIR+wAyg1XbQYtQw+TrJiw 9tEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U6Qb2I2E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si605490ejm.293.2020.10.05.14.37.27; Mon, 05 Oct 2020 14:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U6Qb2I2E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729565AbgJEUCD (ORCPT + 99 others); Mon, 5 Oct 2020 16:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729424AbgJEUCD (ORCPT ); Mon, 5 Oct 2020 16:02:03 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B23C0613CE; Mon, 5 Oct 2020 13:02:02 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id w5so10963811wrp.8; Mon, 05 Oct 2020 13:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kDG90piP9bjjZ54VM7VZ8xIJjJTXJAd5c7/jB4KZCuw=; b=U6Qb2I2EVdvXUonV7xvElgjAtpp5Q39Ju/U+JyYCWKusZ9PHt3ZW7VAe2oyxxPMAqC Gt0YhdLms9ASnHGet4kNAFfvxQ7uyIZhr2rVfjRFxZfkbGrUGJ8hXSWnuW6ZvWEP6FOp 5bCGoAOZhUiA+uwkhJ+PTpW/WSLWAlgR6RTIFNcKra4FxY8PxQq7AchY32dmCdDkKe2/ LQymcfir9y2x+3OSvq6AwxNSSjZ4LVAAePapsoPLdEx534RH+Kzp9/AL0vDeQ7QyTnjP 9Nh4J3uDEXkphCLTh5irFrlrhVOoaIQegw1t7y+cSvsrUYENr+dG435WJUvfzDm8LpNR XG9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kDG90piP9bjjZ54VM7VZ8xIJjJTXJAd5c7/jB4KZCuw=; b=rcA4Yl6DkgNZpj1gdFUUaOGCstO5yHeTqfQkYS2qM/1n1FyA2WyMwLJpKyKTFBuAit 2X+zhLE8imp4EYHPzzAsCdXJAfGg7+RS34MuV0LnS59ZGXEagvnVViSxgS782II9YEua SXxT/kVgOp3llr5SYRHKiBYFJfWqlVenKRN7qIyRdxjhAriB59Zy+BmwIUWHFG/bw8Gc LnTVEc+8bs6pFA5juVFpQ1G7C00VQrSGkE++hyE/iVUhdm8PfWD7D+LYDmMdLjxkDa29 knJG560qoBcktLcgNiAyM91sbtA6QSTK8CvcS8n+cP9THce9huNGTb6eA78xF1WKWYpC K4zQ== X-Gm-Message-State: AOAM530k+FxUoD5UGeCASVHgsI1GYbF+FcVGN/i7b/uvsOvLeqvv42y5 Df2z5q6Fd0tbg8Gj96zwWYE= X-Received: by 2002:adf:f903:: with SMTP id b3mr1108480wrr.142.1601928121488; Mon, 05 Oct 2020 13:02:01 -0700 (PDT) Received: from localhost ([91.92.14.102]) by smtp.gmail.com with ESMTPSA id s19sm736954wmc.41.2020.10.05.13.00.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Oct 2020 13:01:09 -0700 (PDT) From: Iskren Chernev To: Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Iskren Chernev , kernel test robot Subject: [PATCH] power: supply: max17040: Fix ptr to enum cast Date: Mon, 5 Oct 2020 23:00:38 +0300 Message-Id: <20201005200038.1032697-1-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang complains about casting pointers to smaller enum types. Reported-by: kernel test robot Signed-off-by: Iskren Chernev --- P.S. I fixed a similar issue in v5, but it was in another patch, and the test robot only complains about the first issue, so I missed this one. There is a similar warning in ltc2941-battery-gauge, let me know if I should submit a fix for it as well. drivers/power/supply/max17040_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c index 1d7510a59295d..d956c67d51558 100644 --- a/drivers/power/supply/max17040_battery.c +++ b/drivers/power/supply/max17040_battery.c @@ -247,7 +247,7 @@ static int max17040_get_of_data(struct max17040_chip *chip) { struct device *dev = &chip->client->dev; struct chip_data *data = &max17040_family[ - (enum chip_id) of_device_get_match_data(dev)]; + (uintptr_t) of_device_get_match_data(dev)]; int rcomp_len; u8 rcomp[2]; base-commit: f9d293364b452b651292ed3034dd06c57b1754d5 -- 2.28.0